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:
438e302
)
Set region focus on screenchange.
author
Reginald Kennedy
<rk@rejii.com>
Mon, 29 Oct 2012 19:30:22 +0000
(
03:30
+0800)
committer
Reginald Kennedy
<rk@rejii.com>
Mon, 29 Oct 2012 19:37:54 +0000
(
03:37
+0800)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
42c8bd2
..
1b07dc2
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-8704,6
+8704,9
@@
scan_xrandr(int i)
xcb_destroy_window(conn, r->id);
TAILQ_REMOVE(&screens[i].rl, r, entry);
TAILQ_INSERT_TAIL(&screens[i].orl, r, entry);
xcb_destroy_window(conn, r->id);
TAILQ_REMOVE(&screens[i].rl, r, entry);
TAILQ_INSERT_TAIL(&screens[i].orl, r, entry);
+
+ if (r->s->r_focus == r)
+ r->s->r_focus = NULL;
}
outputs = 0;
}
outputs = 0;
@@
-8779,9
+8782,18
@@
screenchange(xcb_randr_screen_change_notify_event_t *e)
print_win_geom(e->root);
#endif
/* add bars to all regions */
print_win_geom(e->root);
#endif
/* add bars to all regions */
- for (i = 0; i < num_screens; i++)
+ for (i = 0; i < num_screens; i++) {
TAILQ_FOREACH(r, &screens[i].rl, entry)
bar_setup(r);
TAILQ_FOREACH(r, &screens[i].rl, entry)
bar_setup(r);
+
+ if (screens[0].r_focus == NULL) {
+ /* Focus on first region. */
+ r = TAILQ_FIRST(&screens[0].rl);
+ if (r)
+ focus_region(r);
+ }
+ }
+
stack();
bar_draw();
focus_flush();
stack();
bar_draw();
focus_flush();