/* map new window first to prevent ugly blinking */
TAILQ_FOREACH (win, &ws[wsid].winlist, entry)
- XMapWindow(display, win->id);
+ XMapRaised(display, win->id);
ws[wsid].visible = 1;
TAILQ_FOREACH (win, &ws[current_ws].winlist, entry)
winfocus = win;
else
unfocus_win(win);
- XMapWindow(display, win->id);
+ XMapRaised(display, win->id);
i++;
}
DNPRINTF(SWM_D_EVENT, "configurerequest: window: %lu\n", ev->window);
+ TAILQ_FOREACH (win, &ws[current_ws].winlist, entry) {
+ if (ev->window == win->id)
+ return;
+ }
+
XSelectInput(display, ev->window, ButtonPressMask | EnterWindowMask |
FocusChangeMask);
DNPRINTF(SWM_D_EVENT, "focusin: window: %lu\n", ev->window);
+ XSync(display, False); /* not sure this helps redrawing graphic apps */
+
if (ev->window == root)
return;
-
/*
* kill grab for now so that we can cut and paste , this screws up
* click to focus
width = DisplayWidth(display, screen) - 2;
height = DisplayHeight(display, screen) - 2;
- /* look for local and globale conf file */
+ /* look for local and global conf file */
pwd = getpwuid(getuid());
if (pwd == NULL)
errx(1, "invalid user %d", getuid());