X-Git-Url: http://pileus.org/git/?p=wmpus;a=blobdiff_plain;f=wm-wmii.c;h=84250ea85736a24358297b9547b37e3b258392fd;hp=0d842295e56a639af0afa49f802cd0e09cd2efde;hb=6676472c287a8163d53b2ba14ca8ec39bf7443eb;hpb=20508b0053a5925ca15f17813ca9176659d06ae1 diff --git a/wm-wmii.c b/wm-wmii.c index 0d84229..84250ea 100644 --- a/wm-wmii.c +++ b/wm-wmii.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Andy Spencer + * Copyright (c) 2011-2012, Andy Spencer * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -678,6 +678,15 @@ static void wm_update_cols(dpy_t *dpy) *******************************/ void wm_update(void) { + /* Updates window sizes */ + for (list_t *ldpy = wm_tag->dpys; ldpy; ldpy = ldpy->next) + wm_update_cols(ldpy->data); + tag_foreach_flt(wm_tag, ldpy, lflt, win) { + flt_t *flt = lflt->data; + sys_move(win, flt->x, flt->y, flt->w, flt->h); + sys_raise(flt->win); + } + /* Show/hide tags */ tag_foreach_col(wm_tag, dpy, col, row, win) sys_show(win, ROW(row)->state); @@ -691,14 +700,7 @@ void wm_update(void) sys_show(win, ST_HIDE); } - /* Refresh the display */ - for (list_t *ldpy = wm_tag->dpys; ldpy; ldpy = ldpy->next) - wm_update_cols(ldpy->data); - tag_foreach_flt(wm_tag, ldpy, lflt, win) { - flt_t *flt = lflt->data; - sys_move(win, flt->x, flt->y, flt->w, flt->h); - sys_raise(flt->win); - } + /* Set focused window */ if (wm_focus) set_focus(wm_focus); } @@ -870,7 +872,7 @@ void wm_insert(win_t *win) /* Arrange */ wm_update(); - set_focus(wm_focus); + set_focus(win); print_txt(); }