From 809abca88628c0c62ab96a5c53db1dc090e2194b Mon Sep 17 00:00:00 2001 From: zeljko Date: Fri, 16 Mar 2012 20:47:04 +0000 Subject: [PATCH] Gtk2: let OnEditingDone trigger when VK_RETURN is pressed in GtkSpinButton. git-svn-id: trunk@36096 - --- lcl/interfaces/gtk2/gtk2proc.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/gtk2/gtk2proc.inc b/lcl/interfaces/gtk2/gtk2proc.inc index 8ef6d84620..00826f4ca5 100644 --- a/lcl/interfaces/gtk2/gtk2proc.inc +++ b/lcl/interfaces/gtk2/gtk2proc.inc @@ -2151,7 +2151,9 @@ var // => emulate it // emulate VK_RETURN on GtkButton. issue #21483 - if GtkWidgetIsA(TargetWidget, gtk_type_button) then + // spin button needs VK_RETURN to send OnEditingDone. issue #21224 + if GtkWidgetIsA(TargetWidget, gtk_type_button) or + GtkWidgetIsA(TargetWidget, gtk_type_spin_button) then begin if (gdk_event_get_type(AEvent) = GDK_KEY_RELEASE) and (VKey = VK_RETURN) then @@ -2179,7 +2181,7 @@ var (gdk_event_get_type(AEvent) = GDK_KEY_PRESS) and ((VKey = VK_RETURN) or (VKey = VK_TAB)) then begin - //DebugLn(['EmulateKeysEatenByGtk ']); + // DebugLn(['EmulateKeysEatenByGtk ']); FillChar(Msg, SizeOf(Msg), 0); Msg.CharCode := VKey; if SysKey then