diff options
author | Gaurav Ujjwal <gujjwal00@gmail.com> | 2024-09-25 21:21:26 +0530 |
---|---|---|
committer | Gaurav Ujjwal <gujjwal00@gmail.com> | 2024-09-25 21:33:13 +0530 |
commit | c23be952f50ba34c49134b6280ce503f154dc9bc (patch) | |
tree | d045ff81e09f2fbfb9cd4d593470197a633188ba /unix/x0vncserver/XDesktop.h | |
parent | 2d5636e8c8dca77c0c52924eb931a79ccf731911 (diff) | |
download | tigervnc-c23be952f50ba34c49134b6280ce503f154dc9bc.tar.gz tigervnc-c23be952f50ba34c49134b6280ce503f154dc9bc.zip |
Add clipboard support to x0vncserver
Diffstat (limited to 'unix/x0vncserver/XDesktop.h')
-rw-r--r-- | unix/x0vncserver/XDesktop.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/unix/x0vncserver/XDesktop.h b/unix/x0vncserver/XDesktop.h index cf374fb9..cadc695f 100644 --- a/unix/x0vncserver/XDesktop.h +++ b/unix/x0vncserver/XDesktop.h @@ -32,6 +32,8 @@ #include <vncconfig/QueryConnectDialog.h> +#include "XSelection.h" + class Geometry; class XPixelBuffer; @@ -46,7 +48,8 @@ struct AddedKeySym class XDesktop : public rfb::SDesktop, public TXGlobalEventHandler, - public QueryResultCallback + public QueryResultCallback, + public XSelectionHandler { public: XDesktop(Display* dpy_, Geometry *geometry); @@ -64,6 +67,13 @@ public: void keyEvent(uint32_t keysym, uint32_t xtcode, bool down) override; unsigned int setScreenLayout(int fb_width, int fb_height, const rfb::ScreenSet& layout) override; + void handleClipboardRequest() override; + void handleClipboardAnnounce(bool available) override; + void handleClipboardData(const char* data) override; + + // -=- XSelectionHandler interface + void handleXSelectionAnnounce(bool available) override; + void handleXSelectionData(const char* data) override; // -=- TXGlobalEventHandler interface bool handleGlobalEvent(XEvent* ev) override; @@ -79,6 +89,7 @@ protected: rfb::VNCServer* server; QueryConnectDialog* queryConnectDialog; network::Socket* queryConnectSock; + XSelection selection; uint8_t oldButtonMask; bool haveXtest; bool haveDamage; |