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:
0839929
)
Don't swap_to_main if no window has focus or main has focus.
author
Ryan McBride
<mcbride@countersiege.com>
Wed, 14 Jan 2009 06:04:21 +0000
(06:04 +0000)
committer
Ryan McBride
<mcbride@countersiege.com>
Wed, 14 Jan 2009 06:04:21 +0000
(06:04 +0000)
scrotwm.c
patch
|
blob
|
history
diff --git
a/scrotwm.c
b/scrotwm.c
index
87cb946
..
d8b6519
100644
(file)
--- a/
scrotwm.c
+++ b/
scrotwm.c
@@
-371,7
+371,10
@@
swap_to_main(union arg *args)
struct ws_win *tmpwin = TAILQ_FIRST(&ws[current_ws].winlist);
DNPRINTF(SWM_D_MISC, "swap_to_main: win: %lu\n",
- ws[current_ws].focus->id);
+ ws[current_ws].focus ? ws[current_ws].focus->id : 0);
+
+ if (ws[current_ws].focus == NULL || ws[current_ws].focus == tmpwin)
+ return;
TAILQ_REMOVE(&ws[current_ws].winlist, tmpwin, entry);
TAILQ_INSERT_AFTER(&ws[current_ws].winlist, ws[current_ws].focus,