diff options
| author | Ray Strode <rstrode@redhat.com> | 2010-02-12 19:16:33 (GMT) |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2010-02-12 21:00:35 (GMT) |
| commit | d4dcbd65a2df3c093c4e3a74bbbc75383eb9eadb (patch) | |
| tree | 65e4e2ceb28fec42a07ac823f52b89e989cf3bb2 | |
| parent | 271ae93d7b140b8ba40d77f9e4ce894e5fd1b554 (diff) | |
| download | gnome-screensaver-d4dcbd65a2df3c093c4e3a74bbbc75383eb9eadb.zip gnome-screensaver-d4dcbd65a2df3c093c4e3a74bbbc75383eb9eadb.tar.xz | |
Update which monitor the unlock dialog is on when layout changes
Before we were moving the grabs but not the unlock dialog.
Everything needs to be in lock step, otherwise:
1) The unlock dialog won't get focus and will fail to work generally
2) Assumptions in the code about the two being in lock-step will
prove incorrect leading to the grabs getting dropped entirely.
Part of fix for
https://bugzilla.gnome.org/show_bug.cgi?id=609789
CVE-2010-0422
| -rw-r--r-- | src/gs-manager.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gs-manager.c b/src/gs-manager.c index 0a1b670..c4e2076 100644 --- a/src/gs-manager.c +++ b/src/gs-manager.c @@ -1491,10 +1491,24 @@ on_screen_monitors_changed (GdkScreen *screen, n_monitors); if (n_monitors > n_windows) { + + /* Tear down unlock dialog in case we want to move it + * to a new monitor + */ + l = manager->priv->windows; + while (l != NULL) { + gs_window_cancel_unlock_request (GS_WINDOW (l->data)); + l = l->next; + } + /* add more windows */ for (i = n_windows; i < n_monitors; i++) { gs_manager_create_window_for_monitor (manager, screen, i); } + + /* And put unlock dialog up where ever it's supposed to be + */ + gs_manager_request_unlock (manager); } else { gdk_x11_grab_server (); |