summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2005-01-07 05:19:26 +0000
committerElijah Newren <newren@src.gnome.org>2005-01-07 05:19:26 +0000
commitc0924402d400d896f31932bc6e226ec166d2aed3 (patch)
treeb785b5fa5009bf33528f53af0220fc9dcace1b4a
parent7549d1511ab76164ac7937660ae9e02e5b93f8dd (diff)
downloadmetacity-c0924402d400d896f31932bc6e226ec166d2aed3.tar.gz
metacity-c0924402d400d896f31932bc6e226ec166d2aed3.tar.bz2
Make sure the save session dialog appears focused. Fixes #162983.
2005-01-06 Elijah Newren <newren@gmail.com> Make sure the save session dialog appears focused. Fixes #162983. * src/session.c (warn_about_lame_clients_and_finish_inter): Get a timestamp by explicit request from Xserver, since none is available otherwise.
-rw-r--r--ChangeLog8
-rw-r--r--src/session.c23
2 files changed, 30 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 99ba886..41e0d01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-01-06 Elijah Newren <newren@gmail.com>
+
+ Make sure the save session dialog appears focused. Fixes #162983.
+
+ * src/session.c (warn_about_lame_clients_and_finish_inter): Get a
+ timestamp by explicit request from Xserver, since none is
+ available otherwise.
+
2005-01-06 Leena Gunda <leena.gunda@wipro.com>
* src/window.c (meta_window_unmaximize): Restore the wireframe
diff --git a/src/session.c b/src/session.c
index 1e86c14..12a0626 100644
--- a/src/session.c
+++ b/src/session.c
@@ -23,6 +23,7 @@
#include <config.h>
#include "session.h"
+#include <X11/Xatom.h>
#include <time.h>
@@ -1888,7 +1889,27 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
lame = g_slist_sort (lame, (GCompareFunc) windows_cmp_by_title);
- timestamp = 0;
+
+ {
+ XEvent property_event;
+ MetaDisplay *display;
+
+ display = meta_displays_list ()->data;
+
+ /* Using the property XA_PRIMARY because it's safe; nothing
+ * would use it as a property. The type doesn't matter.
+ */
+ XChangeProperty (display->xdisplay,
+ display->leader_window,
+ XA_PRIMARY, XA_STRING, 8,
+ PropModeAppend, NULL, 0);
+ XWindowEvent (display->xdisplay,
+ display->leader_window,
+ PropertyChangeMask,
+ &property_event);
+
+ timestamp = property_event.xproperty.time;
+ }
sprintf (timestampbuf, "%lu", timestamp);
len = g_slist_length (lame);