mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
5671f0a284
According to the XSetSelectionOwner libX11 documentation: [...] If the owner window it has specified in the request is later destroyed, the owner of the selection automatically reverts to None, but the last-change time is not affected. This is indeed visible through the selection_timestamp field in XFixesSelectionNotify events. Use this to check whether the selection time is recent-ish (thus likely coming from an explicit XSetSelectionOwner request) and honor the client intent by setting a "NULL" owner. If the selection time is too old, it's definitely an indication of the owner client being closed, the scenario where we do want the clipboard manager to take over. This fixes two usecases: - X11 LibreOffice / WPS clear the selection each time before copying its own content. Mutter's clipboard manager would see each of those as a hint to take over, competing with the client over selection ownership. This would simply no longer happen - Password managers may want to clear the selection, which would be frustrated by our clipboard manager. There's a slight window of opportunity for the heuristics to fail though, if a X11 client sets the selection and closes within 50ms, we would miss the clipboard manager taking over. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1206 |
||
---|---|---|
.. | ||
atomnames.h | ||
events.c | ||
events.h | ||
group-private.h | ||
group-props.c | ||
group-props.h | ||
group.c | ||
iconcache.c | ||
iconcache.h | ||
meta-selection-source-x11-private.h | ||
meta-selection-source-x11.c | ||
meta-startup-notification-x11.c | ||
meta-startup-notification-x11.h | ||
meta-x11-display-private.h | ||
meta-x11-display.c | ||
meta-x11-errors.c | ||
meta-x11-selection-input-stream-private.h | ||
meta-x11-selection-input-stream.c | ||
meta-x11-selection-output-stream-private.h | ||
meta-x11-selection-output-stream.c | ||
meta-x11-selection-private.h | ||
meta-x11-selection.c | ||
meta-x11-stack-private.h | ||
meta-x11-stack.c | ||
meta-x11-window-control.c | ||
meta-x11-window-control.h | ||
mutter-Xatomtype.h | ||
session.c | ||
session.h | ||
window-props.c | ||
window-props.h | ||
window-x11-private.h | ||
window-x11.c | ||
window-x11.h | ||
xprops.c | ||
xprops.h |