mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 10:00:32 +02:00
gtk2: fix window type hints for modal/nonmodal forms. Issue #13051
git-svn-id: trunk@54197 -
This commit is contained in:
parent
11563b2959
commit
6eae03e479
@ -73,19 +73,6 @@ var
|
||||
|
||||
var
|
||||
Styles : TStrings;
|
||||
|
||||
const
|
||||
//(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin);
|
||||
GtkWindowTypeHints: array[TFormBorderStyle] of TGdkWindowTypeHint = (
|
||||
GDK_WINDOW_TYPE_HINT_NOTIFICATION,
|
||||
GDK_WINDOW_TYPE_HINT_NORMAL,
|
||||
GDK_WINDOW_TYPE_HINT_NORMAL,
|
||||
GDK_WINDOW_TYPE_HINT_DIALOG,
|
||||
GDK_WINDOW_TYPE_HINT_UTILITY,
|
||||
GDK_WINDOW_TYPE_HINT_UTILITY
|
||||
);
|
||||
|
||||
var
|
||||
DefaultPangoLayout: PPangoLayout = nil;
|
||||
|
||||
const
|
||||
|
@ -725,8 +725,6 @@ begin
|
||||
if AForm.HandleObjectShouldBeVisible and
|
||||
GTK_IS_WINDOW({%H-}PGtkWindow(AForm.Handle)) then
|
||||
begin
|
||||
gtk_window_set_type_hint({%H-}PGtkWindow(AForm.Handle),
|
||||
GtkWindowTypeHints[AForm.BorderStyle]);
|
||||
gtk_window_set_keep_above({%H-}PGtkWindow(AForm.Handle),
|
||||
GBoolean(AForm.FormStyle in fsAllStayOnTop))
|
||||
end
|
||||
@ -741,6 +739,7 @@ begin
|
||||
begin
|
||||
gtk_window_set_default_size(GtkWindow, Max(1,AForm.Width), Max(1,AForm.Height));
|
||||
gtk_widget_set_uposition(PGtkWidget(GtkWindow), AForm.Left, AForm.Top);
|
||||
gtk_window_set_type_hint(GtkWindow, GDK_WINDOW_TYPE_HINT_DIALOG);
|
||||
GtkWindowShowModal(AForm, GtkWindow);
|
||||
end else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user