diff options
author | Constantin Kaplinsky <const@tightvnc.com> | 2008-06-04 05:57:06 +0000 |
---|---|---|
committer | Constantin Kaplinsky <const@tightvnc.com> | 2008-06-04 05:57:06 +0000 |
commit | 303433aae8f929bda55edcea911382e236973ef1 (patch) | |
tree | ff8f68a8337771fa7c334db3282de88ed9684e9b /unix/x0vncserver/x0vncserver.cxx | |
parent | 8a85c49dcbf1b15bc633a14ffef293ca6b7753bf (diff) | |
download | tigervnc-303433aae8f929bda55edcea911382e236973ef1.tar.gz tigervnc-303433aae8f929bda55edcea911382e236973ef1.zip |
Refactoring: now PollingManager is owned by XPixelBuffer. No other classes
know about PollingManager.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2576 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/x0vncserver/x0vncserver.cxx')
-rw-r--r-- | unix/x0vncserver/x0vncserver.cxx | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx index b63e9379..2fe599e8 100644 --- a/unix/x0vncserver/x0vncserver.cxx +++ b/unix/x0vncserver/x0vncserver.cxx @@ -47,7 +47,6 @@ #include <x0vncserver/Geometry.h> #include <x0vncserver/Image.h> #include <x0vncserver/XPixelBuffer.h> -#include <x0vncserver/PollingManager.h> #include <x0vncserver/PollingScheduler.h> // XXX Lynx/OS 2.3: protos for select(), bzero() @@ -138,7 +137,7 @@ class XDesktop : public SDesktop, public ColourMap { public: XDesktop(Display* dpy_, Geometry *geometry_) - : dpy(dpy_), geometry(geometry_), pb(0), server(0), pollmgr(0), + : dpy(dpy_), geometry(geometry_), pb(0), server(0), oldButtonMask(0), haveXtest(false), maxButtons(0), running(false) { #ifdef HAVE_XTEST @@ -186,10 +185,6 @@ public: server = vs; server->setPixelBuffer(pb); - // Create polling manager object for detection of pixel changes. - pollmgr = new PollingManager(dpy, pb->getImage(), &factory, - geometry->offsetLeft(), - geometry->offsetTop()); running = true; } @@ -197,10 +192,7 @@ public: running = false; delete pb; - delete pollmgr; - pb = 0; - pollmgr = 0; } inline bool isRunning() { @@ -208,12 +200,11 @@ public: } inline void poll() { - if (pollmgr) - pollmgr->poll(server); + if (pb) + pb->poll(server); } virtual void pointerEvent(const Point& pos, int buttonMask) { - pollmgr->setPointerPos(pos); #ifdef HAVE_XTEST if (!haveXtest) return; XTestFakeMotionEvent(dpy, DefaultScreen(dpy), @@ -270,7 +261,6 @@ protected: Geometry* geometry; XPixelBuffer* pb; VNCServer* server; - PollingManager* pollmgr; int oldButtonMask; bool haveXtest; int maxButtons; |