[mutter] window: Don't unmanage transient_for when attached
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Don't unmanage transient_for when attached
- Date: Fri, 26 Aug 2016 02:00:49 +0000 (UTC)
commit 658d97d00ec2068f5745da65f975ca2e46bdd909
Author: Jonas Ådahl <jadahl gmail com>
Date: Wed Aug 24 12:53:25 2016 +0800
window: Don't unmanage transient_for when attached
For some reason, when a modal dialog was made an attaching
transient-for, if the window wasn't "constructing", it would be
unmanaged and rely on some side effect to be recreated. This side
effect is not triggered for Wayland clients, thus if one happen to set
a surface as "modal" via gtk_surface.set_modal before
xdg_toplevel.set_parent, it'd be unmanaged and never show up.
Instead, simply just set the tranciency anyway for Wayland clients.
This makes GTK+ clients that set_modal() before set_transient_for()
work.
https://bugzilla.gnome.org/show_bug.cgi?id=770324
src/core/window.c | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index fc9477f..61f0a60 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7415,23 +7415,26 @@ meta_window_set_transient_for (MetaWindow *window,
/* may now be a dialog */
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
- meta_window_x11_recalc_window_type (window);
-
- if (!window->constructing)
{
- /* If the window attaches, detaches, or changes attached
- * parents, we need to destroy the MetaWindow and let a new one
- * be created (which happens as a side effect of
- * meta_window_unmanage()). The condition below is correct
- * because we know window->transient_for has changed.
- */
- if (window->attached || meta_window_should_attach_to_parent (window))
+ meta_window_x11_recalc_window_type (window);
+
+ if (!window->constructing)
{
- guint32 timestamp;
+ /* If the window attaches, detaches, or changes attached
+ * parents, we need to destroy the MetaWindow and let a new one
+ * be created (which happens as a side effect of
+ * meta_window_unmanage()). The condition below is correct
+ * because we know window->transient_for has changed.
+ */
+ if (window->attached || meta_window_should_attach_to_parent (window))
+ {
+ guint32 timestamp;
- timestamp = meta_display_get_current_time_roundtrip (window->display);
- meta_window_unmanage (window, timestamp);
- return;
+ timestamp =
+ meta_display_get_current_time_roundtrip (window->display);
+ meta_window_unmanage (window, timestamp);
+ return;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]