summaryrefslogtreecommitdiffstats
path: root/x11vnc/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/cursor.c')
-rw-r--r--x11vnc/cursor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/x11vnc/cursor.c b/x11vnc/cursor.c
index 2409872..7ac0302 100644
--- a/x11vnc/cursor.c
+++ b/x11vnc/cursor.c
@@ -41,6 +41,7 @@ so, delete this exception statement from your version.
#include "macosx.h"
int xfixes_present = 0;
+int xfixes_first_initialized = 0;
int use_xfixes = 1;
int got_xfixes_cursor_notify = 0;
int cursor_changes = 0;
@@ -984,6 +985,7 @@ static void tree_descend_cursor(int *depth, Window *w, win_str_info_t *winfo) {
void initialize_xfixes(void) {
#if LIBVNCSERVER_HAVE_LIBXFIXES
if (xfixes_present) {
+ xfixes_first_initialized = 1;
X_LOCK;
if (use_xfixes) {
XFixesSelectCursorInput(dpy, rootwin,
@@ -1319,6 +1321,9 @@ static int get_exact_cursor(int init) {
if (last_idx) {
which = last_idx;
}
+ if (! xfixes_first_initialized) {
+ return which;
+ }
if (! got_xfixes_cursor_notify && xfixes_base_event_type) {
/* try again for XFixesCursorNotify event */