diff options
| author | Richard Grenville <pyxlcy@gmail.com> | 2013-09-18 21:50:57 +0800 | 
|---|---|---|
| committer | Richard Grenville <pyxlcy@gmail.com> | 2013-09-18 22:41:40 +0800 | 
| commit | 2b534cd86445fcd770948bbb79f4732361259ab9 (patch) | |
| tree | 38cbed58124b2e713d426bb60df9d078c355571c /dbus.c | |
| parent | 6e82deb05b7e8d4c183d33c5a4acb978cf465b46 (diff) | |
| download | tdebase-2b534cd86445fcd770948bbb79f4732361259ab9.tar.gz tdebase-2b534cd86445fcd770948bbb79f4732361259ab9.zip | |
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.
Diffstat (limited to 'dbus.c')
| -rw-r--r-- | dbus.c | 6 | 
1 files changed, 5 insertions, 1 deletions
| @@ -722,7 +722,11 @@ cdbus_process_win_get(session_t *ps, DBusMessage *msg) {    cdbus_m_win_get_do(window_type, cdbus_reply_enum);    cdbus_m_win_get_do(wmwin, cdbus_reply_bool);    cdbus_m_win_get_do(leader, cdbus_reply_wid); -  cdbus_m_win_get_do(focused_real, cdbus_reply_bool); +  // focused_real +  if (!strcmp("focused_real", target)) { +    cdbus_reply_bool(ps, msg, win_is_focused_real(ps, w)); +    return true; +  }    cdbus_m_win_get_do(fade_force, cdbus_reply_enum);    cdbus_m_win_get_do(shadow_force, cdbus_reply_enum);    cdbus_m_win_get_do(focused_force, cdbus_reply_enum); | 
