[sawfish] Store startup time stamp in a global variable.
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish] Store startup time stamp in a global variable.
- Date: Mon, 27 Dec 2010 20:38:26 +0000 (UTC)
commit 9db77cd2adf83d106bede5ec460dd75bbaaf0855
Author: Timo Korvola <tkorvola iki fi>
Date: Thu Sep 10 23:48:18 2009 +0300
Store startup time stamp in a global variable.
It may be useful later when replying to selection requests
(startup time = time when manager selection was acquired).
src/display.c | 6 +++++-
src/sawfish_subrs.h | 1 +
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/display.c b/src/display.c
index ebc2bd8..0724509 100644
--- a/src/display.c
+++ b/src/display.c
@@ -58,6 +58,9 @@ Atom xa_wm_state, xa_wm_change_state, xa_wm_protocols, xa_wm_delete_window,
xa_wm_colormap_windows, xa_wm_take_focus, xa_compound_text,
xa_wm_net_name, xa_wm_net_icon_name, xa_utf8_string, xa_manager, xa_wm_sn;
+/* Time when the manager selection was acquired. */
+Time startup_time;
+
DEFSYM(display_name, "display-name");
DEFSYM(canonical_display_name, "canonical-display-name");
@@ -292,7 +295,7 @@ choose_visual (void)
static void
acquire_manager_selection(Window sel_owner)
{
- Time time = get_server_timestamp();
+ startup_time = get_server_timestamp();
XClientMessageEvent cm;
if (sel_owner != None)
{
@@ -318,6 +321,7 @@ acquire_manager_selection(Window sel_owner)
if (sel_owner != None)
{
fputs ("Waiting for the previous manager to go away.\n", strerr);
+ /* This may hang. */
for (;;)
{
XEvent ev;
diff --git a/src/sawfish_subrs.h b/src/sawfish_subrs.h
index c09a9cc..9e67ee6 100644
--- a/src/sawfish_subrs.h
+++ b/src/sawfish_subrs.h
@@ -59,6 +59,7 @@ extern Atom xa_wm_state, xa_wm_change_state, xa_wm_protocols,
xa_wm_delete_window, xa_wm_colormap_windows, xa_wm_take_focus,
xa_compound_text, xa_wm_net_name, xa_wm_net_icon_name, xa_utf8_string,
xa_manager, xa_wm_sn;
+extern Time startup_time;
extern int shape_event_base, shape_error_base;
extern repv Qdisplay_name, Qcanonical_display_name;
extern bool sys_init (char *program_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]