mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 10:41:50 +02:00
Gtk3: send LM_CONTEXTMENU in proper order.
This commit is contained in:
parent
4f7b7c63ef
commit
336c552579
@ -2251,9 +2251,11 @@ begin
|
|||||||
NotifyApplicationUserInput(LCLObject, Msg.Msg);
|
NotifyApplicationUserInput(LCLObject, Msg.Msg);
|
||||||
Event^.button.send_event := NO_PROPAGATION_TO_PARENT;
|
Event^.button.send_event := NO_PROPAGATION_TO_PARENT;
|
||||||
|
|
||||||
Result := False;
|
if (SavedHandle <> PtrUInt(Self)) or (LCLObject = nil) or (FWidget = nil) then
|
||||||
|
exit;
|
||||||
|
Result := DeliverMessage(Msg, True) <> 0;
|
||||||
|
|
||||||
if Msg.Msg = LM_RBUTTONDOWN then
|
if not Result and (Msg.Msg = LM_RBUTTONDOWN) then
|
||||||
begin
|
begin
|
||||||
MsgPopup := Msg;
|
MsgPopup := Msg;
|
||||||
MsgPopup.Msg := LM_CONTEXTMENU;
|
MsgPopup.Msg := LM_CONTEXTMENU;
|
||||||
@ -2266,12 +2268,6 @@ begin
|
|||||||
Result := DeliverMessage(MsgPopup, True) <> 0;
|
Result := DeliverMessage(MsgPopup, True) <> 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not Result then
|
|
||||||
begin
|
|
||||||
if (SavedHandle <> PtrUInt(Self)) or (LCLObject = nil) or (FWidget = nil) then
|
|
||||||
exit;
|
|
||||||
Result := DeliverMessage(Msg, True) <> 0;
|
|
||||||
end;
|
|
||||||
if wtPanel in WidgetType then
|
if wtPanel in WidgetType then
|
||||||
Result := GDK_EVENT_STOP;
|
Result := GDK_EVENT_STOP;
|
||||||
end;
|
end;
|
||||||
@ -3030,9 +3026,11 @@ begin
|
|||||||
|
|
||||||
// we must trigger get_preferred_width after changing size
|
// we must trigger get_preferred_width after changing size
|
||||||
Widget^.queue_resize;
|
Widget^.queue_resize;
|
||||||
|
if [wtCustomControl, wtScrollingWinControl] * WidgetType <> [] then
|
||||||
{if wtProgressBar in WidgetType then
|
begin
|
||||||
getContainerWidget^.set_size_request(AWidth, AHeight);}
|
if Gtk3IsGdkWindow(Widget^.get_window) then
|
||||||
|
Widget^.get_window^.process_updates(True);
|
||||||
|
end;
|
||||||
finally
|
finally
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user