summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorOwen W. Taylor <[email protected]>2014-09-27 17:06:36 +0300
committerVictor Kareh <[email protected]>2018-08-28 09:38:37 -0400
commitc9c3f858e28edf0856a263941007401923adbabd (patch)
tree702b2c5d7a41d8ea9b72ef5d2c11ad8116bab136 /src/core
parent37fecf49392eb10ada1f4bf481d6ad6be56891dd (diff)
downloadmarco-c9c3f858e28edf0856a263941007401923adbabd.tar.bz2
marco-c9c3f858e28edf0856a263941007401923adbabd.tar.xz
Add frame type for attached modal dialogs
Add a new frame type META_FRAME_TYPE_ATTACHED which is used for attached modal dialogs. The theme format version is bumped to 3.2, and attached windows can have borders defined in a metacity-theme-3.xml as: <window version=">= 3.2" type="attached" style_set="[name]"/> If no style is defined for "attached", drawing will fall back to the "border" type. https://bugzilla.gnome.org/show_bug.cgi?id=592382 NOTE: Patch copied from mutter and adapted for metacity.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/core.c b/src/core/core.c
index 4ba62db7..535a3820 100644
--- a/src/core/core.c
+++ b/src/core/core.c
@@ -131,7 +131,11 @@ meta_core_get (Display *xdisplay,
break;
case META_WINDOW_MODAL_DIALOG:
- base_type = META_FRAME_TYPE_MODAL_DIALOG;
+ if (meta_prefs_get_attach_modal_dialogs () &&
+ meta_window_get_transient_for (window) != NULL)
+ base_type = META_FRAME_TYPE_ATTACHED;
+ else
+ base_type = META_FRAME_TYPE_MODAL_DIALOG;
break;
case META_WINDOW_MENU:
@@ -157,7 +161,7 @@ meta_core_get (Display *xdisplay,
/* can't add border if undecorated */
*((MetaFrameType*)answer) = META_FRAME_TYPE_LAST;
}
- else if (window->border_only)
+ else if (window->border_only && base_type != META_FRAME_TYPE_ATTACHED)
{
/* override base frame type */
*((MetaFrameType*)answer) = META_FRAME_TYPE_BORDER;