summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2002-07-20 17:07:14 +0000
committerGeorge Lebl <jirka@src.gnome.org>2002-07-20 17:07:14 +0000
commit921b733448af44e103fc151cd33e1517ca0d0cc8 (patch)
tree9b98f3d7056aad78aaf980fa8149a902694f1e3a /daemon
parent0697b2a03cd9a053f75ad86c70b47ed17f66e156 (diff)
downloadgdm-921b733448af44e103fc151cd33e1517ca0d0cc8.tar.gz
setup busy cursor when starting config
Sat Jul 20 10:19:25 2002 George Lebl <jirka@5z.com> * daemon/slave.c, gui/gdmsetup.c: setup busy cursor when starting config * daemon/gdm.h, daemon/slave.c, gui/gdmlogin.c, gui/greeter/greeter.c: add GDM_SAVEDIE request so that restarts of the greeter from the daemon also work and use this for the restart from the slave on greeter change. #88533 * gui/gdmwm.c: do process_events before a restore_wm_order so that we restore wm order after all our things have been finished so that the wm order is really restored especially on the graphical greeter
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm.h3
-rw-r--r--daemon/slave.c21
2 files changed, 19 insertions, 5 deletions
diff --git a/daemon/gdm.h b/daemon/gdm.h
index f47dd67d..1425f25f 100644
--- a/daemon/gdm.h
+++ b/daemon/gdm.h
@@ -77,7 +77,7 @@ enum {
/* This will change if there are incompatible
* protocol changes */
-#define GDM_GREETER_PROTOCOL_VERSION "1"
+#define GDM_GREETER_PROTOCOL_VERSION "2"
#define GDM_MSG 'D'
#define GDM_NOECHO 'U'
@@ -107,6 +107,7 @@ enum {
#define GDM_ERRDLG 'E' /* Puts string up in an error dialog */
#define GDM_NOFOCUS 'f' /* Don't focus the login window (optional) */
#define GDM_FOCUS 'F' /* Allow focus on the login window again (optional) */
+#define GDM_SAVEDIE '!' /* Save wm order and die (and set busy cursor) */
/* Different login interruptions */
#define GDM_INTERRUPT_TIMED_LOGIN 'T'
diff --git a/daemon/slave.c b/daemon/slave.c
index 2d683417..c3753517 100644
--- a/daemon/slave.c
+++ b/daemon/slave.c
@@ -756,6 +756,17 @@ run_config (GdmDisplay *display, struct passwd *pwent)
display->sesspid = 0;
return;
}
+
+ /* Set the busy cursor */
+ if (d->dsp != NULL) {
+ Cursor xcursor = XCreateFontCursor (d->dsp, GDK_WATCH);
+ XDefineCursor (d->dsp,
+ DefaultRootWindow (d->dsp),
+ xcursor);
+ XFreeCursor (d->dsp, xcursor);
+ XSync (d->dsp, False);
+ }
+
if (pid == 0) {
char **argv;
/* child */
@@ -843,12 +854,14 @@ restart_the_greeter (void)
if (greet) {
gdm_sigchld_block_push ();
+ gdm_slave_greeter_ctl_no_ret (GDM_SAVEDIE, "");
+
greet = FALSE;
- if (d->greetpid > 0) {
- if (kill (d->greetpid, SIGTERM) == 0)
- waitpid (d->greetpid, 0, 0);
- }
+ /* Wait for the greeter to really die, the check is just
+ * being very anal, the pid is always set to something */
+ if (d->greetpid > 0)
+ waitpid (d->greetpid, 0, 0);
d->greetpid = 0;
gdm_slave_send_num (GDM_SOP_GREETPID, 0);