mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-05 19:28:37 +02:00
Gtk3: simplified code.
This commit is contained in:
parent
59efce7694
commit
28554adf44
@ -9229,14 +9229,14 @@ class procedure TGtk3Window.WindowSizeAllocate(AWidget:PGtkWidget;AGdkRect:
|
|||||||
var
|
var
|
||||||
Msg: TLMSize;
|
Msg: TLMSize;
|
||||||
NewSize: TSize;
|
NewSize: TSize;
|
||||||
ACtl: TGtk3Widget;
|
ACtl: TGtk3Window;
|
||||||
AState: TGdkWindowState;
|
AState: TGdkWindowState;
|
||||||
Alloc: TGtkAllocation;
|
Alloc: TGtkAllocation;
|
||||||
ADefW, ADefH: gint;
|
ADefW, ADefH: gint;
|
||||||
begin
|
begin
|
||||||
if AWidget=nil then ;
|
if AWidget=nil then ;
|
||||||
|
|
||||||
ACtl := TGtk3Widget(Data);
|
ACtl := TGtk3Window(Data);
|
||||||
|
|
||||||
//When gtk3 form is shown for the first time under some window manager there's
|
//When gtk3 form is shown for the first time under some window manager there's
|
||||||
//geometry out of sync. We fix it via map-event and WidgetMapped property.
|
//geometry out of sync. We fix it via map-event and WidgetMapped property.
|
||||||
@ -9292,8 +9292,6 @@ begin
|
|||||||
Msg.Msg := LM_SIZE;
|
Msg.Msg := LM_SIZE;
|
||||||
Msg.SizeType := SIZE_RESTORED;
|
Msg.SizeType := SIZE_RESTORED;
|
||||||
|
|
||||||
if ACtl is TGtk3Window then
|
|
||||||
begin
|
|
||||||
AState := TGtk3Window(ACtl).getWindowState;
|
AState := TGtk3Window(ACtl).getWindowState;
|
||||||
if GDK_WINDOW_STATE_ICONIFIED in AState then
|
if GDK_WINDOW_STATE_ICONIFIED in AState then
|
||||||
Msg.SizeType := SIZE_MINIMIZED
|
Msg.SizeType := SIZE_MINIMIZED
|
||||||
@ -9303,7 +9301,6 @@ begin
|
|||||||
else
|
else
|
||||||
if GDK_WINDOW_STATE_FULLSCREEN in AState then
|
if GDK_WINDOW_STATE_FULLSCREEN in AState then
|
||||||
Msg.SizeType := SIZE_FULLSCREEN;
|
Msg.SizeType := SIZE_FULLSCREEN;
|
||||||
end;
|
|
||||||
|
|
||||||
Msg.SizeType := Msg.SizeType or Size_SourceIsInterface;
|
Msg.SizeType := Msg.SizeType or Size_SourceIsInterface;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user