LCL-GTK2: Fix SpeedButton when non-modal form is opened by popup menu. Issue #38345, patch from Andrzej Kilijanski.

git-svn-id: trunk@64377 -
This commit is contained in:
juha 2021-01-11 16:38:13 +00:00
parent 36968885dd
commit adee13bfdd

View File

@ -741,7 +741,8 @@ begin
end;
GtkWindow := {%H-}PGtkWindow(AForm.Handle);
if (fsModal in AForm.FormState) and AForm.HandleObjectShouldBeVisible then
if AForm.HandleObjectShouldBeVisible then
begin
LastMouse.Button := 0;
LastMouse.ClickCount := 0;
@ -749,6 +750,10 @@ begin
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));
gtk_widget_set_uposition(PGtkWidget(GtkWindow), AForm.Left, AForm.Top);
gtk_window_set_type_hint({%H-}PGtkWindow(AForm.Handle),