store timestamp for _NET_WM_CM_SX selection
This commit is contained in:
parent
575f520461
commit
30e63a7244
@ -113,6 +113,7 @@ struct _MetaScreen
|
|||||||
|
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
Window wm_cm_selection_window;
|
Window wm_cm_selection_window;
|
||||||
|
guint32 wm_cm_timestamp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
guint work_area_idle;
|
guint work_area_idle;
|
||||||
|
@ -2791,11 +2791,14 @@ meta_screen_set_cm_selection (MetaScreen *screen)
|
|||||||
char selection[32];
|
char selection[32];
|
||||||
Atom a;
|
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);
|
g_snprintf (selection, sizeof(selection), "_NET_WM_CM_S%d", screen->number);
|
||||||
meta_verbose ("Setting selection: %s\n", selection);
|
meta_verbose ("Setting selection: %s\n", selection);
|
||||||
a = XInternAtom (screen->display->xdisplay, selection, FALSE);
|
a = XInternAtom (screen->display->xdisplay, selection, FALSE);
|
||||||
XSetSelectionOwner (screen->display->xdisplay, a,
|
XSetSelectionOwner (screen->display->xdisplay, a,
|
||||||
screen->wm_cm_selection_window, CurrentTime);
|
screen->wm_cm_selection_window, screen->wm_cm_timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2806,6 +2809,7 @@ meta_screen_unset_cm_selection (MetaScreen *screen)
|
|||||||
|
|
||||||
g_snprintf (selection, sizeof(selection), "_NET_WM_CM_S%d", screen->number);
|
g_snprintf (selection, sizeof(selection), "_NET_WM_CM_S%d", screen->number);
|
||||||
a = XInternAtom (screen->display->xdisplay, selection, FALSE);
|
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 */
|
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||||
|
Loading…
Reference in New Issue
Block a user