Commit c5e11a9e authored by Michael W. Vogel's avatar Michael W. Vogel
Browse files

LCL: GTK2: Fixed tab cannot go from combobox to combobox. Issue #32458

git-svn-id: trunk@55920 -
parent 3e05a17d
......@@ -783,9 +783,8 @@ begin
LM_SYSKEYDOWN,
LM_SYSKEYUP:
begin
if (ALCLObject is TCustomComboBox) then
ConnectKeyPressReleaseEvents(PgtkObject(PgtkCombo(gObject)^.entry))
else if (ALCLObject is TCustomForm) then
if ((ALCLObject is TCustomComboBox) and gtk_is_combo_box_entry(gObject))
or (ALCLObject is TCustomForm) then
ConnectKeyPressReleaseEvents(gObject);
ConnectKeyPressReleaseEvents(gCore);
......
......@@ -1668,6 +1668,9 @@ begin
else
InputObject := AGtkObject;
Gtk2WidgetSet.SetCallbackDirect(LM_KEYDOWN, InputObject, AWinControl);
Gtk2WidgetSet.SetCallbackDirect(LM_KEYUP, InputObject, AWinControl);
Gtk2WidgetSet.SetCallbackDirect(LM_CHAR, InputObject, AWinControl);
Gtk2WidgetSet.SetCallbackDirect(LM_MOUSEMOVE, InputObject, AWinControl);
Gtk2WidgetSet.SetCallbackDirect(LM_LBUTTONDOWN, InputObject, AWinControl);
Gtk2WidgetSet.SetCallbackDirect(LM_LBUTTONUP, InputObject, AWinControl);
......@@ -1684,6 +1687,9 @@ begin
// And now the same for the Button in the combo
if AButton<>nil then begin
Gtk2WidgetSet.SetCallbackDirect(LM_KEYDOWN, AButton, AWinControl);
Gtk2WidgetSet.SetCallbackDirect(LM_KEYUP, AButton, AWinControl);
Gtk2WidgetSet.SetCallbackDirect(LM_CHAR, AButton, AWinControl);
if not GtkWidgetIsA(PGtkWidget(AButton),GTK_TYPE_CELL_VIEW) then begin
Gtk2WidgetSet.SetCallbackDirect(LM_MOUSEENTER, AButton, AWinControl);
Gtk2WidgetSet.SetCallbackDirect(LM_MOUSELEAVE, AButton, AWinControl);
......@@ -2091,7 +2097,7 @@ begin
Entry := GTK_BIN(WidgetInfo^.CoreWidget)^.child;
Result:=GTK_WIDGET_CAN_FOCUS(Entry);
end else begin
Result:=GTK_WIDGET_CAN_FOCUS(WidgetInfo^.CoreWidget);
Result:=inherited CanFocus(AWinControl);
end;
//DebugLn(['TGtk2WSCustomComboBox.CanFocus ',dbgsName(AWinControl),' ',gtk_is_combo_box_entry(WidgetInfo^.CoreWidget),' Result=',Result]);
end;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment