Comment 2 for bug 1024482

Revision history for this message
Jason Conti (jconti) wrote :

We have actually been looking into this issue recently in #ubuntu, so I thought I'd add my finding here.

As mentioned in the linked debian bug, logging into the session with gdm fixes the issue (unless you are logging into a session that uses compiz). And at the bottom of the report, lightdm-kde-greeter works as well.

The only difference I found is that both lightdm-gtk-greeter and unity-greeter set the cursor on the root window:

/* Set default cursor */
gdk_window_set_cursor (gdk_get_default_root_window (), gdk_cursor_new (GDK_LEFT_PTR));

(for lightdm-gtk-greeter)

And I found that commenting that line out, and instead setting the cursor on login_window:

--- lightdm-gtk-greeter-1.1.5.orig/src/lightdm-gtk-greeter.c
+++ lightdm-gtk-greeter-1.1.5/src/lightdm-gtk-greeter.c
@@ -717,7 +717,7 @@ main (int argc, char **argv)
         return EXIT_FAILURE;

     /* Set default cursor */
- gdk_window_set_cursor (gdk_get_default_root_window (), gdk_cursor_new (GDK_LEFT_PTR));
+ //gdk_window_set_cursor (gdk_get_default_root_window (), gdk_cursor_new (GDK_LEFT_PTR));

     /* Load background */
     value = g_key_file_get_value (config, "greeter", "background", NULL);
@@ -940,6 +940,9 @@ main (int argc, char **argv)
     gtk_widget_show (GTK_WIDGET (login_window));
     center_window (login_window);

+ gdk_window_set_cursor (gtk_widget_get_window (login_window), gdk_cursor_new (GDK_LEFT_PTR));
+
+
     gtk_widget_show (GTK_WIDGET (panel_window));
     GtkAllocation allocation;
     gtk_widget_get_allocation (GTK_WIDGET (panel_window), &allocation);

Rebuilding lightdm-gtk-greeter and then logging in, cursor updating should work as expected. I'm not really suggesting this as a fix because it has its own issues (unless you are over the login_window, the cursor with be the X), but it demonstrates the problem.

Test Case:
1) Log in with lightdm-gtk-greeter to Gnome Classic (no effects) [or gnome-shell or really anything without compiz]
2) Run: gsettings set org.gnome.desktop.interfaces cursor-size 48
3) Notice that every cursor except the default left pointer is resized

Patch lightdm-gtk-greeter as above or use gdm and the cursor will immediately resize. (Changing cursor-theme has the same sort of effect, but we were trying to figure out why cursor-size didn't work).

I think the compiz problem is that compiz also sets the cursor on the root window.