[mutter] store timestamp for _NET_WM_CM_SX selection



commit ba4db78ed9fafe687e813376b356c87830431371
Author: Travis Watkins <amaranth ubuntu com>
Date:   Tue Jan 5 17:29:06 2010 -0500

    store timestamp for _NET_WM_CM_SX selection
    
    https://bugzilla.gnome.org/show_bug.cgi?id=530702

 src/core/screen-private.h |    1 +
 src/core/screen.c         |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/core/screen-private.h b/src/core/screen-private.h
index 594f537..52007cb 100644
--- a/src/core/screen-private.h
+++ b/src/core/screen-private.h
@@ -116,6 +116,7 @@ struct _MetaScreen
 #endif
 
   Window wm_cm_selection_window;
+  guint32 wm_cm_timestamp;
 
   guint work_area_later;
 
diff --git a/src/core/screen.c b/src/core/screen.c
index 21b4663..7ac65d0 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -3145,11 +3145,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
@@ -3160,7 +3163,8 @@ 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);
 }
 
 GList *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]