Bug fix #99: Rewrite focus detection logic
- Rewrite focus detection logic. Remove w->focused_real and use ps->active_win to identify focused window uniformly. Use a more expensive way to filter FocusIn/Out events to improve reliability. Only limited tests are done, and bugs are likely to be introduced. (#99) - Known issue: Under fvwm, compton sometimes does not consistently report the window input gets sent to. But there's something wrong in that case: XGetInputFocus() shows the root window is focused but another window is receiving input.
This commit is contained in:
2
src/c2.c
2
src/c2.c
@@ -1055,7 +1055,7 @@ c2_match_once_leaf(session_t *ps, win *w, const c2_l_t *pleaf,
|
||||
case C2_L_PFULLSCREEN: tgt = win_is_fullscreen(ps, w); break;
|
||||
case C2_L_POVREDIR: tgt = w->a.override_redirect; break;
|
||||
case C2_L_PARGB: tgt = (WMODE_ARGB == w->mode); break;
|
||||
case C2_L_PFOCUSED: tgt = w->focused_real; break;
|
||||
case C2_L_PFOCUSED: tgt = win_is_focused_real(ps, w); break;
|
||||
case C2_L_PWMWIN: tgt = w->wmwin; break;
|
||||
case C2_L_PCLIENT: tgt = w->client_win; break;
|
||||
case C2_L_PLEADER: tgt = w->leader; break;
|
||||
|
||||
Reference in New Issue
Block a user