diff options
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 30b781590..3e396d2c4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -2533,13 +2533,19 @@ Bool nxagentInitClipboard(WindowPtr pWin) * claim the ownership. Note that we report our serverWindow as * owner, not the real window! */ - if (IS_INTERNAL_OWNER(index) && lastSelectionOwner[index].window) - { - XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[index].remSelection, serverWindow, CurrentTime); - } + if (IS_INTERNAL_OWNER(index) && lastSelectionOwner[index].window) + { + /* remSelection has already be adjusted above */ + XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[index].remSelection, serverWindow, CurrentTime); + } + /* + * FIXME: Shouldn't we reset lastServers[index].* and + * lastClients[index].* here? Problem is that (internal) + * clients might still be waiting for answers. Should reply + * with failure then + */ } } - /* FIXME: Shouldn't we reset lastServers[index].* and lastClients[index].* here? */ } else { |