XGCValues bar_gcv;
int bar_fidx = 0;
XFontStruct *bar_fs;
-char *bar_fonts[] = { NULL, NULL, NULL }; /* XXX Make fully dynamic */
+char *bar_fonts[] = { NULL, NULL, NULL, NULL };/* XXX Make fully dynamic */
char *spawn_term[] = { NULL, NULL }; /* XXX Make fully dynamic */
#define SWM_MENU_FN (2)
void
maprequest(XEvent *e)
{
+ struct ws_win *win;
+ struct swm_region *r;
+
XMapRequestEvent *ev = &e->xmaprequest;
XWindowAttributes wa;
stack();
/* make new win focused */
- struct ws_win *win;
win = find_window(ev->window);
- focus_win(win);
+ r = root_to_region(win->wa.root);
+ if (win->ws == r->ws) /* XXX this probably breaks multi screen */
+ focus_win(win);
}
void
if ((bar_fonts[1] = strdup("-*-times-medium-r-*-*-*-*-*-*-*-*-*-*"))
== NULL)
err(1, "setup_globals: strdup");
+ if ((bar_fonts[2] = strdup("-misc-fixed-medium-r-*-*-*-*-*-*-*-*-*-*"))
+ == NULL)
+ err(1, "setup_globals: strdup");
if ((spawn_term[0] = strdup("xterm")) == NULL)
err(1, "setup_globals: strdup");
}