427 // --------------------------------------------------------------------------- |
427 // --------------------------------------------------------------------------- |
428 // |
428 // |
429 void CPeninputServer::ActivateSpriteInGlobalNotesL() |
429 void CPeninputServer::ActivateSpriteInGlobalNotesL() |
430 { |
430 { |
431 TBool notDraw = EFalse; |
431 TBool notDraw = EFalse; |
432 iUiLayout->HandleCommand( ECmdPeninputDisableLayoutDrawing, |
432 |
433 (unsigned char*)¬Draw ); |
433 if(iUiLayout) |
|
434 { |
|
435 iUiLayout->HandleCommand( ECmdPeninputDisableLayoutDrawing, |
|
436 (unsigned char*)¬Draw ); |
|
437 } |
434 if(iActive) |
438 if(iActive) |
435 { |
439 { |
436 if(iUseWindowCtrl) |
440 if(iUseWindowCtrl) |
437 { |
441 { |
438 /* RWsSession &ws = CCoeEnv::Static()->WsSession(); |
442 /* RWsSession &ws = CCoeEnv::Static()->WsSession(); |
691 { |
695 { |
692 RecoverSimulatedKeyEventState(); |
696 RecoverSimulatedKeyEventState(); |
693 if(aFlag) |
697 if(aFlag) |
694 { |
698 { |
695 iEventBufferQueue->Cancel(); |
699 iEventBufferQueue->Cancel(); |
696 iUiLayout->OnDeActivate(); |
700 if( iUiLayout ) |
|
701 { |
|
702 iUiLayout->OnDeActivate(); |
|
703 } |
697 if(iUseWindowCtrl) |
704 if(iUseWindowCtrl) |
698 iPenUiCtrl->OnDeactivate(); //disable non fading |
705 iPenUiCtrl->OnDeactivate(); //disable non fading |
699 } |
706 } |
700 else |
707 else |
701 { |
708 { |
702 iEventBufferQueue->GetEvent(); |
709 iEventBufferQueue->GetEvent(); |
703 iUiLayout->OnActivate(); |
710 if( iUiLayout ) |
|
711 { |
|
712 iUiLayout->OnActivate(); |
|
713 } |
704 if(iUseWindowCtrl) |
714 if(iUseWindowCtrl) |
705 iPenUiCtrl->OnActivate(CPenUiWndCtrl::ENoremalEditor); //disable non fading |
715 iPenUiCtrl->OnActivate(CPenUiWndCtrl::ENoremalEditor); //disable non fading |
706 } |
716 } |
707 |
717 |
708 } |
718 } |
2112 #endif |
2122 #endif |
2113 if(iUiLayout && !(iUiLayout->PenInputType() & DisabledByOrientation()) ) |
2123 if(iUiLayout && !(iUiLayout->PenInputType() & DisabledByOrientation()) ) |
2114 { |
2124 { |
2115 //hide the layout if it's already shown |
2125 //hide the layout if it's already shown |
2116 |
2126 |
|
2127 if ( iActive ) |
|
2128 { |
|
2129 iUiLayout->OnActivate(); |
|
2130 } |
|
2131 |
2117 iUiLayout->OnResourceChange(aType); |
2132 iUiLayout->OnResourceChange(aType); |
|
2133 |
|
2134 if(iUseWindowCtrl) |
|
2135 { |
|
2136 iPenUiCtrl->DrawNow(); |
|
2137 } |
|
2138 |
2118 //show the layout if it's active |
2139 //show the layout if it's active |
2119 } |
2140 } |
2120 } |
2141 } |
2121 |
2142 |
2122 // --------------------------------------------------------------------------- |
2143 // --------------------------------------------------------------------------- |
2238 {// for other input mode: we are not going to cose UI, since it will cause |
2259 {// for other input mode: we are not going to cose UI, since it will cause |
2239 // serious fliker: which will have the mixed ui(with other app ui) on pen input ui |
2260 // serious fliker: which will have the mixed ui(with other app ui) on pen input ui |
2240 |
2261 |
2241 if(iUiLayout) |
2262 if(iUiLayout) |
2242 { |
2263 { |
2243 TBool notDraw = ETrue; |
2264 //TBool notDraw = ETrue; |
2244 iUiLayout->HandleCommand(ECmdPeninputDisableLayoutDrawing,(unsigned char*)¬Draw); |
2265 //iUiLayout->HandleCommand(ECmdPeninputDisableLayoutDrawing,(unsigned char*)¬Draw); |
2245 iUiLayout->OnDeActivate(); |
2266 iUiLayout->OnDeActivate(); |
2246 } |
2267 } |
2247 } |
2268 } |
2248 #else |
2269 #else |
2249 iPrevActive = ETrue; |
2270 iPrevActive = ETrue; |
2443 DeactivatePenUiLayout(EFalse); |
2464 DeactivatePenUiLayout(EFalse); |
2444 iPenUiCtrl->DimPenUiForMenu(); |
2465 iPenUiCtrl->DimPenUiForMenu(); |
2445 break; |
2466 break; |
2446 } |
2467 } |
2447 */ |
2468 */ |
2448 if(IsGlobalNotesApp(focusApp)) |
2469 if( IsGlobalNotesApp(focusApp) ) |
2449 { |
2470 { |
2450 iInGlobalNotesState = ETrue; |
2471 iInGlobalNotesState = ETrue; |
2451 // add this to enable global dim |
2472 // add this to enable global dim |
2452 DeactivatePenUiLayout(EFalse); |
2473 DeactivatePenUiLayout(EFalse); |
2453 break; |
2474 break; |
2454 } |
2475 } |
2455 |
2476 |
2456 /* else if (focusApp.iUid == 0x102750f0) |
2477 /* else if (focusApp.iUid == 0x102750f0) |
2457 { |
2478 { |
2458 DeactivateSprite(); |
2479 DeactivateSprite(); |
2459 } |
2480 } |
2460 */ else |
2481 */ else |
2461 { |
2482 { |
2462 if(iInGlobalNotesState) |
2483 if(iInGlobalNotesState) |
2463 { |
2484 { |
2464 //fix for fast swap case |
2485 //fix for fast swap case |
2465 iInGlobalNotesState = EFalse; |
2486 iInGlobalNotesState = EFalse; |
2466 if(iPreNonGloebalNotesWndGrpId != focusApp.iUid) |
2487 if(iPreNonGloebalNotesWndGrpId != focusApp.iUid ) |
2467 { |
2488 { |
2468 iPreNonGloebalNotesWndGrpId = focusApp.iUid; |
2489 iPreNonGloebalNotesWndGrpId = focusApp.iUid; |
2469 |
|
2470 DeactivateSprite(ETrue);//hide pen ui immediately if switched to another application |
2490 DeactivateSprite(ETrue);//hide pen ui immediately if switched to another application |
2471 iForegroundSession = NULL; |
2491 // Notify FEP to close touch input window. |
|
2492 // Under this case, touch input window can't be closed without norifying FEP side. |
|
2493 // After close touch input window, FEP must change some states. |
|
2494 SignalOwner( ESignalDeactivateSprite, KNullDesC ); |
2472 } |
2495 } |
2473 } |
2496 } |
2474 else |
2497 else |
2475 { |
2498 { |
2476 DeactivateSprite(ETrue); |
2499 DeactivateSprite(ETrue); |
2477 } |
2500 } |
2478 } |
2501 } |
2479 break; |
2502 break; |
2480 } |
2503 } |
2481 DeactivateSprite(ETrue);//hide pen ui immediately |
2504 DeactivateSprite(ETrue);//hide pen ui immediately |
2482 } |
2505 } |
2483 break; |
2506 break; |
2484 default: |
2507 default: |
2602 } |
2625 } |
2603 } |
2626 } |
2604 |
2627 |
2605 void CPeninputServer::RecoverButtonEventState() |
2628 void CPeninputServer::RecoverButtonEventState() |
2606 { |
2629 { |
|
2630 if(!iUiLayout) |
|
2631 { |
|
2632 return; |
|
2633 } |
|
2634 |
2607 if (TRawEvent::EButton1Down == iLastRawEvent.Type()) |
2635 if (TRawEvent::EButton1Down == iLastRawEvent.Type()) |
2608 { |
2636 { |
2609 iLastRawEvent.Set(TRawEvent::EButton1Up);//,iLastSimulatedKeyEvent.ScanCode() |
2637 iLastRawEvent.Set(TRawEvent::EButton1Up);//,iLastSimulatedKeyEvent.ScanCode() |
2610 TRAP_IGNORE( iUiLayout->HandleEventL(ERawEvent,&iLastRawEvent) ); |
2638 TRAP_IGNORE( iUiLayout->HandleEventL(ERawEvent,&iLastRawEvent) ); |
2611 } |
2639 } |