From: Pierre Ossman Date: Fri, 13 Jun 2014 11:26:21 +0000 (+0000) Subject: Accidentally removed some code in the previous commit. X-Git-Tag: v1.3.90~50 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=20547673d2340b2438e85bef199177c972ce6713;p=tigervnc.git Accidentally removed some code in the previous commit. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5186 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx index f2067fba..165441fe 100644 --- a/unix/x0vncserver/x0vncserver.cxx +++ b/unix/x0vncserver/x0vncserver.cxx @@ -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) {