summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2010-01-05 17:29:06 -0500
committerThomas Thurman <tthurman@gnome.org>2010-01-05 17:29:06 -0500
commit30e63a724402733dd57fe8b68746e8e5a31578ec (patch)
tree3b9bc3922edf67555105c584fa077fe56638e715 /src
parent575f5204618acae7380305f35290f09ef1f8ac9f (diff)
downloadmetacity-30e63a724402733dd57fe8b68746e8e5a31578ec.tar.gz
metacity-30e63a724402733dd57fe8b68746e8e5a31578ec.tar.bz2
store timestamp for _NET_WM_CM_SX selection
Diffstat (limited to 'src')
-rw-r--r--src/core/screen-private.h1
-rw-r--r--src/core/screen.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/src/core/screen-private.h b/src/core/screen-private.h
index d9de2f5..8430f19 100644
--- a/src/core/screen-private.h
+++ b/src/core/screen-private.h
@@ -113,6 +113,7 @@ struct _MetaScreen
#ifdef HAVE_COMPOSITE_EXTENSIONS
Window wm_cm_selection_window;
+ guint32 wm_cm_timestamp;
#endif
guint work_area_idle;
diff --git a/src/core/screen.c b/src/core/screen.c
index e2e3f56..f202947 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -2791,11 +2791,14 @@ meta_screen_set_cm_selection (MetaScreen *screen)
char selection[32];
Atom a;
+ screen->wm_cm_timestamp = meta_display_get_current_time_roundtrip (
+ screen->display);
+
g_snprintf (selection, sizeof(selection), "_NET_WM_CM_S%d", screen->number);
meta_verbose ("Setting selection: %s\n", selection);
a = XInternAtom (screen->display->xdisplay, selection, FALSE);
XSetSelectionOwner (screen->display->xdisplay, a,
- screen->wm_cm_selection_window, CurrentTime);
+ screen->wm_cm_selection_window, screen->wm_cm_timestamp);
}
void
@@ -2806,6 +2809,7 @@ meta_screen_unset_cm_selection (MetaScreen *screen)
g_snprintf (selection, sizeof(selection), "_NET_WM_CM_S%d", screen->number);
a = XInternAtom (screen->display->xdisplay, selection, FALSE);
- XSetSelectionOwner (screen->display->xdisplay, a, None, CurrentTime);
+ XSetSelectionOwner (screen->display->xdisplay, a,
+ None, screen->wm_cm_timestamp);
}
#endif /* HAVE_COMPOSITE_EXTENSIONS */