[metacity/wip/muktupavels/issue-18] window-props: don't set override-redirect window as parent
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/wip/muktupavels/issue-18] window-props: don't set override-redirect window as parent
- Date: Mon, 21 Jun 2021 16:51:20 +0000 (UTC)
commit 2bbce9f21abbd166d314d1b3346905bb4e234087
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Jun 21 18:30:21 2021 +0300
window-props: don't set override-redirect window as parent
Before commit c656c658940d override-redirect windows was not
registered with meta_display_register_x_window. This means
that Metacity was treating WM_TRANSIENT_FOR hint as invalid
if it was pointing to override-redirect window.
EWMH specification [1] says that WM_TRANSIENT_FOR property is
defined for managed windows and extends its usage for
override-redirect windows. Client should set WM_TRANSIENT_FOR
on override-redirect window if it is child/popup for another
window.
As specification does not say anyting about using
override-redirect windows as parent for managed windows and
because it causes crashes in Metacity ignore WM_TRANSIENT_FOR
if it is pointing to override-redirect window.
[1] https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm46291029654544
https://gitlab.gnome.org/GNOME/metacity/-/issues/18
src/core/window-props.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/core/window-props.c b/src/core/window-props.c
index a6ad2b03..680b236b 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -1603,6 +1603,16 @@ reload_transient_for (MetaWindow *window,
transient_for, window->desc);
transient_for = None;
}
+ else if (parent->override_redirect)
+ {
+ g_warning ("Ignoring WM_TRANSIENT_FOR for %s because it is pointing "
+ "to override-redirect window %s.",
+ window->desc,
+ parent->desc);
+
+ transient_for = None;
+ parent = NULL;
+ }
/* Make sure there is not a loop */
while (parent)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]