summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-09-06 00:30:53 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-09-06 00:30:53 +0100
commit3c5caaf0a98c88f6d39be9e78f8427f05975cb0e (patch)
tree179918c3f87fae29f79b2051fddac9bec7545d09 /tools
parent91b1f77da59ab7951e5d9aa09cbc0d2335d4c62a (diff)
intel-virtual-output: Only wake up for a change in a visible cursor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtual.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/virtual.c b/tools/virtual.c
index 5decd896..9b6b730c 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1071,9 +1071,10 @@ static void display_load_visible_cursor(struct display *display, XFixesCursorIma
DBG(("%s marking cursor changed\n", DisplayString(display->dpy)));
display->cursor_moved++;
- display->cursor_visible += display->cursor != display->invisible_cursor;
-
- context_enable_timer(display->ctx);
+ if (display->cursor != display->invisible_cursor) {
+ display->cursor_visible++;
+ context_enable_timer(display->ctx);
+ }
}
static void display_cursor_move(struct display *display, int x, int y, int visible)
@@ -1107,7 +1108,6 @@ static void display_flush_cursor(struct display *display)
}
XWarpPointer(display->dpy, None, display->root, 0, 0, 0, 0, x, y);
- display_mark_flush(display);
cursor = None;
if (display->cursor_visible)
@@ -1119,6 +1119,8 @@ static void display_flush_cursor(struct display *display)
display->cursor = cursor;
}
+ display_mark_flush(display);
+
display->cursor_moved = 0;
display->cursor_visible = 0;
}