Skip to contentSkip to conversation

Option to disable cursor in X; retry

PATCH New Michel Wilson 2 participants 4 messages Sep 10, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Option to disable cursor in X; retry

Hi,

Adds an option to disable the root cursor in X. Ideal for display-only systems where a cursor only gets in the way. This is the non-line-wrapped version of the patch ;)

Regards,

Michel Wilson.
---

x11r7/xserver_xorg-server/xserver_xorg-server.mk +7 -0
Index: package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
===================================================================
@@ -24,6 +24,12 @@
 XSERVER_XORG_ENABLE_KDRIVE:=--disable-kdrive --disable-xfbdev
 endif
 
+ifeq ($(strip $(BR2_PACKAGE_XSERVER_XORG_SERVER_NULL_CURSOR)),y)
+XSERVER_XORG_NULL_CURSOR:=--enable-null-root-cursor
+else
+XSERVER_XORG_NULL_CURSOR:=--disable-null-root-cursor
+endif
+
 XSERVER_XORG_SERVER_DEPENDENCIES =  freetype xutil_util-macros xlib_libXfont libdrm xlib_libxkbui \
 									xproto_compositeproto xproto_damageproto xproto_fixesproto \
 									xproto_glproto xproto_kbproto xproto_randrproto freetype \
@@ -42,6 +48,7 @@
 		--enable-freetype $(XSERVER_XORG_ENABLE_MODULAR) \
 		--disable-config-hal $(XSERVER_XORG_MESA_DIR) \
 		--disable-xnest --disable-xephyr --disable-xvfb \
+		$(XSERVER_XORG_NULL_CURSOR)
 		CFLAGS="-I$(STAGING_DIR)/usr/include/pixman-1"
 
 XSERVER_XORG_SERVER_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install install-data
x11r7/xserver_xorg-server/Config.in +6 -0
Index: package/x11r7/xserver_xorg-server/Config.in
===================================================================
@@ -52,3 +52,9 @@
 	help
 	  xorg-server 1.4
 	  No description available
+
+config BR2_PACKAGE_XSERVER_XORG_SERVER_NULL_CURSOR
+    bool "Null root cursor"
+    depends on BR2_PACKAGE_XSERVER_XORG_SERVER
+    help
+        Don't display root cursor.
Signature · 2 lines
Michel Wilson     michel at crondor.net
PGP key ID        0xD2CB4B7E
#1 lore raw

PATCH 1/1 Option to disable cursor in X; retry

Quoted 3 lines · Michel Wilson

Adds an option to disable the root cursor in X. Ideal for display-only systems where a cursor only gets in the way. This is the non-line-wrapped version of the patch ;)

Does this disable the cursor completely, or add the ability to disable it through an API or configuration item?

Because if it just plain disables the cursor that doesn't seem to be appropriate for a compile time option. (Not that it's your fault of course.)

Hamish

Signature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>
#2 lore raw

PATCH 1/1 Option to disable cursor in X; retry

Quoted 9 lines · On Wednesday 10 September 2008 13:03:10 Hamish Moffatt wrote:

Does this disable the cursor completely, or add the ability to disable it through an API or configuration item?

Because if it just plain disables the cursor that doesn't seem to be appropriate for a compile time option. (Not that it's your fault of course.)

Hamish

You are as surprised as I was, because it is indeed a configure-time option to disable it, by default. Note that it's only the root window which is affected. I think it's possible to still have a cursor, by providing a cursor theme or something like that, but I haven't tested.
Question is: should this be included or not? I feel it's a useful option to have, because it's the simplest way of disabling the cursor. I tried a transparent cursor theme (see http://matchbox-project.org/sources/utils/), but didn't get it to work, yet. More elegant would be a xorg.conf option with the same effect, but I'm not sure if I'm up to that ;)

Regards,

Michel Wilson.

Signature · 2 lines
Michel Wilson     michel at crondor.net
PGP key ID        0xD2CB4B7E
#3 lore raw

PATCH 1/1 Option to disable cursor in X; retry

Quoted 6 lines · Michel Wilson

You are as surprised as I was, because it is indeed a configure-time option to disable it, by default. Note that it's only the root window which is affected. I think it's possible to still have a cursor, by providing a cursor theme or something like that, but I haven't tested.
Question is: should this be included or not? I feel it's a useful option to have, because it's the simplest way of disabling the cursor. I tried a

Sure, if it's useful to you there's no reason why it shouldn't go in.

I usually stay out of packages that I don't use personally, but since I've challenged you about this it's only fair that I commit the patch :-) It's in as r23371.

Thanks for sending the patch again. Sometimes patches slip through.

Hamish

Signature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>