diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gui/gdmwm.c | 6 | ||||
-rw-r--r-- | utils/gdmopen.c | 4 |
3 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,10 @@ +Sat Oct 20 13:31:07 2001 George Lebl <jirka@5z.com> + + * utils/gdmopen.c: set VT_NUMBER env var + + * gui/gdmwm.c: Fix a race for MapNotify so that newly created windows + are always focused + Sat Oct 20 12:03:14 2001 George Lebl <jirka@5z.com> * docs/C/Makefile.am: DESTDIR added patch by: frodol@dds.nl (Frodo diff --git a/gui/gdmwm.c b/gui/gdmwm.c index ce841934..c5a3b072 100644 --- a/gui/gdmwm.c +++ b/gui/gdmwm.c @@ -597,8 +597,6 @@ add_deco (GdmWindow *w) 0, black, black); - XMapWindow (wm_disp, w->deco); - XGetWindowAttributes (wm_disp, w->deco, &attribs); XSelectInput (wm_disp, w->deco, attribs.your_event_mask | @@ -606,6 +604,8 @@ add_deco (GdmWindow *w) SubstructureNotifyMask | SubstructureRedirectMask); + XMapWindow (wm_disp, w->deco); + XReparentWindow (wm_disp, w->win, w->deco, 1, 1); trap_pop (); @@ -830,7 +830,7 @@ event_process (XEvent *ev) if (gw == NULL) { if (ev->xmaprequest.parent == wm_root) { XGrabServer (wm_disp); - add_window (w, TRUE /*center*/); + gw = add_window (w, TRUE /*center*/); XUngrabServer (wm_disp); } } diff --git a/utils/gdmopen.c b/utils/gdmopen.c index d5c8574d..65a2b70c 100644 --- a/utils/gdmopen.c +++ b/utils/gdmopen.c @@ -130,6 +130,10 @@ main (int argc, char *argv[]) child_pid = fork(); if (child_pid == 0) { + char VT_NUMBER[256]; + + snprintf (VT_NUMBER, sizeof (VT_NUMBER), "VT_NUMBER=%d", vtno); + putenv (VT_NUMBER); signal (SIGTERM, SIG_DFL); signal (SIGINT, SIG_DFL); |