~lightdm-team/lightdm/1.4

« back to all changes in this revision

Viewing changes to greeters/gtk/lightdm-example-gtk-greeter.c

  • Committer: Robert Ancell
  • Date: 2011-05-24 04:30:24 UTC
  • Revision ID: robert.ancell@canonical.com-20110524043024-xjmzlcyilwm3msa2
Set the root background so background is there when transitioning to session (doesn't appear to be working)

Show diffs side-by-side

added added

removed removed

Lines of Context:
437
437
    gchar *theme_dir, *rc_file, *background_image;
438
438
    GError *error = NULL;
439
439
 
440
 
    root = gdk_get_default_root_window ();
441
 
    gdk_window_set_cursor (root, gdk_cursor_new (GDK_LEFT_PTR));
442
 
 
443
440
    display = gdk_display_get_default ();
444
441
    screen = gdk_display_get_default_screen (display);
445
442
    screen_width = gdk_screen_get_width (screen);
494
491
        }
495
492
    }
496
493
 
 
494
    /* Set the background */
 
495
    root = gdk_get_default_root_window ();
 
496
    gdk_window_set_cursor (root, gdk_cursor_new (GDK_LEFT_PTR));
 
497
    if (background_pixbuf)
 
498
    {
 
499
        GdkPixmap *pixmap;
 
500
 
 
501
        gdk_pixbuf_render_pixmap_and_mask_for_colormap (background_pixbuf, gdk_window_get_colormap (root), &pixmap, NULL, 0);
 
502
        gdk_window_set_back_pixmap (root, pixmap, FALSE);
 
503
    }
 
504
 
497
505
    if (!ldm_greeter_get_can_suspend (greeter))
498
506
        gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "suspend_menuitem")));
499
507
    if (!ldm_greeter_get_can_hibernate (greeter))