mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 05:49:30 +02:00
Merged revision(s) 52069 #c2d8116ccf from trunk:
gtk2: workaround for openbox wm wrong reading of geometry structure. issue #29884 ........ git-svn-id: branches/fixes_1_6@52125 -
This commit is contained in:
parent
72c700be2d
commit
affb7b2553
@ -17,6 +17,7 @@
|
||||
unit Gtk2WSControls;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
{$I gtk2defines.inc}
|
||||
|
||||
interface
|
||||
|
||||
@ -725,8 +726,13 @@ begin
|
||||
if (AForm.Constraints.MaxHeight > 0) or (AForm.Constraints.MaxWidth > 0) then
|
||||
AHints := AHints or GDK_HINT_MAX_SIZE;
|
||||
|
||||
gtk_window_set_geometry_hints({%H-}PGtkWindow(AForm.Handle), nil, @Geometry,
|
||||
AHints);
|
||||
{$IFDEF HASX}
|
||||
if (AHints and GDK_HINT_MIN_SIZE = 0) and (AHints and GDK_HINT_MAX_SIZE = 0) and
|
||||
(Gtk2WidgetSet.GetWindowManager = 'openbox') then
|
||||
else
|
||||
{$ENDIF}
|
||||
gtk_window_set_geometry_hints({%H-}PGtkWindow(AForm.Handle), nil, @Geometry,
|
||||
AHints);
|
||||
end;
|
||||
gtk_window_resize({%H-}PGtkWindow(AForm.Handle), AForm.Width, AForm.Height);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user