mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 05:36:22 +02:00
LCL-GTK2: Fix SpeedButton freeze after closing popup menu without choosing menu item. Issue #38401, patch from Andrzej Kilijanski.
git-svn-id: trunk@64430 -
This commit is contained in:
parent
1e99ef0453
commit
5a0bf2ed29
@ -742,16 +742,6 @@ begin
|
||||
|
||||
GtkWindow := {%H-}PGtkWindow(AForm.Handle);
|
||||
|
||||
if AForm.HandleObjectShouldBeVisible then
|
||||
begin
|
||||
LastMouse.Button := 0;
|
||||
LastMouse.ClickCount := 0;
|
||||
LastMouse.Down := False;
|
||||
LastMouse.MousePos := Point(0, 0);
|
||||
LastMouse.Time := 0;
|
||||
LastMouse.WinControl := nil;
|
||||
end;
|
||||
|
||||
if (fsModal in AForm.FormState) and AForm.HandleObjectShouldBeVisible then
|
||||
begin
|
||||
gtk_window_set_default_size(GtkWindow, Max(1,AForm.Width), Max(1,AForm.Height));
|
||||
|
@ -612,7 +612,16 @@ var
|
||||
begin
|
||||
Result := False;
|
||||
if PopupMenu is TPopupMenu then
|
||||
begin
|
||||
PopupMenu.Close;
|
||||
// Fix freezing some controls (eg SpeedButton) when close PopupMenu
|
||||
LastMouse.Button := 0;
|
||||
LastMouse.ClickCount := 0;
|
||||
LastMouse.Down := False;
|
||||
LastMouse.MousePos := Point(0, 0);
|
||||
LastMouse.Time := 0;
|
||||
LastMouse.WinControl := nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure gtkWSPopupMenuDeactivate(widget: PGtkWidget; data: gPointer); cdecl;
|
||||
|
Loading…
Reference in New Issue
Block a user