diff options
Diffstat (limited to 'source/l/qt5/patches/qt5.qtbug-55583.patch')
-rw-r--r-- | source/l/qt5/patches/qt5.qtbug-55583.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/source/l/qt5/patches/qt5.qtbug-55583.patch b/source/l/qt5/patches/qt5.qtbug-55583.patch new file mode 100644 index 00000000..804f5383 --- /dev/null +++ b/source/l/qt5/patches/qt5.qtbug-55583.patch @@ -0,0 +1,41 @@ +# +# https://github.com/qt/qtbase/commit/84ea00d4.patch +# +From 84ea00d47049d882f2fabf1446ec6c6eb5fe3038 Mon Sep 17 00:00:00 2001 +From: J-P Nurmi <jpnurmi@qt.io> +Date: Tue, 6 Dec 2016 16:30:31 +0100 +Subject: [PATCH] QGtk3Dialog: don't crash on Wayland + +Check if it's an X11 window before calling XSetTransientForHint(). +No transient parent will be set for GTK+ dialogs on Wayland. That +has to be implemented separately. + +Task-number: QTBUG-55583 +Change-Id: Iabc2a72681c8157bb2f2fe500892853aa397106b +Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> +Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> +--- + src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp +index ba5089a..699b058 100644 +--- a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp ++++ b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp +@@ -135,10 +135,12 @@ bool QGtk3Dialog::show(Qt::WindowFlags flags, Qt::WindowModality modality, QWind + + GdkWindow *gdkWindow = gtk_widget_get_window(gtkWidget); + if (parent) { +- GdkDisplay *gdkDisplay = gdk_window_get_display(gdkWindow); +- XSetTransientForHint(gdk_x11_display_get_xdisplay(gdkDisplay), +- gdk_x11_window_get_xid(gdkWindow), +- parent->winId()); ++ if (GDK_IS_X11_WINDOW(gdkWindow)) { ++ GdkDisplay *gdkDisplay = gdk_window_get_display(gdkWindow); ++ XSetTransientForHint(gdk_x11_display_get_xdisplay(gdkDisplay), ++ gdk_x11_window_get_xid(gdkWindow), ++ parent->winId()); ++ } + } + + if (modality != Qt::NonModal) { |