[mutter/wip/carlosg/x11-xdnd-fix] core: Initialize XDND later on MetaDisplay
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/x11-xdnd-fix] core: Initialize XDND later on MetaDisplay
- Date: Wed, 10 Jul 2019 16:57:04 +0000 (UTC)
commit f7849b5c56d833db5601a434e829cf5967acecdf
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jul 10 18:48:36 2019 +0200
core: Initialize XDND later on MetaDisplay
Initialization of XDND was added to MetaX11Display initialization on commit
1f133b3ed25. That's however too soon on X11 sessions, there, MetaX11Display
gets initialized before the MetaCompositor does, so looking for the overlay
window causes a crash.
Move it later into meta_display_open(), this only happens on X11
compositors, so this is the better place to ensure everything is in place
to initialize XDND.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/672
src/core/display.c | 12 ++++++++----
src/x11/meta-x11-display.c | 3 ---
2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 4f56673b9..6448187a5 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -793,11 +793,15 @@ meta_display_open (void)
g_signal_connect (display->gesture_tracker, "state-changed",
G_CALLBACK (gesture_tracker_state_changed), display);
- /* We know that if mutter is running as a Wayland compositor,
- * we start out with no windows.
- */
if (!meta_is_wayland_compositor ())
- meta_display_manage_all_windows (display);
+ {
+ meta_dnd_init_xdnd (display->x11_display);
+
+ /* We know that if mutter is running as a Wayland compositor,
+ * we start out with no windows.
+ */
+ meta_display_manage_all_windows (display);
+ }
if (old_active_xwindow != None)
{
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
index e9428e54d..86a1454ea 100644
--- a/src/x11/meta-x11-display.c
+++ b/src/x11/meta-x11-display.c
@@ -1343,9 +1343,6 @@ meta_x11_display_new (MetaDisplay *display, GError **error)
meta_x11_startup_notification_init (x11_display);
meta_x11_selection_init (x11_display);
- if (!meta_is_wayland_compositor ())
- meta_dnd_init_xdnd (x11_display);
-
return x11_display;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]