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
This commit is contained in:
Florian Müllner 2012-07-14 00:22:51 +02:00
parent e257580b94
commit eb1292ea99

View File

@ -198,13 +198,19 @@ prefs_changed_callback (MetaPreference pref,
{ {
MetaWindow *window = data; MetaWindow *window = data;
if (pref != META_PREF_WORKSPACES_ONLY_ON_PRIMARY) if (pref == META_PREF_WORKSPACES_ONLY_ON_PRIMARY)
return; {
meta_window_update_on_all_workspaces (window); meta_window_update_on_all_workspaces (window);
meta_window_queue (window, META_QUEUE_CALC_SHOWING); 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 static void
meta_window_finalize (GObject *object) meta_window_finalize (GObject *object)