mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 10:39:15 +02:00
mark non constraint windows resizeable, otherwise X warns
git-svn-id: trunk@8028 -
This commit is contained in:
parent
9dc5379f89
commit
be57b722e5
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user