views:

181

answers:

1

Hi,

I am using the transparent cursor theme trick (see http://obiltschnig.com/2010/08/14/hiding-the-gtkx11-mouse-cursor/) to hide the X11 cursor in a fullscreen Linux GTK+ application for a touchscreen-based device. I am basically running a WebKit GTK+-based application using the Xorg server with no window manager in fullscreen mode. Now, hiding the cursor by setting a transparent 1-pixel cursor default theme works quite well (see also: http://stackoverflow.com/questions/660613/how-do-you-hide-the-mouse-pointer-under-linux-x11). However, as soon as the cursor is within a subwindow (e.g., an JavaScript alert window or a combobox/HTML ), the X cursor appears (and disappears again if the cursor is moved out of the window). Does anyone know why this is so? And is there a way to completely hide the cursor?

A: 

If a child window sets a cursor then it will have that cursor instead of the one set on the parent window. The window manager normally sets the root window cursor, but if an app changes the cursor it would override that.

A GTK app would normally set the cursor theme cursors, but maybe the lack of an xsettings manager or other normal desktop environment setup is causing a problem. See if running gnome-settings-manager fixes it and if so you could try to replicate its functionality.

You could also look into XFixesHideCursor(), as long as you can rely on an X server with that extension it might solve the problem nicely.

Havoc P
Thanks. I'm a bit occupied by other things at the moment, but I will look into this.
obiltschnig