diff options
author | Carlos Perelló Marín <carlos@gnome-db.org> | 2001-11-22 08:07:50 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2001-11-22 08:07:50 +0000 |
commit | ec4c3bcda4df49078621b3ca84ca0500e76c35f9 (patch) | |
tree | eb3be5b50b4d305ef8945543f51ff23316f03799 | |
parent | e623fdceb2c3947e7d62ce77cef700542b18c73f (diff) | |
download | gdm-ec4c3bcda4df49078621b3ca84ca0500e76c35f9.tar.gz |
Merge from stable up to 2.2.5.2 release tag
Thu Nov 22 00:47:23 2001 George Lebl <jirka@5z.com>
* Merge from stable up to 2.2.5.2 release tag
Wed Nov 21 21:12:58 2001 George Lebl <jirka@5z.com>
* daemon/slave.c, daemon/xdmcp.c: Fix minor leaks
Wed Nov 21 20:58:24 2001 George Lebl <jirka@5z.com>
* gui/gdmwm.c: Support the InputHint to support No Input windows,
so that we can support things like xscribble and keyboards and
other accessibility and such doodaahs. Based on a patch from
Crossfire <xfire@xware.cx>
Wed Nov 21 19:46:50 2001 George Lebl <jirka@5z.com>
* daemon/server.c: keep 4 old x server logs in a logrotate like
manner to make debugging X server problems easier
2001-11-17 Carlos Perelló Marín <carlos@gnome-db.org>
* configure.in (ALL_LINGUAS): Added pt.
-rw-r--r-- | ChangeLog | 24 | ||||
-rw-r--r-- | NEWS | 22 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | daemon/server.c | 29 | ||||
-rw-r--r-- | daemon/slave.c | 31 | ||||
-rw-r--r-- | daemon/xdmcp.c | 1 | ||||
-rw-r--r-- | gui/gdmwm.c | 80 |
7 files changed, 150 insertions, 39 deletions
@@ -1,3 +1,27 @@ +Thu Nov 22 00:47:23 2001 George Lebl <jirka@5z.com> + + * Merge from stable up to 2.2.5.2 release tag + + Wed Nov 21 21:12:58 2001 George Lebl <jirka@5z.com> + + * daemon/slave.c, daemon/xdmcp.c: Fix minor leaks + + Wed Nov 21 20:58:24 2001 George Lebl <jirka@5z.com> + + * gui/gdmwm.c: Support the InputHint to support No Input windows, + so that we can support things like xscribble and keyboards and + other accessibility and such doodaahs. Based on a patch from + Crossfire <xfire@xware.cx> + + Wed Nov 21 19:46:50 2001 George Lebl <jirka@5z.com> + + * daemon/server.c: keep 4 old x server logs in a logrotate like + manner to make debugging X server problems easier + + 2001-11-17 Carlos Perelló Marín <carlos@gnome-db.org> + + * configure.in (ALL_LINGUAS): Added pt. + Fri Nov 16 12:38:30 2001 George Lebl <jirka@5z.com> Yay! it like all builds and stuff @@ -1,5 +1,27 @@ Ahh news... +2.2.5.2 stuff: + +- If multiple local servers are setup, then wait until one has started + plus 3 more seconds before starting the next one, this prevents such + not-good things such as full lockups happening + +- Fix crash of greeter for timed login setups + +- Keep 4 old copies of the X server logs to make debugging bad + X setups easy + +- The WM now supports NoInput windows, which improves gdm + accessibility and makes it possible to run things like xscribble + (Crossfire (from debian bug report) and moi) + +- Minor leak fixes + +- spec file updates (Gregory Leblanc) + +- Translation updates (Roy-Magne Mo, Carlos Perelló Marín, + Christophe Merlet, Khairulanuar Abd Majid) + 2.2.5.1 stuff: - IMPORTANT: XKeepsCrashing now has different semantics, diff --git a/configure.in b/configure.in index e5c70abf..841da11d 100644 --- a/configure.in +++ b/configure.in @@ -142,7 +142,7 @@ AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) dnl ## internationalization support -ALL_LINGUAS="az ca cs da de el es et fi fr ga gl hu it ja ko lt lv ms nl nn no pl pt_BR ro ru sk sl sv ta tr uk zh_CN.GB2312 zh_TW" +ALL_LINGUAS="az ca cs da de el es et fi fr ga gl hu it ja ko lt lv ms nl nn no pl pt_BR pt ro ru sk sl sv ta tr uk zh_CN.GB2312 zh_TW" dnl AM_GNOME_GETTEXT dnl AM_GNU_GETTEXT AM_GLIB_GNU_GETTEXT diff --git a/daemon/server.c b/daemon/server.c index c5afe640..e8199ef4 100644 --- a/daemon/server.c +++ b/daemon/server.c @@ -553,6 +553,30 @@ gdm_server_checklog (GdmDisplay *disp) #endif } +static void +rotate_logs (const char *dname) +{ + /* I'm too lazy to write a loop damnit */ + char *fname4 = g_strconcat (GdmLogDir, "/", dname, ".log.4", NULL); + char *fname3 = g_strconcat (GdmLogDir, "/", dname, ".log.3", NULL); + char *fname2 = g_strconcat (GdmLogDir, "/", dname, ".log.2", NULL); + char *fname1 = g_strconcat (GdmLogDir, "/", dname, ".log.1", NULL); + char *fname = g_strconcat (GdmLogDir, "/", dname, ".log", NULL); + + /* Rotate the logs (keep 4 last) */ + unlink (fname4); + rename (fname3, fname4); + rename (fname2, fname3); + rename (fname1, fname2); + rename (fname, fname1); + + g_free (fname4); + g_free (fname3); + g_free (fname2); + g_free (fname1); + g_free (fname); +} + /** * gdm_server_spawn: * @disp: Pointer to a GdmDisplay structure @@ -589,7 +613,7 @@ gdm_server_spawn (GdmDisplay *d) if (kill (pid, SIGTERM) == 0) waitpid (pid, NULL, 0); } - + /* Fork into two processes. Parent remains the gdm process. Child * becomes the X server. */ @@ -617,6 +641,9 @@ gdm_server_spawn (GdmDisplay *d) open ("/dev/null", O_RDWR); /* open stdout - fd 1 */ open ("/dev/null", O_RDWR); /* open stderr - fd 2 */ + /* Rotate the X server logs */ + rotate_logs (d->name); + /* Log all output from spawned programs to a file */ logfd = open (g_strconcat (GdmLogDir, "/", d->name, ".log", NULL), O_CREAT|O_TRUNC|O_WRONLY, 0644); diff --git a/daemon/slave.c b/daemon/slave.c index 82a41488..5a004724 100644 --- a/daemon/slave.c +++ b/daemon/slave.c @@ -872,7 +872,9 @@ run_pictures (void) FILE *fp; char *cfgdir; + response = NULL; for (;;) { + g_free (response); response = gdm_slave_greeter_ctl (GDM_NEEDPIC, ""); if (ve_string_empty (response)) { g_free (response); @@ -1044,6 +1046,7 @@ run_pictures (void) seteuid (0); setegid (GdmGroupId); } + g_free (response); } static void @@ -1266,8 +1269,9 @@ gdm_slave_send (const char *str, gboolean wait_for_usr2) gdm_got_usr2 = FALSE; fifopath = g_strconcat (GdmServAuthDir, "/.gdmfifo", NULL); - fd = open (fifopath, O_WRONLY); + g_free (fifopath); + /* eek */ if (fd < 0) { gdm_error (_("%s: Can't open fifo!"), "gdm_slave_send"); @@ -1354,6 +1358,8 @@ send_chosen_host (GdmDisplay *disp, const char *hostname) fd = open (fifopath, O_WRONLY); + g_free (fifopath); + /* eek */ if (fd < 0) { gdm_error (_("%s: Can't open fifo!"), "send_chosen_host"); @@ -2690,7 +2696,8 @@ gdm_slave_exec_script (GdmDisplay *d, const gchar *dir, const char *login, struct passwd *pwent) { pid_t pid; - gchar *script, *defscript, *scr; + gchar *script, *defscript; + const char *scr; gchar **argv; gint status; int i; @@ -2701,12 +2708,15 @@ gdm_slave_exec_script (GdmDisplay *d, const gchar *dir, const char *login, script = g_strconcat (dir, "/", d->name, NULL); defscript = g_strconcat (dir, "/Default", NULL); - if (! access (script, R_OK|X_OK)) - scr = script; - else if (! access (defscript, R_OK|X_OK)) - scr = defscript; - else - return EXIT_SUCCESS; + if (! access (script, R_OK|X_OK)) { + scr = script; + } else if (! access (defscript, R_OK|X_OK)) { + scr = defscript; + } else { + g_free (script); + g_free (defscript); + return EXIT_SUCCESS; + } pid = gdm_fork_extra (); @@ -2754,12 +2764,17 @@ gdm_slave_exec_script (GdmDisplay *d, const gchar *dir, const char *login, _exit (EXIT_SUCCESS); case -1: + g_free (script); + g_free (defscript); syslog (LOG_ERR, _("gdm_slave_exec_script: Can't fork script process!")); return EXIT_SUCCESS; default: gdm_wait_for_extra (&status); + g_free (script); + g_free (defscript); + if (WIFEXITED (status)) return WEXITSTATUS (status); else diff --git a/daemon/xdmcp.c b/daemon/xdmcp.c index 7fc1342a..5ef8ba0c 100644 --- a/daemon/xdmcp.c +++ b/daemon/xdmcp.c @@ -766,6 +766,7 @@ gdm_xdmcp_send_willing (struct sockaddr_in *clnt_sa) last_status = g_strdup (sysid); } last_willing = time (NULL); + g_free (bin); } if ( ! gdm_is_local_addr (&(clnt_sa->sin_addr)) && diff --git a/gui/gdmwm.c b/gui/gdmwm.c index f9834471..0c927816 100644 --- a/gui/gdmwm.c +++ b/gui/gdmwm.c @@ -42,6 +42,7 @@ struct _GdmWindow { gboolean ignore_size_hints; /* for gdm windows */ gboolean center; /* do centering */ gboolean recenter; /* do re-centering */ + gboolean takefocus; /* permit take focus */ }; static GList *windows = NULL; @@ -357,15 +358,50 @@ wm_protocol_check_support (Window xwin, return is_supported; } +static GList * +find_window_list (Window w, gboolean deco_ok) +{ + GList *li; + + for (li = windows; li != NULL; li = li->next) { + GdmWindow *gw = li->data; + + if (gw->win == w) + return li; + if (deco_ok && + (gw->deco == w || + gw->shadow == w)) + return li; + } + + return NULL; +} + +static GdmWindow * +find_window (Window w, gboolean deco_ok) +{ + GList *li = find_window_list (w, deco_ok); + if (li == NULL) + return NULL; + else + return li->data; +} + void gdm_wm_focus_window (Window window) { XWindowAttributes attribs = {0}; + GdmWindow *win; if (no_focus_login > 0 && window == wm_login_window) return; + win = find_window (window, TRUE); + if (win != NULL && + ! win->takefocus) + return; + trap_push (); XGetWindowAttributes (wm_disp, window, &attribs); @@ -395,35 +431,6 @@ gdm_wm_focus_window (Window window) trap_pop (); } -static GList * -find_window_list (Window w, gboolean deco_ok) -{ - GList *li; - - for (li = windows; li != NULL; li = li->next) { - GdmWindow *gw = li->data; - - if (gw->win == w) - return li; - if (deco_ok && - (gw->deco == w || - gw->shadow == w)) - return li; - } - - return NULL; -} - -static GdmWindow * -find_window (Window w, gboolean deco_ok) -{ - GList *li = find_window_list (w, deco_ok); - if (li == NULL) - return NULL; - else - return li->data; -} - static void center_x_window (GdmWindow *gw, Window w, Window hintwin) { @@ -635,6 +642,7 @@ add_window (Window w, gboolean center) gw = find_window (w, FALSE); if (gw == NULL) { XClassHint hint = { NULL, NULL }; + XWMHints *wmhints; int x, y; Window root; unsigned int width, height, border, depth; @@ -649,6 +657,17 @@ add_window (Window w, gboolean center) gw->ignore_size_hints = FALSE; gw->center = center; gw->recenter = FALSE; + gw->takefocus = TRUE; + + wmhints = XGetWMHints (wm_disp, w); + if (wmhints != NULL) { + /* NoInput windows */ + if ((wmhints->flags & InputHint) && + ! wmhints->input) { + gw->takefocus = FALSE; + } + XFree (wmhints); + } /* hack, set USpos/size on login window */ if (w == wm_login_window) { @@ -670,6 +689,9 @@ add_window (Window w, gboolean center) * such stuff */ gw->center = FALSE; gw->recenter = FALSE; + } else if (is_wm_class (&hint, "xscribble", 0)) { + /* hack, xscribble mustn't take focus */ + gw->takefocus = FALSE; } if (hint.res_name != NULL) XFree (hint.res_name); |