diff options
author | Elijah Newren <newren gmail com> | 2007-03-31 05:30:11 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2007-03-31 05:30:11 +0000 |
commit | 395408adbbe23d2a4dd9869d85561ccc51b42447 (patch) | |
tree | 7ecdfb1e7ec102fc9e7eac1b524096e3696c822a | |
parent | b4623d22cbf8a3ae53edaaa898d58a47401ad659 (diff) | |
download | metacity-395408adbbe23d2a4dd9869d85561ccc51b42447.tar.gz |
create a dedicated timestamp pinging window instead of reusing
2007-03-30 Elijah Newren <newren gmail com>
* src/display.c (meta_display_open,
meta_display_get_current_time_roundtrip):
* src/display.h (struct _MetaDisplay):
create a dedicated timestamp pinging window instead of reusing
display->leader_window; see bug 354213 comments 24-30
svn path=/branches/gnome-2-18/; revision=3135
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/display.c | 12 | ||||
-rw-r--r-- | src/display.h | 1 |
3 files changed, 19 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2007-03-30 Elijah Newren <newren gmail com> + + * src/display.c (meta_display_open, + meta_display_get_current_time_roundtrip): + * src/display.h (struct _MetaDisplay): + create a dedicated timestamp pinging window instead of reusing + display->leader_window; see bug 354213 comments 24-30 + 2007-03-12 Elijah Newren <newren gmail com> * configure.in: post-release version bump to 2.18.1 diff --git a/src/display.c b/src/display.c index 754f0192..4431b8a0 100644 --- a/src/display.c +++ b/src/display.c @@ -502,6 +502,7 @@ meta_display_open (void) * created in screen_new */ display->leader_window = None; + display->timestamp_pinging_window = None; display->xinerama_cache_invalidated = TRUE; @@ -685,6 +686,13 @@ meta_display_open (void) timestamp = event.xproperty.time; } + /* Make a little window used only for pinging the server for timestamps; note + * that meta_create_offscreen_window already selects for PropertyChangeMask. + */ + display->timestamp_pinging_window = + meta_create_offscreen_window (display->xdisplay, + DefaultRootWindow (display->xdisplay)); + display->last_focus_time = timestamp; display->last_user_time = timestamp; display->compositor = NULL; @@ -1192,11 +1200,11 @@ meta_display_get_current_time_roundtrip (MetaDisplay *display) * would use it as a property. The type doesn't matter. */ XChangeProperty (display->xdisplay, - display->leader_window, + display->timestamp_pinging_window, XA_PRIMARY, XA_STRING, 8, PropModeAppend, NULL, 0); XWindowEvent (display->xdisplay, - display->leader_window, + display->timestamp_pinging_window, PropertyChangeMask, &property_event); diff --git a/src/display.h b/src/display.h index 1d837a4f..74ad4d25 100644 --- a/src/display.h +++ b/src/display.h @@ -85,6 +85,7 @@ struct _MetaDisplay Display *xdisplay; Window leader_window; + Window timestamp_pinging_window; Atom atom_net_wm_name; Atom atom_wm_protocols; |