0

I'm writting a little application that runs on a touchscreen computer and I would like to hide the mouse cursor within this app. Do you know anyway to do that ? Thanks

shug
  • 73
  • 2
  • 7

1 Answers1

1

You want to create a GdkCursor of type GDK_BLANK_CURSOR, and set your windows GdkWindow cursor to that with gdk_window_set_cursor().

To get the GdkWindow, you need to wait until it exists (e.g. until the GtkWindow is realized), and then call gtk_widget_get_window (my_gtk_window)

How to do these calls with python depends on your Gtk+ version: 2.x indeed works through pygtk as barrios suggests (although the linked answer itself is incorrect). Gtk+ 3.x is accessed through gobject-introspection API.

Jussi Kukkonen
  • 13,857
  • 1
  • 37
  • 54