13855N/A--- ../gnome-session-2.23.6/splash/gnome-session-splash.c 2008-08-13 14:45:57.078221713 +0200
13855N/A+++ gnome-session-2.23.6/splash/gnome-session-splash.c 2008-08-13 14:47:57.199399805 +0200
13855N/A@@ -271,6 +271,47 @@
13855N/A gtk_main_quit ();
13494N/A }
13494N/A
13494N/A+/* display a busy cursor in window if it exist and on
13494N/A+ * the root window. This is done in plain X and opening a new
13494N/A+ * connection each time to avoid keeping the default cursor size
13494N/A+ * as it is modified by gnome-daemon-settings while gnome-session is running
13494N/A+ * (hence the user set cursor size would be lost if only one connection
13494N/A+ * was open)*/
13494N/A+static void
13494N/A+set_busy_cursor (GdkWindow *window, gboolean enable)
13494N/A+{
13494N/A+ static gboolean busy = FALSE;
13494N/A+ Cursor cur;
13494N/A+ Display *dpy;
13494N/A+ int scr_num, i;
13494N/A+
13494N/A+ dpy = XOpenDisplay (NULL);
13494N/A+
13494N/A+ if (enable)
13494N/A+ {
13494N/A+ if (busy)
13494N/A+ return;
13494N/A+ cur = XCreateFontCursor (dpy, GDK_WATCH);
13494N/A+ busy = TRUE;
13494N/A+ }
13494N/A+ else
13494N/A+ {
13494N/A+ cur = XCreateFontCursor (dpy, GDK_LEFT_PTR);
13494N/A+ busy = FALSE;
13494N/A+ }
13494N/A+
13494N/A+ scr_num = ScreenCount (dpy);
13494N/A+
13494N/A+ for (i = 0; i < scr_num; i++)
13494N/A+ {
13494N/A+ XDefineCursor (dpy, RootWindow (dpy, i), cur);
13494N/A+ }
13494N/A+
13494N/A+ if (GDK_IS_WINDOW (window))
13494N/A+ XDefineCursor (dpy, GDK_WINDOW_XID (window), cur);
13494N/A+ XSync (dpy, FALSE);
13494N/A+ XCloseDisplay (dpy);
13494N/A+}
13494N/A int
13494N/A main (int argc, char *argv[])
13494N/A {
13855N/A@@ -291,10 +332,14 @@
13855N/A G_CALLBACK (quit),
13855N/A NULL);
13494N/A
13855N/A+ set_busy_cursor (NULL, TRUE);
13494N/A+
13855N/A set_session_running_handler ();
13494N/A
13855N/A setup_splash_window ();
13855N/A gtk_main ();
13494N/A
13855N/A+ set_busy_cursor (NULL, FALSE);
13494N/A+
13855N/A return 0;
13494N/A }