[Lazarus] TLMMouseEvent now lacks "state"

cobines cobines at gmail.com
Thu Oct 27 16:54:37 CEST 2011


I don't understand this change:

gtk2callback.inc:

@@ -2900,7 +2898,7 @@
   ShiftState := GTKEventStateToShiftState(Event^.State);

   if (KCInfo.Flags and KCINFO_FLAG_SHIFT_XOR_NUM <> 0)
-  and ((ssShift in ShiftState) xor (ssNum in ShiftState))
+  and (ssShift in ShiftState)
   then VKey := KCInfo.VKey2
   else VKey := KCInfo.VKey1;

and similar in gtk2proc.inc.

I would think this code checked if shift is pressed and numlock off or
shift not pressed and numlock on. Now checking numlock has been
removed completely. Shouldn't this now be something like: (ssShift in
ShiftState) xor IsNumLockOn?


gtk2proc.inc:
@@ -3124,8 +3124,8 @@
   const
     STATE_NAME: array[TShiftStateEnum] of String = ('ssShift',
'ssAlt', 'ssCtrl',
       'ssLeft', 'ssRight', 'ssMiddle', 'ssDouble',
-      'ssMeta', 'ssSuper', 'ssHyper', 'ssAltGr', 'ssCaps', 'ssNum',
-      'ssScroll', 'ssTriple', 'ssQuad', 'ssExtra1', 'ssExtra2');
+      'ssMeta', 'ssSuper', 'ssHyper', 'ssAltGr',
+      'ssTriple', 'ssQuad', 'ssExtra1', 'ssExtra2');
   {$endif}
   var

This won't compile because TShiftStateEnum has not changed in RTL.

--
cobines




More information about the Lazarus mailing list