mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 20:59:08 +02:00
MG: fixed transient of modal forms
git-svn-id: trunk@2056 -
This commit is contained in:
parent
c520af0c4e
commit
811719d1e2
@ -83,7 +83,7 @@ end;
|
|||||||
function gtkRealizeCB(Widget: PGtkWidget; Data: Pointer): GBoolean; cdecl;
|
function gtkRealizeCB(Widget: PGtkWidget; Data: Pointer): GBoolean; cdecl;
|
||||||
var
|
var
|
||||||
decor,Func : Longint;
|
decor,Func : Longint;
|
||||||
TheWindow: PGdkWindow;
|
TheWindow, MainWindow: PGdkWindow;
|
||||||
TheForm: TCustomForm;
|
TheForm: TCustomForm;
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
@ -105,13 +105,22 @@ begin
|
|||||||
|
|
||||||
gdk_window_set_decorations(TheWindow, decor);
|
gdk_window_set_decorations(TheWindow, decor);
|
||||||
gdk_window_set_functions(TheWindow, func);
|
gdk_window_set_functions(TheWindow, func);
|
||||||
|
|
||||||
|
if (Application.MainForm<>nil)
|
||||||
|
and (Application.MainForm.HandleAllocated) then begin
|
||||||
|
TheWindow:=GetControlWindow(Widget);
|
||||||
|
MainWindow:=GetControlWindow(PGtkWidget(Application.MainForm.Handle));
|
||||||
|
if TheWindow<>MainWindow then
|
||||||
|
gdk_window_set_transient_for(MainWindow,TheWindow);
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else if TObject(Data) is TPopupMenu then begin
|
else if TObject(Data) is TPopupMenu then begin
|
||||||
if (Application.MainForm<>nil)
|
if (Application.MainForm<>nil)
|
||||||
and (Application.MainForm.HandleAllocated) then begin
|
and (Application.MainForm.HandleAllocated) then begin
|
||||||
TheWindow:=GetControlWindow(Widget);
|
TheWindow:=GetControlWindow(Widget);
|
||||||
gdk_window_set_transient_for(TheWindow,
|
MainWindow:=GetControlWindow(PGtkWidget(Application.MainForm.Handle));
|
||||||
GetControlWindow(PGtkWidget(Application.MainForm.Handle)));
|
if TheWindow<>MainWindow then
|
||||||
|
gdk_window_set_transient_for(MainWindow,TheWindow);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2418,6 +2427,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.136 2002/09/30 20:37:09 lazarus
|
||||||
|
MG: fixed transient of modal forms
|
||||||
|
|
||||||
Revision 1.135 2002/09/30 20:19:12 lazarus
|
Revision 1.135 2002/09/30 20:19:12 lazarus
|
||||||
MG: fixed flickering of modal forms
|
MG: fixed flickering of modal forms
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user