void XDesktop::stop() {
running = false;
+#ifdef HAVE_XTEST
// Delete added keycodes
deleteAddedKeysyms(dpy);
+#endif
#ifdef HAVE_XDAMAGE
if (haveDamage)
}
}
oldButtonMask = buttonMask;
+#else
+ (void)pos;
+ (void)buttonMask;
#endif
}
return keycode;
}
-#endif
KeyCode XDesktop::addKeysym(Display* dpy, KeySym keysym)
{
return keycode;
}
+#endif
void XDesktop::keyEvent(uint32_t keysym, uint32_t xtcode, bool down) {
vlog.debug("%d %s", keycode, down ? "down" : "up");
XTestFakeKeyEvent(dpy, keycode, down, CurrentTime);
+#else
+ (void)keysym;
+ (void)xtcode;
+ (void)down;
#endif
}
virtual void queryConnection(network::Socket* sock,
const char* userName);
virtual void pointerEvent(const rfb::Point& pos, int buttonMask);
- KeyCode XkbKeysymToKeycode(Display* dpy, KeySym keysym);
- KeyCode addKeysym(Display* dpy, KeySym keysym);
- void deleteAddedKeysyms(Display* dpy);
- KeyCode keysymToKeycode(Display* dpy, KeySym keysym);
virtual void keyEvent(uint32_t keysym, uint32_t xtcode, bool down);
virtual void clientCutText(const char* str);
virtual unsigned int setScreenLayout(int fb_width, int fb_height,
unsigned ledState;
const unsigned short *codeMap;
unsigned codeMapLen;
+
+protected:
+#ifdef HAVE_XTEST
+ KeyCode XkbKeysymToKeycode(Display* dpy, KeySym keysym);
+ KeyCode addKeysym(Display* dpy, KeySym keysym);
+ void deleteAddedKeysyms(Display* dpy);
+ KeyCode keysymToKeycode(Display* dpy, KeySym keysym);
+#endif
bool setCursor();
rfb::ScreenSet computeScreenLayout();
};