mark non constraint windows resizeable, otherwise X warns

git-svn-id: trunk@8028 -
This commit is contained in:
mattias 2005-11-02 00:09:55 +00:00
parent 9dc5379f89
commit be57b722e5
2 changed files with 13 additions and 4 deletions

View File

@ -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;

View File

@ -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;