mirror of
https://github.com/vale981/spectrwm
synced 2025-03-05 18:01:37 -05:00
And kill got_focus
This commit is contained in:
parent
e4db6aa24a
commit
5bc67cb7a8
1 changed files with 3 additions and 8 deletions
11
scrotwm.c
11
scrotwm.c
|
@ -232,7 +232,6 @@ struct ws_win {
|
||||||
TAILQ_ENTRY(ws_win) entry;
|
TAILQ_ENTRY(ws_win) entry;
|
||||||
Window id;
|
Window id;
|
||||||
struct swm_geometry g;
|
struct swm_geometry g;
|
||||||
int got_focus;
|
|
||||||
int floating;
|
int floating;
|
||||||
int transient;
|
int transient;
|
||||||
int manual;
|
int manual;
|
||||||
|
@ -1144,7 +1143,6 @@ unfocus_win(struct ws_win *win)
|
||||||
grabbuttons(win, 0);
|
grabbuttons(win, 0);
|
||||||
XSetWindowBorder(display, win->id,
|
XSetWindowBorder(display, win->id,
|
||||||
win->ws->r->s->c[SWM_S_COLOR_UNFOCUS].color);
|
win->ws->r->s->c[SWM_S_COLOR_UNFOCUS].color);
|
||||||
win->got_focus = 0;
|
|
||||||
|
|
||||||
if (win->ws->focus == win) {
|
if (win->ws->focus == win) {
|
||||||
win->ws->focus = NULL;
|
win->ws->focus = NULL;
|
||||||
|
@ -1179,12 +1177,9 @@ focus_win(struct ws_win *win)
|
||||||
win->ws->focus = win;
|
win->ws->focus = win;
|
||||||
|
|
||||||
if (win->ws->r != NULL) {
|
if (win->ws->r != NULL) {
|
||||||
if (win->got_focus == 0) {
|
XSetWindowBorder(display, win->id,
|
||||||
XSetWindowBorder(display, win->id,
|
win->ws->r->s->c[SWM_S_COLOR_FOCUS].color);
|
||||||
win->ws->r->s->c[SWM_S_COLOR_FOCUS].color);
|
grabbuttons(win, 1);
|
||||||
grabbuttons(win, 1);
|
|
||||||
}
|
|
||||||
win->got_focus = 1;
|
|
||||||
XSetInputFocus(display, win->id,
|
XSetInputFocus(display, win->id,
|
||||||
RevertToPointerRoot, CurrentTime);
|
RevertToPointerRoot, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue