From ba387cf21f7d95987211f75d8024601e7d64e322 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Aug 2013 11:17:14 -0700 Subject: [PATCH] ephyr: Use host (HW) cursors by default. Unless you're working on the sw cursor rendering code, you surely want to have real hardware cursors. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Julien Cristau --- hw/kdrive/ephyr/ephyrinit.c | 8 ++++++-- hw/kdrive/ephyr/hostx.c | 8 ++++---- hw/kdrive/ephyr/hostx.h | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 7812dbea1..966e32181 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -114,7 +114,7 @@ ddxUseMsg(void) ErrorF("\nXephyr Option Usage:\n"); ErrorF("-parent Use existing window as Xephyr root win\n"); - ErrorF("-host-cursor Re-use exisiting X host server cursor\n"); + ErrorF("-sw-cursor Render cursors in software in Xephyr\n"); ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n"); ErrorF("-grayscale Simulate 8bit grayscale\n"); ErrorF("-resizeable Make Xephyr windows resizeable\n"); @@ -203,8 +203,12 @@ ddxProcessArgument(int argc, char **argv, int i) UseMsg(); exit(1); } + else if (!strcmp(argv[i], "-sw-cursor")) { + hostx_use_sw_cursor(); + return 1; + } else if (!strcmp(argv[i], "-host-cursor")) { - hostx_use_host_cursor(); + /* Compatibility with the old command line argument, now the default. */ return 1; } else if (!strcmp(argv[i], "-fullscreen")) { diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 084bd6497..a8a244878 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -64,7 +64,7 @@ struct EphyrHostXVars { Window winroot; xcb_gcontext_t gc; int depth; - Bool use_host_cursor; + Bool use_sw_cursor; Bool use_fullscreen; Bool have_shm; @@ -180,13 +180,13 @@ hostx_set_win_title(KdScreenInfo *screen, const char *extra_text) int hostx_want_host_cursor(void) { - return HostX.use_host_cursor; + return !HostX.use_sw_cursor; } void -hostx_use_host_cursor(void) +hostx_use_sw_cursor(void) { - HostX.use_host_cursor = TRUE; + HostX.use_sw_cursor = TRUE; } int diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h index 20df7be54..e83323a0c 100644 --- a/hw/kdrive/ephyr/hostx.h +++ b/hw/kdrive/ephyr/hostx.h @@ -80,7 +80,7 @@ int hostx_want_host_cursor(void); void - hostx_use_host_cursor(void); + hostx_use_sw_cursor(void); void hostx_use_fullscreen(void);