Browse Source

Fix Globally Active focus mode.

Something changed somewhere in java 7 which seems to require that the
"Globally Active" focus mode is handled properly, otherwise input focus
is entirely broken.

Parts of patch by Tim Howe <vsync@quadium.net>.
master
Kim Woelders 9 years ago
parent
commit
ba29ecf04e
  1. 3
      AUTHORS
  2. 3
      src/ewins.c
  3. 7
      src/icccm.c

3
AUTHORS

@ -280,5 +280,8 @@ Aron Xu <aronmalache@163.com>
Daniel Manjarres <manjarrs@illinois.edu>
Improved strut handling options, other patches and suggestions.
Tim Howe <vsync@quadium.net>
Fix focus handling to support "Globally Active" model (used by Java)
And others whose names we probably forgot to add (email us and we'll put you
in here)

3
src/ewins.c

@ -703,7 +703,8 @@ EwinStateUpdate(EWin * ewin)
fs_zo = ewin->state.fullscreen || ewin->state.zoomed;
ewin->state.inhibit_actions = ewin->props.no_actions;
ewin->state.inhibit_focus = !ewin->icccm.need_input ||
ewin->state.inhibit_focus =
!(ewin->icccm.need_input || ewin->icccm.take_focus) ||
EwinInhGetWM(ewin, focus) || ewin->state.iconified;
ewin->state.inhibit_move = EwinInhGetUser(ewin, move) || fs_zo;

7
src/icccm.c

@ -402,8 +402,9 @@ ICCCM_Focus(const EWin * ewin)
Mode.events.time);
}
XSetInputFocus(disp, EwinGetClientXwin(ewin), RevertToPointerRoot,
Mode.events.time);
if (ewin->icccm.need_input)
XSetInputFocus(disp, EwinGetClientXwin(ewin),
RevertToPointerRoot, Mode.events.time);
HintsSetActiveWindow(EwinGetClientXwin(ewin));
}
@ -717,7 +718,7 @@ ICCCM_GetWmProtocols(EWin * ewin)
for (i = 0; i < num; i++)
{
if (prop[i] == ECORE_X_ATOM_WM_TAKE_FOCUS)
ewin->icccm.take_focus = ewin->icccm.need_input = 1;
ewin->icccm.take_focus = 1;
else if (prop[i] == ECORE_X_ATOM_WM_DELETE_WINDOW)
ewin->icccm.delete_window = 1;
#if USE_XSYNC

Loading…
Cancel
Save