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 <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
Eric Anholt 2013-08-23 11:17:14 -07:00
parent 0f5a2f13dc
commit ba387cf21f
3 changed files with 11 additions and 7 deletions

View File

@ -114,7 +114,7 @@ ddxUseMsg(void)
ErrorF("\nXephyr Option Usage:\n"); ErrorF("\nXephyr Option Usage:\n");
ErrorF("-parent <XID> Use existing window as Xephyr root win\n"); ErrorF("-parent <XID> 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("-fullscreen Attempt to run Xephyr fullscreen\n");
ErrorF("-grayscale Simulate 8bit grayscale\n"); ErrorF("-grayscale Simulate 8bit grayscale\n");
ErrorF("-resizeable Make Xephyr windows resizeable\n"); ErrorF("-resizeable Make Xephyr windows resizeable\n");
@ -203,8 +203,12 @@ ddxProcessArgument(int argc, char **argv, int i)
UseMsg(); UseMsg();
exit(1); exit(1);
} }
else if (!strcmp(argv[i], "-sw-cursor")) {
hostx_use_sw_cursor();
return 1;
}
else if (!strcmp(argv[i], "-host-cursor")) { else if (!strcmp(argv[i], "-host-cursor")) {
hostx_use_host_cursor(); /* Compatibility with the old command line argument, now the default. */
return 1; return 1;
} }
else if (!strcmp(argv[i], "-fullscreen")) { else if (!strcmp(argv[i], "-fullscreen")) {

View File

@ -64,7 +64,7 @@ struct EphyrHostXVars {
Window winroot; Window winroot;
xcb_gcontext_t gc; xcb_gcontext_t gc;
int depth; int depth;
Bool use_host_cursor; Bool use_sw_cursor;
Bool use_fullscreen; Bool use_fullscreen;
Bool have_shm; Bool have_shm;
@ -180,13 +180,13 @@ hostx_set_win_title(KdScreenInfo *screen, const char *extra_text)
int int
hostx_want_host_cursor(void) hostx_want_host_cursor(void)
{ {
return HostX.use_host_cursor; return !HostX.use_sw_cursor;
} }
void void
hostx_use_host_cursor(void) hostx_use_sw_cursor(void)
{ {
HostX.use_host_cursor = TRUE; HostX.use_sw_cursor = TRUE;
} }
int int

View File

@ -80,7 +80,7 @@ int
hostx_want_host_cursor(void); hostx_want_host_cursor(void);
void void
hostx_use_host_cursor(void); hostx_use_sw_cursor(void);
void void
hostx_use_fullscreen(void); hostx_use_fullscreen(void);