[metacity] window: only attach dialogs to NORMAL, DIALOG, and MODAL_DIALOG windows
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] window: only attach dialogs to NORMAL, DIALOG, and MODAL_DIALOG windows
- Date: Thu, 2 Mar 2017 22:16:14 +0000 (UTC)
commit 9a450b0012702d0d812076b7a9e1f4cf1e76537b
Author: Dan Winship <danw gnome org>
Date: Fri Jul 22 12:34:10 2011 -0400
window: only attach dialogs to NORMAL, DIALOG, and MODAL_DIALOG windows
Attaching dialogs to unusual windows (like the desktop) looks bad, so
don't do it.
https://bugzilla.gnome.org/show_bug.cgi?id=646761
src/core/window.c | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 83caa46..1ea8cd6 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -239,7 +239,31 @@ meta_window_should_attach_to_parent (MetaWindow *window)
if (!parent)
return FALSE;
- return TRUE;
+ switch (parent->type)
+ {
+ case META_WINDOW_NORMAL:
+ case META_WINDOW_DIALOG:
+ case META_WINDOW_MODAL_DIALOG:
+ return TRUE;
+
+ case META_WINDOW_MENU:
+ case META_WINDOW_UTILITY:
+ case META_WINDOW_DESKTOP:
+ case META_WINDOW_DOCK:
+ case META_WINDOW_TOOLBAR:
+ case META_WINDOW_SPLASHSCREEN:
+ case META_WINDOW_DROPDOWN_MENU:
+ case META_WINDOW_POPUP_MENU:
+ case META_WINDOW_TOOLTIP:
+ case META_WINDOW_NOTIFICATION:
+ case META_WINDOW_COMBO:
+ case META_WINDOW_DND:
+ case META_WINDOW_OVERRIDE_OTHER:
+ default:
+ break;
+ }
+
+ return FALSE;
}
MetaWindow*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]