gtk2 intf: implemented fsStayOnTop for other BorderStyles than bsNone, bug #8988

git-svn-id: trunk@23946 -
This commit is contained in:
mattias 2010-03-11 16:10:01 +00:00
parent ab668a2188
commit 37a024507a

View File

@ -166,8 +166,6 @@ begin
// Maps the border style
WindowType := FormStyleMap[ABorderStyle];
if (ABorderStyle = bsNone) and (ACustomForm.FormStyle in fsAllStayOnTop) then
WindowType := GTK_WINDOW_POPUP;
if (csDesigning in ACustomForm.ComponentState) then
WindowType := GTK_WINDOW_TOPLEVEL;
@ -176,6 +174,9 @@ begin
// create a floating form
P := gtk_window_new(WindowType);
if (ABorderStyle = bsNone) and (ACustomForm.FormStyle in fsAllStayOnTop) then
gtk_window_set_decorated(PGtkWindow(P), False);
// Sets the window as resizable or not
// Depends on the WM supporting this
if (csDesigning in ACustomForm.ComponentState) then
@ -189,8 +190,13 @@ begin
// Sets the title
gtk_window_set_title(PGtkWindow(P), AParams.Caption);
if PopupParent <> nil then
gtk_window_set_transient_for(PGtkWindow(P), PGtkWindow(PopupParent.Handle));
if (PopupParent <> nil) then
gtk_window_set_transient_for(PGtkWindow(P), PGtkWindow(PopupParent.Handle))
else
if not (csDesigning in ACustomForm.ComponentState)
and (ACustomForm.FormStyle = fsStayOnTop)
and not (ACustomForm.BorderStyle in [bsNone]) then
gtk_window_set_keep_above(PGtkWindow(P), gboolean(True));
// the clipboard needs a widget
if (ClipboardWidget = nil) then