diff options
author | Simon Farnsworth <simon.farnsworth@onelan.co.uk> | 2009-04-23 16:15:01 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-04-28 10:43:53 +1000 |
commit | 707af5f8c5fae3b6c4c5125a91917667bb0ab908 (patch) | |
tree | 79a631146be2c69da4c10b88c88e9a54ee6075a9 /xfixes | |
parent | 40a8f2f4088aa353de733a11327b628ef13a52e6 (diff) |
Make the cursor completely optional
For embedded use, it's convenient to be able to disable the cursor
completely, without having to audit and fix up all your third-party
code (e.g. Mozilla Firefox).
Add -nocursor and -cursor server options to enable and disable the
cursor. The default is still -cursor, but embedded users can run the
server with -nocursor to hide the cursor regardless of what
application developers do.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xfixes')
-rw-r--r-- | xfixes/cursor.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 33ab4265c..eb83cfeb7 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -129,6 +129,8 @@ typedef struct _CursorScreen { /* The cursor doesn't show up until the first XDefineCursor() */ static Bool CursorVisible = FALSE; +Bool EnableCursor = TRUE; + static Bool CursorDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, @@ -144,7 +146,7 @@ CursorDisplayCursor (DeviceIntPtr pDev, * initial root window setup. Not a great way to do it, I admit. */ if (ConnectionInfo) - CursorVisible = TRUE; + CursorVisible = EnableCursor; if (cs->pCursorHideCounts != NULL || !CursorVisible) { ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pInvisibleCursor) && @@ -1052,7 +1054,7 @@ XFixesCursorInit (void) int i; if (party_like_its_1989) - CursorVisible = TRUE; + CursorVisible = EnableCursor; for (i = 0; i < screenInfo.numScreens; i++) { |