mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:59:22 +02:00
Merged revision(s) 55920 #c5e11a9e95, 55979 #058c0d8e3a from trunk:
LCL: GTK2: Fixed tab cannot go from combobox to combobox. Issue #32458 ........ LCL: TComboBox: GTK2: Fixed KeyUp and KeyDown react like tab key after revision 55920 #c5e11a9e95. Issue #32458 ........ git-svn-id: branches/fixes_1_8@56982 -
This commit is contained in:
parent
1a394c8f24
commit
133ffd1010
@ -783,9 +783,8 @@ begin
|
|||||||
LM_SYSKEYDOWN,
|
LM_SYSKEYDOWN,
|
||||||
LM_SYSKEYUP:
|
LM_SYSKEYUP:
|
||||||
begin
|
begin
|
||||||
if (ALCLObject is TCustomComboBox) then
|
if ((ALCLObject is TCustomComboBox) and gtk_is_combo_box_entry(gObject))
|
||||||
ConnectKeyPressReleaseEvents(PgtkObject(PgtkCombo(gObject)^.entry))
|
or (ALCLObject is TCustomForm) then
|
||||||
else if (ALCLObject is TCustomForm) then
|
|
||||||
ConnectKeyPressReleaseEvents(gObject);
|
ConnectKeyPressReleaseEvents(gObject);
|
||||||
|
|
||||||
ConnectKeyPressReleaseEvents(gCore);
|
ConnectKeyPressReleaseEvents(gCore);
|
||||||
|
@ -1670,6 +1670,13 @@ begin
|
|||||||
else
|
else
|
||||||
InputObject := AGtkObject;
|
InputObject := AGtkObject;
|
||||||
|
|
||||||
|
if TCustomComboBox(AWinControl).Style in [csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable] then
|
||||||
|
begin
|
||||||
|
// Just a combobox without a edit should handle its own keys. Issue #32458
|
||||||
|
Gtk2WidgetSet.SetCallbackDirect(LM_KEYDOWN, InputObject, AWinControl);
|
||||||
|
Gtk2WidgetSet.SetCallbackDirect(LM_KEYUP, InputObject, AWinControl);
|
||||||
|
Gtk2WidgetSet.SetCallbackDirect(LM_CHAR, InputObject, AWinControl);
|
||||||
|
end;
|
||||||
Gtk2WidgetSet.SetCallbackDirect(LM_MOUSEMOVE, InputObject, AWinControl);
|
Gtk2WidgetSet.SetCallbackDirect(LM_MOUSEMOVE, InputObject, AWinControl);
|
||||||
Gtk2WidgetSet.SetCallbackDirect(LM_LBUTTONDOWN, InputObject, AWinControl);
|
Gtk2WidgetSet.SetCallbackDirect(LM_LBUTTONDOWN, InputObject, AWinControl);
|
||||||
Gtk2WidgetSet.SetCallbackDirect(LM_LBUTTONUP, InputObject, AWinControl);
|
Gtk2WidgetSet.SetCallbackDirect(LM_LBUTTONUP, InputObject, AWinControl);
|
||||||
@ -1686,6 +1693,13 @@ begin
|
|||||||
|
|
||||||
// And now the same for the Button in the combo
|
// And now the same for the Button in the combo
|
||||||
if AButton<>nil then begin
|
if AButton<>nil then begin
|
||||||
|
if TCustomComboBox(AWinControl).Style in [csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable] then
|
||||||
|
begin
|
||||||
|
// Just a combobox without a edit should handle its own keys. Issue #32458
|
||||||
|
Gtk2WidgetSet.SetCallbackDirect(LM_KEYDOWN, AButton, AWinControl);
|
||||||
|
Gtk2WidgetSet.SetCallbackDirect(LM_KEYUP, AButton, AWinControl);
|
||||||
|
Gtk2WidgetSet.SetCallbackDirect(LM_CHAR, AButton, AWinControl);
|
||||||
|
end;
|
||||||
if not GtkWidgetIsA(PGtkWidget(AButton),GTK_TYPE_CELL_VIEW) then begin
|
if not GtkWidgetIsA(PGtkWidget(AButton),GTK_TYPE_CELL_VIEW) then begin
|
||||||
Gtk2WidgetSet.SetCallbackDirect(LM_MOUSEENTER, AButton, AWinControl);
|
Gtk2WidgetSet.SetCallbackDirect(LM_MOUSEENTER, AButton, AWinControl);
|
||||||
Gtk2WidgetSet.SetCallbackDirect(LM_MOUSELEAVE, AButton, AWinControl);
|
Gtk2WidgetSet.SetCallbackDirect(LM_MOUSELEAVE, AButton, AWinControl);
|
||||||
@ -2123,7 +2137,7 @@ begin
|
|||||||
Entry := GTK_BIN(WidgetInfo^.CoreWidget)^.child;
|
Entry := GTK_BIN(WidgetInfo^.CoreWidget)^.child;
|
||||||
Result:=GTK_WIDGET_CAN_FOCUS(Entry);
|
Result:=GTK_WIDGET_CAN_FOCUS(Entry);
|
||||||
end else begin
|
end else begin
|
||||||
Result:=GTK_WIDGET_CAN_FOCUS(WidgetInfo^.CoreWidget);
|
Result:=inherited CanFocus(AWinControl);
|
||||||
end;
|
end;
|
||||||
//DebugLn(['TGtk2WSCustomComboBox.CanFocus ',dbgsName(AWinControl),' ',gtk_is_combo_box_entry(WidgetInfo^.CoreWidget),' Result=',Result]);
|
//DebugLn(['TGtk2WSCustomComboBox.CanFocus ',dbgsName(AWinControl),' ',gtk_is_combo_box_entry(WidgetInfo^.CoreWidget),' Result=',Result]);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user