Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8ac8dc5
)
unmap windows after stacking. much better performance!
author
Marco Peereboom
<marco@conformal.com>
Tue, 20 Apr 2010 19:08:06 +0000
(19:08 +0000)
committer
Marco Peereboom
<marco@conformal.com>
Tue, 20 Apr 2010 19:08:06 +0000
(19:08 +0000)
scrotwm.c
patch
|
blob
|
history
diff --git
a/scrotwm.c
b/scrotwm.c
index
57df495
..
738fd9d
100644
(file)
--- a/
scrotwm.c
+++ b/
scrotwm.c
@@
-1434,7
+1434,7
@@
focus_win(struct ws_win *win)
void
switchws(struct swm_region *r, union arg *args)
{
void
switchws(struct swm_region *r, union arg *args)
{
- int wsid = args->id;
+ int wsid = args->id, unmap_old = 0;
struct swm_region *this_r, *other_r;
struct ws_win *win;
struct workspace *new_ws, *old_ws;
struct swm_region *this_r, *other_r;
struct ws_win *win;
struct workspace *new_ws, *old_ws;
@@
-1462,9
+1462,7
@@
switchws(struct swm_region *r, union arg *args)
if (old_ws->r != NULL)
old_ws->old_r = old_ws->r;
old_ws->r = NULL;
if (old_ws->r != NULL)
old_ws->old_r = old_ws->r;
old_ws->r = NULL;
-
- TAILQ_FOREACH(win, &old_ws->winlist, entry)
- unmap_window(win);
+ unmap_old = 1;
} else {
other_r->ws = old_ws;
old_ws->r = other_r;
} else {
other_r->ws = old_ws;
old_ws->r = other_r;
@@
-1476,6
+1474,11
@@
switchws(struct swm_region *r, union arg *args)
a.id = SWM_ARG_ID_FOCUSCUR;
focus(new_ws->r, &a);
bar_update();
a.id = SWM_ARG_ID_FOCUSCUR;
focus(new_ws->r, &a);
bar_update();
+
+ /* unmap old windows */
+ if (unmap_old)
+ TAILQ_FOREACH(win, &old_ws->winlist, entry)
+ unmap_window(win);
}
void
}
void
@@
-4740,7
+4743,7
@@
main(int argc, char *argv[])
}
done:
bar_extra_stop();
}
done:
bar_extra_stop();
-
+ XFreeGC(display, bar_gc);
XCloseDisplay(display);
return (0);
XCloseDisplay(display);
return (0);