diff --git a/gb.gtk/src/gmainwindow.cpp b/gb.gtk/src/gmainwindow.cpp index 8878fc2e6..e4d215c24 100644 --- a/gb.gtk/src/gmainwindow.cpp +++ b/gb.gtk/src/gmainwindow.cpp @@ -795,9 +795,6 @@ void gMainWindow::setTransientFor() { gMainWindow *parent = _current; - if (!parent) - parent = gApplication::mainWindow(); - if (!parent) parent = _active; diff --git a/gb.qt4/src/CWindow.cpp b/gb.qt4/src/CWindow.cpp index 93ad18b6d..270a7353e 100644 --- a/gb.qt4/src/CWindow.cpp +++ b/gb.qt4/src/CWindow.cpp @@ -1954,11 +1954,7 @@ void MyMainWindow::doShowModal(bool popup, const QPoint *pos) parent = CWINDOW_Current; if (!parent) - { - parent = CWINDOW_Main; - if (!parent) - parent = CWINDOW_Active; - } + parent = CWINDOW_Active; if (parent) setParent(CWidget::getTopLevel((CWIDGET *)parent)->widget.widget, Qt::Window | info.flags);