Code refactoring: passing VNCServer pointer to PollingManager methods
instead of maintaining it as a member variable.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2569 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/x0vncserver/PollingManager.h b/unix/x0vncserver/PollingManager.h
index 97a158f..587e347 100644
--- a/unix/x0vncserver/PollingManager.h
+++ b/unix/x0vncserver/PollingManager.h
@@ -43,8 +43,6 @@
int offsetLeft = 0, int offsetTop = 0);
virtual ~PollingManager();
- void setVNCServer(VNCServer *s);
-
// Currently, these functions do nothing. In past versions, we used
// to poll area around the pointer if its position has been changed
// recently. But that rather decreased overal polling performance,
@@ -54,15 +52,14 @@
void setPointerPos(const Point &pos) {}
void unsetPointerPos() {}
- void poll();
+ void poll(VNCServer *server);
protected:
// Screen polling. Returns true if some changes were detected.
- bool pollScreen();
+ bool pollScreen(VNCServer *server);
Display *m_dpy;
- VNCServer *m_server;
const Image *m_image;
const int m_bytesPerPixel;
@@ -98,7 +95,7 @@
int checkRow(int x, int y, int w);
int checkColumn(int x, int y, int h, bool *pChangeFlags);
- int sendChanges();
+ int sendChanges(VNCServer *server);
// Check neighboring tiles and update m_changeFlags[].
void checkNeighbors();