mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 12:39:15 +02:00
gtk2: workaround for openbox wm wrong reading of geometry structure. issue #29884
git-svn-id: trunk@52069 -
This commit is contained in:
parent
8ed5c08f14
commit
c2d8116ccf
@ -17,6 +17,7 @@
|
|||||||
unit Gtk2WSControls;
|
unit Gtk2WSControls;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
{$I gtk2defines.inc}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
@ -725,6 +726,11 @@ begin
|
|||||||
if (AForm.Constraints.MaxHeight > 0) or (AForm.Constraints.MaxWidth > 0) then
|
if (AForm.Constraints.MaxHeight > 0) or (AForm.Constraints.MaxWidth > 0) then
|
||||||
AHints := AHints or GDK_HINT_MAX_SIZE;
|
AHints := AHints or GDK_HINT_MAX_SIZE;
|
||||||
|
|
||||||
|
{$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,
|
gtk_window_set_geometry_hints({%H-}PGtkWindow(AForm.Handle), nil, @Geometry,
|
||||||
AHints);
|
AHints);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user