mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 05:16:48 +02:00
gtk: don't move invisible windows to foreground (fixed bug #0013188)
git-svn-id: trunk@18745 -
This commit is contained in:
parent
fbfc224459
commit
31c01a588a
@ -8788,9 +8788,16 @@ begin
|
|||||||
DebugLn(' LCLObject=nil');
|
DebugLn(' LCLObject=nil');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Result := GtkWidgetIsA(PGtkWidget(hWnd),GTK_TYPE_WINDOW);
|
Result := GtkWidgetIsA(PGtkWidget(hWnd),GTK_TYPE_WINDOW);
|
||||||
if Result then begin
|
if Result then
|
||||||
|
begin
|
||||||
GdkWindow := GetControlWindow(PgtkWidget(hwnd));
|
GdkWindow := GetControlWindow(PgtkWidget(hwnd));
|
||||||
if GdkWindow<>nil then begin
|
if GdkWindow <> nil then
|
||||||
|
begin
|
||||||
|
if not gdk_window_is_visible(GdkWindow) then
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
AForm := TCustomForm(GetLCLObject(PgtkWidget(hwnd)));
|
AForm := TCustomForm(GetLCLObject(PgtkWidget(hwnd)));
|
||||||
if (AForm <> nil) and (AForm is TCustomForm) and (AForm.Parent=nil) then
|
if (AForm <> nil) and (AForm is TCustomForm) and (AForm.Parent=nil) then
|
||||||
begin
|
begin
|
||||||
@ -8800,7 +8807,7 @@ begin
|
|||||||
' can not be raised, because ',
|
' can not be raised, because ',
|
||||||
DbgSName(Screen.GetCurrentModalForm),
|
DbgSName(Screen.GetCurrentModalForm),
|
||||||
' is modal and above.');
|
' is modal and above.');
|
||||||
Result:=false;
|
Result := False;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Screen.MoveFormToZFront(AForm);
|
Screen.MoveFormToZFront(AForm);
|
||||||
|
Loading…
Reference in New Issue
Block a user