mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 18:49:19 +02:00
gtk2 intf: implemented fsStayOnTop for other BorderStyles than bsNone, bug #8988
git-svn-id: trunk@23946 -
This commit is contained in:
parent
ab668a2188
commit
37a024507a
@ -166,8 +166,6 @@ begin
|
|||||||
|
|
||||||
// Maps the border style
|
// Maps the border style
|
||||||
WindowType := FormStyleMap[ABorderStyle];
|
WindowType := FormStyleMap[ABorderStyle];
|
||||||
if (ABorderStyle = bsNone) and (ACustomForm.FormStyle in fsAllStayOnTop) then
|
|
||||||
WindowType := GTK_WINDOW_POPUP;
|
|
||||||
if (csDesigning in ACustomForm.ComponentState) then
|
if (csDesigning in ACustomForm.ComponentState) then
|
||||||
WindowType := GTK_WINDOW_TOPLEVEL;
|
WindowType := GTK_WINDOW_TOPLEVEL;
|
||||||
|
|
||||||
@ -176,6 +174,9 @@ begin
|
|||||||
// create a floating form
|
// create a floating form
|
||||||
P := gtk_window_new(WindowType);
|
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
|
// Sets the window as resizable or not
|
||||||
// Depends on the WM supporting this
|
// Depends on the WM supporting this
|
||||||
if (csDesigning in ACustomForm.ComponentState) then
|
if (csDesigning in ACustomForm.ComponentState) then
|
||||||
@ -189,8 +190,13 @@ begin
|
|||||||
// Sets the title
|
// Sets the title
|
||||||
gtk_window_set_title(PGtkWindow(P), AParams.Caption);
|
gtk_window_set_title(PGtkWindow(P), AParams.Caption);
|
||||||
|
|
||||||
if PopupParent <> nil then
|
if (PopupParent <> nil) then
|
||||||
gtk_window_set_transient_for(PGtkWindow(P), PGtkWindow(PopupParent.Handle));
|
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
|
// the clipboard needs a widget
|
||||||
if (ClipboardWidget = nil) then
|
if (ClipboardWidget = nil) then
|
||||||
|
Loading…
Reference in New Issue
Block a user