Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions nx-X11/programs/Xserver/hw/nxagent/Events.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,14 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
nxagentDumpClipboardStat();
break;
}
case doClipboardBoth:
case doClipboardClient:
case doClipboardServer:
case doClipboardNone:
{
nxagentSwitchClipboardMode(ClipboardBoth + result - doClipboardBoth);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like that calculation since it is not self-explanatory. Please add at least a comment the thought behind this calculation. There's another location where I saw that same calculation, comment there too, please

break;
}
default:
{
FatalError("nxagentDispatchEvent: handleKeyPress returned unknown value\n");
Expand Down
6 changes: 5 additions & 1 deletion nx-X11/programs/Xserver/hw/nxagent/Events.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ enum HandleEventResult
doSwitchResizeMode,
doSwitchDeferMode,
doAutoGrab,
doDumpClipboard
doDumpClipboard,
doClipboardBoth,
doClipboardClient,
doClipboardServer,
doClipboardNone
};

extern CARD32 nxagentLastEventTime;
Expand Down