diff options
author | George Lebl <jirka@5z.com> | 2001-05-24 22:32:02 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2001-05-24 22:32:02 +0000 |
commit | 381aed51fba1eba7c6c7f8badcc9db1bdd129a52 (patch) | |
tree | b321938c37f930af2c541ac79681b8fd2841058c | |
parent | bcdce6315131ca153aff2522c014caab3e1b070a (diff) | |
download | gdm-381aed51fba1eba7c6c7f8badcc9db1bdd129a52.tar.gz |
a script to restart the gdm daemon, in sbin for root pleasure only
Thu May 24 15:32:54 2001 George Lebl <jirka@5z.com>
* configure.in, gdm-restart.in, Makefile.am: a script to restart
the gdm daemon, in sbin for root pleasure only
* gdm.spec.in: redo the file list to be hopefully sane
* daemon/gdm.c: actually read in GdmConfigurator
* gui/gdmconfig.c: show help fromt he help button
* gui/gdmlogin.c, gui/gdmwm.[ch]: add some short-circuit functions
for window moving, bypassing the window management foo. This makes
quiver nice again.
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | daemon/gdm.c | 1 | ||||
-rwxr-xr-x | gdm-restart.in | 13 | ||||
-rw-r--r-- | gdm.spec.in | 39 | ||||
-rw-r--r-- | gui/gdmconfig.c | 18 | ||||
-rw-r--r-- | gui/gdmlogin.c | 30 | ||||
-rw-r--r-- | gui/gdmwm.c | 57 | ||||
-rw-r--r-- | gui/gdmwm.h | 8 |
11 files changed, 155 insertions, 34 deletions
@@ -1,3 +1,18 @@ +Thu May 24 15:32:54 2001 George Lebl <jirka@5z.com> + + * configure.in, gdm-restart.in, Makefile.am: a script to restart + the gdm daemon, in sbin for root pleasure only + + * gdm.spec.in: redo the file list to be hopefully sane + + * daemon/gdm.c: actually read in GdmConfigurator + + * gui/gdmconfig.c: show help fromt he help button + + * gui/gdmlogin.c, gui/gdmwm.[ch]: add some short-circuit functions + for window moving, bypassing the window management foo. This makes + quiver nice again. + Thu May 24 13:22:49 2001 George Lebl <jirka@5z.com> * configure.in: add ms (Bahasa Melayu), the official Microsoft diff --git a/Makefile.am b/Makefile.am index da913cb9..ffef8225 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,10 @@ EXTRA_DIST = \ gdmconfig-security \ xml-i18n-extract.in \ xml-i18n-merge.in \ - xml-i18n-update.in + xml-i18n-update.in \ + gdm-restart.in + +sbin_SCRIPTS = gdm-restart install-data-local: if CONSOLE_HELPER @@ -53,6 +53,8 @@ Ahh news... - Updated fixed icon entry +- gdm-restart script to automate restarting of gdm by HUPing the main daemon + - Mucho fixes - Bunch more tooltips on things diff --git a/configure.in b/configure.in index 02505d07..903798dc 100644 --- a/configure.in +++ b/configure.in @@ -328,6 +328,7 @@ intl/Makefile config/gdm.conf config/Gnome config/gnomerc +gdm-restart gdm.spec ],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) diff --git a/daemon/gdm.c b/daemon/gdm.c index fb42957e..344eaba4 100644 --- a/daemon/gdm.c +++ b/daemon/gdm.c @@ -163,6 +163,7 @@ gdm_config_parse (void) GdmFailsafeXServer = gnome_config_get_string (GDM_KEY_FAILSAFE_XSERVER); GdmXKeepsCrashing = gnome_config_get_string (GDM_KEY_XKEEPSCRASHING); GdmXKeepsCrashingConfigurators = gnome_config_get_string (GDM_KEY_XKEEPSCRASHING_CONFIGURATORS); + GdmConfigurator = gnome_config_get_string (GDM_KEY_CONFIGURATOR); GdmConfigAvailable = gnome_config_get_bool (GDM_KEY_CONFIG_AVAILABLE); GdmSystemMenu = gnome_config_get_bool (GDM_KEY_SYSMENU); GdmBrowser = gnome_config_get_bool (GDM_KEY_BROWSER); diff --git a/gdm-restart.in b/gdm-restart.in new file mode 100755 index 00000000..f602d292 --- /dev/null +++ b/gdm-restart.in @@ -0,0 +1,13 @@ +#!/bin/sh +PIDFILE=`grep '^PidFile=' @sysconfdir@/gdm/gdm.conf | sed -e 's/^PidFile=//'` +if test x$PIDFILE = x ; then + echo "Can't find the PID file in the configuration file, going to try:" + echo "/var/run/gdm.pid" + PIDFILE=/var/run/gdm.pid +fi +if test '!' -f $PIDFILE ; then + echo "$PIDFILE doesn't exist, perhaps GDM isn't running" + exit 1 +fi +# exec the kill to get the correct return code +exec kill -HUP `cat $PIDFILE` diff --git a/gdm.spec.in b/gdm.spec.in index bf1dfd65..d0f7a778 100644 --- a/gdm.spec.in +++ b/gdm.spec.in @@ -80,25 +80,34 @@ exit 0 %doc AUTHORS COPYING ChangeLog NEWS README %{_bindir}/* %{_sbindir}/* -%config %{sysconfdir}/pam.d/gdm -%config %{sysconfdir}/pam.d/gdmconfig -%config %{sysconfdir}/security/console.apps/gdmconfig -%config %{sysconfdir}/X11/gdm/gnomerc -%config %{sysconfdir}/X11/gdm/gdm.conf -%config %{sysconfdir}/X11/gdm/locale.alias -%config %{sysconfdir}/X11/gdm/Sessions/* -%config %{sysconfdir}/X11/gdm/Init/* -%config %{sysconfdir}/X11/gdm/PreSession/* -%config %{sysconfdir}/X11/gdm/PostSession/* -%{_datadir}/gdm/gdmconfig.glade -%{_datadir}/gdm/gdmchooser.glade -%{_datadir}/gnome/apps/System/gdmconfig.desktop -%{_datadir}/locale/*/*/* -%{_datadir}/pixmaps/* +%config %{sysconfdir}/* +%{_datadir}/* +# %config %{sysconfdir}/pam.d/gdm +# %config %{sysconfdir}/pam.d/gdmconfig +# %config %{sysconfdir}/security/console.apps/gdmconfig +# %config %{sysconfdir}/X11/gdm/gnomerc +# %config %{sysconfdir}/X11/gdm/gdm.conf +# %config %{sysconfdir}/X11/gdm/locale.alias +# %config %{sysconfdir}/X11/gdm/Sessions/* +# %config %{sysconfdir}/X11/gdm/Init/* +# %config %{sysconfdir}/X11/gdm/PreSession/* +# %config %{sysconfdir}/X11/gdm/PostSession/* +# %{_datadir}/gdm/gdmconfig.glade +# %{_datadir}/gdm/gdmchooser.glade +# %{_datadir}/gnome/apps/System/gdmconfig.desktop +# %{_datadir}/gnome/apps/Settings/gdmphotosetup.desktop +# %{_datadir}/locale/*/*/* +# %{_datadir}/pixmaps/* +# %{_datadir}/gnome/help/gdm/* +# %{_datadir}/gnome/help/gdmconfig/* %attr(750, gdm, gdm) %dir %{localstatedir}/gdm %changelog +* Sun May 24 2001 George Lebl <jirka@5z.com> +- Hmmm, simplified the file listing, dunno why normally people list + things file by file/dir by dir, but the old file list was out of date + * Sun May 06 2001 George Lebl <jirka@5z.com> - Kill the Failsafe script. GDM will now do failsafe itself, in an actual failsafe way (meaning it will work with greater degree of hosage) diff --git a/gui/gdmconfig.c b/gui/gdmconfig.c index f62e2cf5..7b2a3e62 100644 --- a/gui/gdmconfig.c +++ b/gui/gdmconfig.c @@ -1356,8 +1356,22 @@ void open_help_page (GtkButton *button, gpointer user_data) { - gnome_warning_dialog(_("Documentation is being written but is not yet finished.\nPlease be patient.")); - /* FIXME: ! */ + gchar *tmp; + tmp = gnome_help_file_find_file ("gdmconfig", "index.html"); + if (tmp != NULL) { + /* If we are running under gdm, try the help browser */ + if (g_getenv ("RUNNING_UNDER_GDM") != NULL) { + char *argv[] = { + "gnome-help-browser", + tmp, + NULL + }; + gnome_execute_async (NULL, 2, argv); + } else { + gnome_help_goto (0, tmp); + } + g_free (tmp); + } } diff --git a/gui/gdmlogin.c b/gui/gdmlogin.c index 5e6fca1e..20025f5c 100644 --- a/gui/gdmlogin.c +++ b/gui/gdmlogin.c @@ -1875,22 +1875,20 @@ gdm_login_ctrl_handler (GIOChannel *source, GIOCondition cond, gint fd) case GDM_RESET: if (GdmQuiver) { - gdk_window_get_position (login->window, &x, &y); - - for (i=32 ; i > 0 ; i=i/4) { - gdk_window_move (login->window, i+x, y); - gdk_flush (); - usleep (200); - gdk_window_move (login->window, x, y); - gdk_flush (); - usleep (200); - gdk_window_move (login->window, -i+x, y); - gdk_flush (); - usleep (200); - gdk_window_move (login->window, x, y); - gdk_flush (); - usleep (200); - } + Window lw = GDK_WINDOW_XWINDOW (login->window); + + gdm_wm_get_window_pos (lw, &x, &y); + + for (i = 32 ; i > 0 ; i = i/4) { + gdm_wm_move_window_now (lw, i+x, y); + usleep (200); + gdm_wm_move_window_now (lw, x, y); + usleep (200); + gdm_wm_move_window_now (lw, -i+x, y); + usleep (200); + gdm_wm_move_window_now (lw, x, y); + usleep (200); + } } case GDM_RESETOK: diff --git a/gui/gdmwm.c b/gui/gdmwm.c index ace8bf83..15c577f4 100644 --- a/gui/gdmwm.c +++ b/gui/gdmwm.c @@ -817,4 +817,61 @@ gdm_wm_no_login_focus_pop (void) no_focus_login --; } +void +gdm_wm_get_window_pos (Window window, int *xp, int *yp) +{ + int x, y; + Window root; + unsigned int width, height, border, depth; + GdmWindow *gw; + + trap_push (); + + gw = find_window (window, TRUE); + + if (gw == NULL) { + XGetGeometry (wm_disp, window, + &root, &x, &y, &width, &height, &border, &depth); + + *xp = x; + *yp = y; + + trap_pop (); + + return; + } + + XGetGeometry (wm_disp, gw->deco, + &root, &x, &y, &width, &height, &border, &depth); + + *xp = x + 1; + *yp = y + 1; + + trap_pop (); +} + +void +gdm_wm_move_window_now (Window window, int x, int y) +{ + GdmWindow *gw; + + trap_push (); + + gw = find_window (window, TRUE); + + if (gw == NULL) { + XMoveWindow (wm_disp, window, x, y); + + XSync (wm_disp, False); + trap_pop (); + } + + XMoveWindow (wm_disp, gw->deco, x - 1, y - 1); + if (gw->shadow != None) + XMoveWindow (wm_disp, gw->deco, x + 4, y + 4); + + XSync (wm_disp, False); + trap_pop (); +} + /* EOF */ diff --git a/gui/gdmwm.h b/gui/gdmwm.h index 47cd3a6e..bc9e6636 100644 --- a/gui/gdmwm.h +++ b/gui/gdmwm.h @@ -36,6 +36,14 @@ void gdm_wm_focus_new_windows (gboolean focus); void gdm_wm_focus_window (Window window); +/* movement for the impatient */ +void gdm_wm_move_window_now (Window window, + int x, + int y); +void gdm_wm_get_window_pos (Window window, + int *xp, + int *yp); + /* refuse to focus the login window, poor mans modal dialogs */ void gdm_wm_no_login_focus_push (void); void gdm_wm_no_login_focus_pop (void); |