From 20547673d2340b2438e85bef199177c972ce6713 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 13 Jun 2014 11:26:21 +0000 Subject: [PATCH] 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 --- unix/x0vncserver/x0vncserver.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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) { -- 2.39.5