equal
deleted
inserted
replaced
29 //INCLUDE |
29 //INCLUDE |
30 #include "peninputanim.h" |
30 #include "peninputanim.h" |
31 #include "peninputcmdparam.h" |
31 #include "peninputcmdparam.h" |
32 #include "peninputcmdparamext.h" |
32 #include "peninputcmdparamext.h" |
33 #include "peninputcmd.h" |
33 #include "peninputcmd.h" |
34 // Modify for bug ETMA-7X2C5Y begin |
|
35 #include "penpointereventsuppressor.h" |
34 #include "penpointereventsuppressor.h" |
36 // Modify for bug ETMA-7X2C5Y end |
|
37 // ----------- Touch feedback additions start |
35 // ----------- Touch feedback additions start |
38 #ifdef RD_TACTILE_FEEDBACK |
36 #ifdef RD_TACTILE_FEEDBACK |
39 #include <coecntrl.h> |
37 #include <coecntrl.h> |
40 #include <tactilefeedbackserver.h> |
38 #include <tactilefeedbackserver.h> |
41 #include <featmgr.h> |
39 #include <featmgr.h> |
126 #ifdef RD_TACTILE_FEEDBACK |
124 #ifdef RD_TACTILE_FEEDBACK |
127 FeatureManager::UnInitializeLib(); |
125 FeatureManager::UnInitializeLib(); |
128 iTactileControl.Close(); |
126 iTactileControl.Close(); |
129 iBackupTactileControl.Close(); |
127 iBackupTactileControl.Close(); |
130 #endif // RD_TACTILE_FEEDBACK |
128 #endif // RD_TACTILE_FEEDBACK |
131 // Modify for bug ETMA-7X2C5Y begin |
|
132 delete iPointerEventSuppressor; |
129 delete iPointerEventSuppressor; |
133 // Modify for bug ETMA-7X2C5Y end |
|
134 } |
130 } |
135 |
131 |
136 // --------------------------------------------------------------------------- |
132 // --------------------------------------------------------------------------- |
137 // CPeninputAnim::ConstructL |
133 // CPeninputAnim::ConstructL |
138 // Second phase constructor |
134 // Second phase constructor |
143 // the animation feature is not used |
139 // the animation feature is not used |
144 iFunctions->SetInterval(0); |
140 iFunctions->SetInterval(0); |
145 iFlushTimer = CPeriodic::NewL(CActive::EPriorityStandard); |
141 iFlushTimer = CPeriodic::NewL(CActive::EPriorityStandard); |
146 |
142 |
147 iFunctions->RegisterForNotifications(EDirectScreenAccess); |
143 iFunctions->RegisterForNotifications(EDirectScreenAccess); |
148 // Modify for bug ETMA-7X2C5Y begin |
|
149 iPointerEventSuppressor = CPenPointerEventSuppressor::NewL(); |
144 iPointerEventSuppressor = CPenPointerEventSuppressor::NewL(); |
150 // Modify for bug ETMA-7X2C5Y end |
|
151 } |
145 } |
152 |
146 |
153 |
147 |
154 // --------------------------------------------------------------------------- |
148 // --------------------------------------------------------------------------- |
155 // CPeninputAnim::Animate |
149 // CPeninputAnim::Animate |
232 default: |
226 default: |
233 break; |
227 break; |
234 } |
228 } |
235 |
229 |
236 |
230 |
237 // Suppress unexpected drag events, refer to error ETMA-7X2C5Y |
231 // Suppress unexpected drag events |
238 TPointerEvent pointerEvent; |
232 TPointerEvent pointerEvent; |
239 switch ( aRawEvent.Type() ) |
233 switch ( aRawEvent.Type() ) |
240 { |
234 { |
241 case TRawEvent::EButton1Down: |
235 case TRawEvent::EButton1Down: |
242 { |
236 { |
793 if(iTactileSupported) |
787 if(iTactileSupported) |
794 DoTactileFeedBack(aRawEvent.Pos() - rect.iTl); |
788 DoTactileFeedBack(aRawEvent.Pos() - rect.iTl); |
795 #endif // RD_TACTILE_FEEDBACK |
789 #endif // RD_TACTILE_FEEDBACK |
796 iIsPenDown = ETrue; |
790 iIsPenDown = ETrue; |
797 |
791 |
798 // Fix bug HMNN-82CDU5 |
|
799 // When button downing event is happened, iIsMove is reset to EFalse |
792 // When button downing event is happened, iIsMove is reset to EFalse |
800 iIsMove = EFalse; |
793 iIsMove = EFalse; |
801 |
794 |
802 // Recording pointer that button is pressing down in at this time |
795 // Recording pointer that button is pressing down in at this time |
803 iPointerDown = aRawEvent.Pos(); |
796 iPointerDown = aRawEvent.Pos(); |
832 iDiscreetPopedCapture = EFalse; |
825 iDiscreetPopedCapture = EFalse; |
833 return EFalse; |
826 return EFalse; |
834 } |
827 } |
835 if(iIsPenDown) |
828 if(iIsPenDown) |
836 { |
829 { |
837 |
830 |
838 // Fix bug HMNN-82CDU5 |
|
839 // When the control key pressing down in is different with the control key pressing up |
831 // When the control key pressing down in is different with the control key pressing up |
840 // and pointer moving event isn¡¯t happened, |
832 // and pointer moving event isn¡¯t happened, |
841 // pointer moving event will is supplied |
833 // pointer moving event will is supplied |
842 if(iPointerDown != aRawEvent.Pos() && !iIsMove) |
834 if(iPointerDown != aRawEvent.Pos() && !iIsMove) |
843 { |
835 { |
853 if(rect.Contains(aRawEvent.Pos())) |
845 if(rect.Contains(aRawEvent.Pos())) |
854 { |
846 { |
855 //send pen up event immediately |
847 //send pen up event immediately |
856 SendRawEvent(aRawEvent); |
848 SendRawEvent(aRawEvent); |
857 |
849 |
858 // Fix bug HMNN-82CDU5 |
|
859 // When key pressing up event is completed, iIsMove is reset to EFalse. |
850 // When key pressing up event is completed, iIsMove is reset to EFalse. |
860 iIsMove = EFalse; |
851 iIsMove = EFalse; |
861 // |
852 // |
862 |
853 |
863 return ETrue; |
854 return ETrue; |
889 #ifdef RD_TACTILE_FEEDBACK |
880 #ifdef RD_TACTILE_FEEDBACK |
890 TRect rect(iSpritePosition, iSpriteSize); |
881 TRect rect(iSpritePosition, iSpriteSize); |
891 if( iIsPenDown && iIsPointerCaptured) |
882 if( iIsPenDown && iIsPointerCaptured) |
892 { |
883 { |
893 //give tactile feedback |
884 //give tactile feedback |
894 |
|
895 // Fix bug HMNN-82CDU5 |
|
896 // When pointer moving event is happened, iIsMove is set to ETrue |
885 // When pointer moving event is happened, iIsMove is set to ETrue |
897 iIsMove = ETrue; |
886 iIsMove = ETrue; |
898 // |
887 // |
899 |
888 |
900 PostRawEvent(aRawEvent); |
889 PostRawEvent(aRawEvent); |
902 } |
891 } |
903 #endif // RD_TACTILE_FEEDBACK |
892 #endif // RD_TACTILE_FEEDBACK |
904 |
893 |
905 if(iIsPointerCaptured || iIsPenDown) |
894 if(iIsPointerCaptured || iIsPenDown) |
906 { |
895 { |
907 |
|
908 // Fix bug HMNN-82CDU5 |
|
909 // When pointer moving event is happened, iIsMove is set to ETrue |
896 // When pointer moving event is happened, iIsMove is set to ETrue |
910 iIsMove = ETrue; |
897 iIsMove = ETrue; |
911 // |
898 // |
912 |
899 |
913 PostRawEvent(aRawEvent); |
900 PostRawEvent(aRawEvent); |