]> source.dussan.org Git - tigervnc.git/commitdiff
Accidentally removed some code in the previous commit.
authorPierre Ossman <ossman@cendio.se>
Fri, 13 Jun 2014 11:26:21 +0000 (11:26 +0000)
committerPierre Ossman <ossman@cendio.se>
Wed, 25 Jun 2014 12:45:52 +0000 (14:45 +0200)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5186 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/x0vncserver/x0vncserver.cxx

index f2067fba07a2d1b41675907266589dfb285ab6cd..165441fed576325db826faa4023f8023cf05340b 100644 (file)
@@ -269,6 +269,20 @@ public:
     return Point(pb->width(), pb->height());
   }
 
+  // -=- ColourMap callbacks
+  virtual void lookup(int index, int* r, int* g, int* b) {
+    XColor xc;
+    xc.pixel = index;
+    if (index < DisplayCells(dpy,DefaultScreen(dpy))) {
+      XQueryColor(dpy, DefaultColormap(dpy,DefaultScreen(dpy)), &xc);
+    } else {
+      xc.red = xc.green = xc.blue = 0;
+    }
+    *r = xc.red;
+    *g = xc.green;
+    *b = xc.blue;
+  }
+
   // -=- TXGlobalEventHandler interface
 
   virtual bool handleGlobalEvent(XEvent* ev) {