diff options
author | Pierre Ossman <ossman@cendio.se> | 2017-09-15 14:23:34 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-09-15 14:23:34 +0200 |
commit | 61a75ef8249ab86ef3e61f7081b15b382e216bbb (patch) | |
tree | d95513f25d5f96c9d1ff6c8de4b96352821a0efb /unix | |
parent | d092f05f0d1fe8d3955acfdf4d4babdb408d7be7 (diff) | |
download | tigervnc-61a75ef8249ab86ef3e61f7081b15b382e216bbb.tar.gz tigervnc-61a75ef8249ab86ef3e61f7081b15b382e216bbb.zip |
Only select XFixes event once
We never un-select it, and it's not a problem if we get extra ones so
register it once right away.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/x0vncserver/x0vncserver.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx index d3042db0..b844a534 100644 --- a/unix/x0vncserver/x0vncserver.cxx +++ b/unix/x0vncserver/x0vncserver.cxx @@ -163,8 +163,8 @@ public: XDesktop(Display* dpy_, Geometry *geometry_) : dpy(dpy_), geometry(geometry_), pb(0), server(0), oldButtonMask(0), haveXtest(false), haveDamage(false), - haveXfixes(false), maxButtons(0), running(false), - ledMasks(), ledState(0), codeMap(0), codeMapLen(0) + maxButtons(0), running(false), ledMasks(), ledState(0), + codeMap(0), codeMapLen(0) { int major, minor; @@ -257,7 +257,8 @@ public: int xfixesErrorBase; if (XFixesQueryExtension(dpy, &xfixesEventBase, &xfixesErrorBase)) { - haveXfixes = true; + XFixesSelectCursorInput(dpy, DefaultRootWindow(dpy), + XFixesDisplayCursorNotifyMask); } else { #endif vlog.info("XFIXES extension not present"); @@ -305,13 +306,6 @@ public: } #endif -#ifdef HAVE_XFIXES - if (haveXfixes) { - XFixesSelectCursorInput(dpy, DefaultRootWindow(dpy), - XFixesDisplayCursorNotifyMask); - } -#endif - server->setLEDState(ledState); running = true; @@ -531,7 +525,6 @@ protected: int oldButtonMask; bool haveXtest; bool haveDamage; - bool haveXfixes; int maxButtons; std::map<KeySym, KeyCode> pressedKeys; bool running; |