diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-02-13 18:10:57 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-02-18 15:43:05 +0000 |
commit | ab1652e62eaad26169a290f0f233091588b307d8 (patch) | |
tree | cced95a9c58baf70ee356b931b8222b566bb9e81 /dix/dispatch.c | |
parent | 1c856210dd86fdced5c341c4381268e92d32e7bf (diff) |
Empty Windows clipboard when X loses focus
At the moment, we only notice selection updates when the selection owner
changes. So, unfortunately, applications which already own a selection can
change that selection without us noticing.
For example, gitk (and probably all applications using Tk) only claim
the selection when it moves between controls, one can adjust the selection
within a control without any notice.
This simple fix assumes that whenever X gains focus, the selection will be
adjusted, so when we lose focus, we should clear the Windows clipboard.
This ensures Windows will ask for the contents to be rendered again if Windows
application asks for the content, ensuring they get the updated content.
(This is almost, but not quite right. If the selection isn't altered
while we have the focus, then we've destroyed what was on the clipboard
previously.)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'dix/dispatch.c')
0 files changed, 0 insertions, 0 deletions