diff --git a/unix/x0vncserver/PollingManager.cxx b/unix/x0vncserver/PollingManager.cxx
index 9951883..81624a9 100644
--- a/unix/x0vncserver/PollingManager.cxx
+++ b/unix/x0vncserver/PollingManager.cxx
@@ -48,7 +48,7 @@
 //
 
 PollingManager::PollingManager(Display *dpy, const Image *image,
-                               ImageFactory *factory,
+                               ImageFactory &factory,
                                int offsetLeft, int offsetTop)
   : m_dpy(dpy),
     m_image(image),
@@ -66,8 +66,8 @@
   // Create additional images used in polling algorithm, warn if
   // underlying class names are different from the class name of the
   // primary image.
-  m_rowImage = factory->newImage(m_dpy, m_width, 1);
-  m_columnImage = factory->newImage(m_dpy, 1, m_height);
+  m_rowImage = factory.newImage(m_dpy, m_width, 1);
+  m_columnImage = factory.newImage(m_dpy, 1, m_height);
   const char *primaryImgClass = m_image->className();
   const char *rowImgClass = m_rowImage->className();
   const char *columnImgClass = m_columnImage->className();
diff --git a/unix/x0vncserver/PollingManager.h b/unix/x0vncserver/PollingManager.h
index 779e88b..2ed9ff5 100644
--- a/unix/x0vncserver/PollingManager.h
+++ b/unix/x0vncserver/PollingManager.h
@@ -38,19 +38,10 @@
 
 public:
 
-  PollingManager(Display *dpy, const Image *image, ImageFactory *factory,
+  PollingManager(Display *dpy, const Image *image, ImageFactory &factory,
                  int offsetLeft = 0, int offsetTop = 0);
   virtual ~PollingManager();
 
-  // 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,
-  // so we don't do that any more. However, pointer position may be a
-  // useful hint and might be used in future code, so we do not remove
-  // these functions, just in case.
-  void setPointerPos(const Point &pos) {}
-  void unsetPointerPos() {}
-
   void poll(VNCServer *server);
 
 protected:
diff --git a/unix/x0vncserver/XPixelBuffer.cxx b/unix/x0vncserver/XPixelBuffer.cxx
index ed22508..f691c57 100644
--- a/unix/x0vncserver/XPixelBuffer.cxx
+++ b/unix/x0vncserver/XPixelBuffer.cxx
@@ -30,6 +30,7 @@
 XPixelBuffer::XPixelBuffer(Display *dpy, ImageFactory &factory,
                            const Rect &rect, ColourMap* cm)
   : FullFramePixelBuffer(),
+    m_poller(0),
     m_dpy(dpy),
     m_image(factory.newImage(dpy, rect.width(), rect.height())),
     m_offsetLeft(rect.tl.x),
@@ -60,10 +61,15 @@
 
   // Get initial screen image from the X display.
   m_image->get(DefaultRootWindow(m_dpy), m_offsetLeft, m_offsetTop);
+
+  // PollingManager will detect changed pixels.
+  m_poller = new PollingManager(dpy, getImage(), factory,
+                                m_offsetLeft, m_offsetTop);
 }
 
 XPixelBuffer::~XPixelBuffer()
 {
+  delete m_poller;
   delete m_image;
 }
 
diff --git a/unix/x0vncserver/XPixelBuffer.h b/unix/x0vncserver/XPixelBuffer.h
index 3632f80..29ae94a 100644
--- a/unix/x0vncserver/XPixelBuffer.h
+++ b/unix/x0vncserver/XPixelBuffer.h
@@ -24,7 +24,9 @@
 #define __XPIXELBUFFER_H__
 
 #include <rfb/PixelBuffer.h>
+#include <rfb/VNCServer.h>
 #include <x0vncserver/Image.h>
+#include <x0vncserver/PollingManager.h>
 
 using namespace rfb;
 
@@ -40,7 +42,10 @@
   virtual ~XPixelBuffer();
 
   // Provide access to the underlying Image object.
-  virtual const Image *getImage() const { return m_image; }
+  const Image *getImage() const { return m_image; }
+
+  // Detect changed pixels, notify the server.
+  inline void poll(VNCServer *server) { m_poller->poll(server); }
 
   // Override PixelBuffer::getStride().
   virtual int getStride() const { return m_stride; }
@@ -49,6 +54,8 @@
   virtual void grabRegion(const rfb::Region& region);
 
 protected:
+  PollingManager *m_poller;
+
   Display *m_dpy;
   Image* m_image;
   int m_offsetLeft;
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx
index b63e937..2fe599e 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 @@
 {
 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 @@
     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 @@
     running = false;
 
     delete pb;
-    delete pollmgr;
-
     pb = 0;
-    pollmgr = 0;
   }
 
   inline bool isRunning() {
@@ -208,12 +200,11 @@
   }
 
   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 @@
   Geometry* geometry;
   XPixelBuffer* pb;
   VNCServer* server;
-  PollingManager* pollmgr;
   int oldButtonMask;
   bool haveXtest;
   int maxButtons;
