summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-05-13 13:58:20 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2015-05-16 22:15:31 +0100
commitf696867c897f1f879c4c03e19690e8217db4d81e (patch)
treeee65e194579b017f2f3db46ed458713336567214 /tools
parent63c43dfa63f4a5ecfa5a00f8b802c56f40d2908c (diff)
intel-virtual-output: Record the cursor shape in the DBG log
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtual.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/virtual.c b/tools/virtual.c
index 75bd7015..f5cba1a0 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1654,6 +1654,26 @@ static void display_load_visible_cursor(struct display *display, XFixesCursorIma
dst = display->cursor_image.pixels;
while (n--)
*dst++ = *src++;
+
+ if (verbose & CURSOR) {
+ int x, y;
+
+ printf("%s cursor image %dx%d, serial %d:\n",
+ DisplayString(display->dpy),
+ cur->width, cur->height,
+ display->cursor_serial);
+ dst = display->cursor_image.pixels;
+ for (y = 0; y < cur->height; y++) {
+ for (x = 0; x < cur->width; x++) {
+ if (x == cur->xhot && y == cur->yhot)
+ printf("+");
+ else
+ printf("%c", *dst ? *dst >> 24 >= 127 ? 'x' : '.' : ' ');
+ dst++;
+ }
+ printf("\n");
+ }
+ }
}
static void display_cursor_move(struct display *display, int x, int y, int visible)