diff options
author | Florian Müllner <fmuellner@gnome.org> | 2012-07-14 00:22:51 +0200 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2012-07-16 22:15:13 +0200 |
commit | eb1292ea994301c312e499bf657e1c3ee4dc843e (patch) | |
tree | 870bea8d9af28457f9d2b02834515ee071e3d319 | |
parent | e257580b9484762064692b214114442243afa262 (diff) | |
download | mutter-eb1292ea994301c312e499bf657e1c3ee4dc843e.tar.gz |
window: Handle changes of the attach-modal-dialogs preference
Currently we decide whether a modal dialog should be attached or not
when mapping it, i.e. we don't pick up preference changes that happen
while the dialog is up. It's not really a big deal given that modal
dialogs are usually transitory, but it's easy enough to add a bit of
extra polish ...
https://bugzilla.gnome.org/show_bug.cgi?id=679904
-rw-r--r-- | src/core/window.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/core/window.c b/src/core/window.c index c11720b08..93422aa1a 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -198,12 +198,18 @@ prefs_changed_callback (MetaPreference pref, { MetaWindow *window = data; - if (pref != META_PREF_WORKSPACES_ONLY_ON_PRIMARY) - return; - - meta_window_update_on_all_workspaces (window); - - meta_window_queue (window, META_QUEUE_CALC_SHOWING); + if (pref == META_PREF_WORKSPACES_ONLY_ON_PRIMARY) + { + meta_window_update_on_all_workspaces (window); + meta_window_queue (window, META_QUEUE_CALC_SHOWING); + } + else if (pref == META_PREF_ATTACH_MODAL_DIALOGS && + window->type == META_WINDOW_MODAL_DIALOG) + { + window->attached = meta_window_should_attach_to_parent (window); + recalc_window_features (window); + meta_window_queue (window, META_QUEUE_MOVE_RESIZE); + } } static void |