Merge branch 'master' into 'feature/KASM-3806_hw3d'
# Conflicts: # builder/build.sh
This commit is contained in:
@@ -182,6 +182,11 @@ XserverDesktop::queryConnection(network::Socket* sock,
|
||||
return rfb::VNCServerST::PENDING;
|
||||
}
|
||||
|
||||
void XserverDesktop::clearLocalClipboards()
|
||||
{
|
||||
vncClearLocalClipboards();
|
||||
}
|
||||
|
||||
void XserverDesktop::announceClipboard(bool available)
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -61,6 +61,7 @@ public:
|
||||
void setFramebuffer(int w, int h, void* fbptr, int stride);
|
||||
void refreshScreenLayout();
|
||||
void requestClipboard();
|
||||
void clearLocalClipboards();
|
||||
void announceClipboard(bool available);
|
||||
void clearBinaryClipboardData();
|
||||
void sendBinaryClipboardData(const char* mime, const unsigned char *data,
|
||||
|
||||
@@ -763,3 +763,42 @@ static void vncClientStateCallback(CallbackListPtr * l,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void vncClearLocalClipboard(Atom selection)
|
||||
{
|
||||
SelectionInfoRec info;
|
||||
Selection *pSel;
|
||||
int rc;
|
||||
|
||||
rc = dixLookupSelection(&pSel, selection, serverClient, DixSetAttrAccess);
|
||||
if (rc != Success)
|
||||
return;
|
||||
|
||||
if (pSel->client && (pSel->client != serverClient)) {
|
||||
xEvent event = {
|
||||
.u.selectionClear.time = currentTime.milliseconds,
|
||||
.u.selectionClear.window = pSel->window,
|
||||
.u.selectionClear.atom = pSel->selection
|
||||
};
|
||||
event.u.u.type = SelectionClear;
|
||||
WriteEventsToClient(pSel->client, 1, &event);
|
||||
}
|
||||
|
||||
pSel->lastTimeChanged = currentTime;
|
||||
pSel->window = None;
|
||||
pSel->pWin = NULL;
|
||||
pSel->client = NullClient;
|
||||
|
||||
LOG_DEBUG("Cleared %s selection", NameForAtom(selection));
|
||||
|
||||
info.selection = pSel;
|
||||
info.client = serverClient;
|
||||
info.kind = SelectionSetOwner;
|
||||
CallCallbacks(&SelectionCallback, &info);
|
||||
}
|
||||
|
||||
void vncClearLocalClipboards()
|
||||
{
|
||||
vncClearLocalClipboard(xaPRIMARY);
|
||||
vncClearLocalClipboard(xaCLIPBOARD);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ void vncSelectionInit(void);
|
||||
|
||||
void vncHandleClipboardAnnounce(int available);
|
||||
void vncHandleClipboardAnnounceBinary(const unsigned num, const char mimes[][32]);
|
||||
void vncClearLocalClipboards();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user