diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-06-13 11:26:21 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-06-25 14:45:52 +0200 |
commit | 20547673d2340b2438e85bef199177c972ce6713 (patch) | |
tree | 976d40c4de29797a42e182439a8be5b313626617 | |
parent | a7b728a8230a18f515509a17d1cb11566f07c9f8 (diff) | |
download | tigervnc-20547673d2340b2438e85bef199177c972ce6713.tar.gz tigervnc-20547673d2340b2438e85bef199177c972ce6713.zip |
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
-rw-r--r-- | unix/x0vncserver/x0vncserver.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
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) { |