diff --git a/lcl/interfaces/gtk/gtkproc.inc b/lcl/interfaces/gtk/gtkproc.inc index cbf868c971..cab9a5c2aa 100644 --- a/lcl/interfaces/gtk/gtkproc.inc +++ b/lcl/interfaces/gtk/gtkproc.inc @@ -8101,15 +8101,15 @@ begin ABorderStyle:=bsSizeable; Case ABorderStyle of - bsNone : Result := GDK_FUNC_MOVE or GDK_FUNC_CLOSE; + bsNone : Result := GDK_FUNC_RESIZE or GDK_FUNC_MOVE or GDK_FUNC_CLOSE; bsSingle : Result := GDK_FUNC_RESIZE or GDK_FUNC_MOVE or GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE; bsSizeable : Result := GDK_FUNC_ALL; - bsDialog : Result := GDK_FUNC_CLOSE or GDK_FUNC_MINIMIZE or - GDK_FUNC_MOVE; + bsDialog : Result := GDK_FUNC_RESIZE or GDK_FUNC_CLOSE or GDK_FUNC_MINIMIZE + or GDK_FUNC_MOVE; bsToolWindow : Result := GDK_FUNC_RESIZE or GDK_FUNC_MOVE or GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE; @@ -8118,6 +8118,15 @@ begin GDK_FUNC_MINIMIZE or GDK_FUNC_CLOSE or GDK_FUNC_RESIZE; end; + + // X warns if marking a fixed size window resizeable: + if ((AForm.Constraints.MinWidth>0) + and (AForm.Constraints.MinWidth=AForm.Constraints.MaxWidth)) + or ((AForm.Constraints.MinHeight>0) + and (AForm.Constraints.MinHeight=AForm.Constraints.MaxHeight)) then + Result:=Result-GDK_FUNC_RESIZE; + + //debugln('GetWindowFunction A ',DbgSName(AForm),' ',dbgs(ord(ABorderStyle))); end; function GetGDKMouseCursor(Cursor: TCursor): PGdkCursor; diff --git a/lcl/interfaces/gtk/gtkwscontrols.pp b/lcl/interfaces/gtk/gtkwscontrols.pp index 10b37aa2db..744aec3453 100644 --- a/lcl/interfaces/gtk/gtkwscontrols.pp +++ b/lcl/interfaces/gtk/gtkwscontrols.pp @@ -243,7 +243,7 @@ begin end; //debugln('TGtkWSWinControl.ConstraintsChange A ',GetWidgetDebugReport(Widget),' max=',dbgs(Geometry.max_width),'x',dbgs(Geometry.max_height)); gtk_window_set_geometry_hints(PGtkWindow(Widget), nil, @Geometry, - GDK_HINT_MIN_SIZE or GDK_HINT_MAX_SIZE); + GDK_HINT_MIN_SIZE or GDK_HINT_MAX_SIZE); end; end;