diff options
author | Pierre Ossman <ossman@cendio.se> | 2017-09-22 16:43:50 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-09-22 16:43:50 +0200 |
commit | b000ff13275cd9df34494553ba49746a85e63072 (patch) | |
tree | ac8f7e11adc792940e8e12374f324e7b9c044477 /win | |
parent | aceb4e7bf702d5c26bad9e646854d69b68ee4d5a (diff) | |
download | tigervnc-b000ff13275cd9df34494553ba49746a85e63072.tar.gz tigervnc-b000ff13275cd9df34494553ba49746a85e63072.zip |
Get rid of getFbSize()/getDesktopSize() in common
It was only used by WinVNC, so push it there instead.
Diffstat (limited to 'win')
-rw-r--r-- | win/rfb_win32/SDisplay.h | 5 | ||||
-rw-r--r-- | win/winvnc/JavaViewer.cxx | 3 | ||||
-rw-r--r-- | win/winvnc/JavaViewer.h | 7 | ||||
-rw-r--r-- | win/winvnc/VNCServerWin32.cxx | 2 | ||||
-rw-r--r-- | win/winvnc/VNCServerWin32.h | 4 |
5 files changed, 15 insertions, 6 deletions
diff --git a/win/rfb_win32/SDisplay.h b/win/rfb_win32/SDisplay.h index 9892ed99..f36b2b73 100644 --- a/win/rfb_win32/SDisplay.h +++ b/win/rfb_win32/SDisplay.h @@ -68,7 +68,6 @@ namespace rfb { virtual void pointerEvent(const Point& pos, int buttonmask); virtual void keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down); virtual void clientCutText(const char* str, int len); - virtual Point getFbSize(); // -=- Clipboard @@ -87,6 +86,10 @@ namespace rfb { void setStatusLocation(bool* status) {statusLocation = status;} + // -=- Used (indirectly) by JavaViewer to get desktop size + + Point getFbSize(); + friend class SDisplayCore; static IntParameter updateMethod; diff --git a/win/winvnc/JavaViewer.cxx b/win/winvnc/JavaViewer.cxx index c9631229..e2e307e8 100644 --- a/win/winvnc/JavaViewer.cxx +++ b/win/winvnc/JavaViewer.cxx @@ -17,6 +17,7 @@ */ #include <winvnc/JavaViewer.h> +#include <winvnc/VNCServerWin32.h> #include <winvnc/resource.h> #include <rdr/MemInStream.h> #include <rfb/LogWriter.h> @@ -31,7 +32,7 @@ using namespace rfb; static rfb::LogWriter vlog("JavaViewerServer"); -JavaViewerServer::JavaViewerServer(rfb::VNCServerST* svr) : server(svr) { +JavaViewerServer::JavaViewerServer(VNCServerWin32* svr) : server(svr) { } JavaViewerServer::~JavaViewerServer() { diff --git a/win/winvnc/JavaViewer.h b/win/winvnc/JavaViewer.h index ecda4d3e..79a39696 100644 --- a/win/winvnc/JavaViewer.h +++ b/win/winvnc/JavaViewer.h @@ -25,14 +25,15 @@ #define WINVNC_JAVA_VIEWER #include <rfb/HTTPServer.h> -#include <rfb/VNCServerST.h> #include <rdr/SubstitutingInStream.h> namespace winvnc { + class VNCServerWin32; + class JavaViewerServer : public rfb::HTTPServer, public rdr::Substitutor { public: - JavaViewerServer(rfb::VNCServerST* desktop); + JavaViewerServer(VNCServerWin32* desktop); virtual ~JavaViewerServer(); virtual rdr::InStream* getFile(const char* name, const char** contentType, @@ -46,7 +47,7 @@ namespace winvnc { } protected: int rfbPort; - rfb::VNCServerST* server; + VNCServerWin32* server; }; }; diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx index d86384da..b164c65f 100644 --- a/win/winvnc/VNCServerWin32.cxx +++ b/win/winvnc/VNCServerWin32.cxx @@ -63,7 +63,7 @@ VNCServerWin32::VNCServerWin32() CreateEvent(0, FALSE, FALSE, "Global\\SessionEventTigerVNC") : 0), vncServer(CStr(ComputerName().buf), &desktop), thread_id(-1), runServer(false), isDesktopStarted(false), - httpServer(&vncServer), config(&sockMgr), + httpServer(this), config(&sockMgr), rfbSock(&sockMgr), httpSock(&sockMgr), trayIcon(0), queryConnectDialog(0) { diff --git a/win/winvnc/VNCServerWin32.h b/win/winvnc/VNCServerWin32.h index f384bbeb..ed051dcf 100644 --- a/win/winvnc/VNCServerWin32.h +++ b/win/winvnc/VNCServerWin32.h @@ -78,6 +78,10 @@ namespace winvnc { bool setClientsStatus(rfb::ListConnInfo* LCInfo); + // Used by JavaViewerServer + const char* getName() {return vncServer.getName();} + rfb::Point getDesktopSize() {return desktop.getFbSize();} + protected: // VNCServerST::QueryConnectionHandler interface // Callback used to prompt user to accept or reject a connection. |