I should also note that setting the cursor explicitly to the LEFT_PTR in any gtk app will cause that app to show cursor updates properly when hovered over (which is why I think Firefox still works when you hover over it as mentioned in bug #86184 ):
And we can force a cursor update by setting the LEFT_PTR on the root window (but this will also break future cursor updates if you had logged in with gdm or lightdm-gtk-greeter with the patch above):
I should also note that setting the cursor explicitly to the LEFT_PTR in any gtk app will cause that app to show cursor updates properly when hovered over (which is why I think Firefox still works when you hover over it as mentioned in bug #86184 ):
#include <gdk/gdk.h>
#include <gtk/gtk.h>
int
main()
{
gtk_init(NULL, NULL);
GdkCursor *default_cursor = gdk_cursor_ new(GDK_ ARROW);
GtkWidget *window = gtk_window_ new(GTK_ WINDOW_ TOPLEVEL) ; connect( G_OBJECT( window) , "destroy", gtk_main_quit, NULL); realize( window) ; show(window) ;
g_signal_
gtk_widget_
gtk_widget_
gdk_window_ set_cursor( gtk_widget_ get_window( window) , default_cursor); unref(default_ cursor) ;
g_object_
gtk_main();
return 0;
}
And we can force a cursor update by setting the LEFT_PTR on the root window (but this will also break future cursor updates if you had logged in with gdm or lightdm-gtk-greeter with the patch above):
#include <gdk/gdk.h>
#include <gtk/gtk.h>
gboolean idle_cb(gpointer user_data)
{
gtk_main_quit();
return FALSE;
}
int main()
{
gtk_init (NULL, NULL);
GdkCursor *cursor = gdk_cursor_new (GDK_LEFT_PTR); set_cursor (gdk_get_ default_ root_window (), cursor);
gdk_window_
g_object_unref (cursor);
g_idle_add (idle_cb, NULL);
gtk_main ();
return 0;
}