Commit d4d12bda authored by Benoît Minisini's avatar Benoît Minisini
Browse files

Implement the SetTransientFor() API by using a Qt 5.13 non-documented public method.

[GB.QT5.WAYLAND]
* NEW: Implement the SetTransientFor() API by using a Qt 5.13 non-documented public method.
parent efe47471
Pipeline #536614604 failed with stage
in 22 minutes and 28 seconds
......@@ -72,7 +72,6 @@ typedef
void (*SetProperties)(QWidget *window, int which, QT_WINDOW_PROP *prop);
void (*SetUserTime)(QWidget *window, int timestamp);
void (*SetTransientFor)(QWidget *window, QWidget *parent);
} Window;
}
QT_PLATFORM_INTERFACE;
......
......@@ -155,6 +155,7 @@ static void window_set_properties(QWidget *window, int which, QT_WINDOW_PROP *pr
X11_flush();*/
Qt::WindowFlags flags = window->windowFlags();
bool visible = window->isVisible();
if (prop->stacking == 1)
flags |= Qt::WindowStaysOnTopHint;
......@@ -172,6 +173,8 @@ static void window_set_properties(QWidget *window, int which, QT_WINDOW_PROP *pr
flags &= ~Qt::FramelessWindowHint;
window->setWindowFlags(flags);
if (visible)
window->show();
}
static void window_set_user_time(QWidget *window, int timestamp)
......@@ -181,6 +184,9 @@ static void window_set_user_time(QWidget *window, int timestamp)
static void window_set_transient_for(QWidget *window, QWidget *parent)
{
#if QT_VERSION >= 0x051300
window->windowHandle()->setTransientParent(parent->windowHandle());
#endif
}
//-------------------------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment