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>.
This commit is contained in:
parent
89c1602253
commit
ba29ecf04e
3
AUTHORS
3
AUTHORS
|
@ -280,5 +280,8 @@ Aron Xu <aronmalache@163.com>
|
||||||
Daniel Manjarres <manjarrs@illinois.edu>
|
Daniel Manjarres <manjarrs@illinois.edu>
|
||||||
Improved strut handling options, other patches and suggestions.
|
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
|
And others whose names we probably forgot to add (email us and we'll put you
|
||||||
in here)
|
in here)
|
||||||
|
|
|
@ -703,7 +703,8 @@ EwinStateUpdate(EWin * ewin)
|
||||||
fs_zo = ewin->state.fullscreen || ewin->state.zoomed;
|
fs_zo = ewin->state.fullscreen || ewin->state.zoomed;
|
||||||
|
|
||||||
ewin->state.inhibit_actions = ewin->props.no_actions;
|
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;
|
EwinInhGetWM(ewin, focus) || ewin->state.iconified;
|
||||||
|
|
||||||
ewin->state.inhibit_move = EwinInhGetUser(ewin, move) || fs_zo;
|
ewin->state.inhibit_move = EwinInhGetUser(ewin, move) || fs_zo;
|
||||||
|
|
|
@ -402,8 +402,9 @@ ICCCM_Focus(const EWin * ewin)
|
||||||
Mode.events.time);
|
Mode.events.time);
|
||||||
}
|
}
|
||||||
|
|
||||||
XSetInputFocus(disp, EwinGetClientXwin(ewin), RevertToPointerRoot,
|
if (ewin->icccm.need_input)
|
||||||
Mode.events.time);
|
XSetInputFocus(disp, EwinGetClientXwin(ewin),
|
||||||
|
RevertToPointerRoot, Mode.events.time);
|
||||||
|
|
||||||
HintsSetActiveWindow(EwinGetClientXwin(ewin));
|
HintsSetActiveWindow(EwinGetClientXwin(ewin));
|
||||||
}
|
}
|
||||||
|
@ -717,7 +718,7 @@ ICCCM_GetWmProtocols(EWin * ewin)
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
if (prop[i] == ECORE_X_ATOM_WM_TAKE_FOCUS)
|
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)
|
else if (prop[i] == ECORE_X_ATOM_WM_DELETE_WINDOW)
|
||||||
ewin->icccm.delete_window = 1;
|
ewin->icccm.delete_window = 1;
|
||||||
#if USE_XSYNC
|
#if USE_XSYNC
|
||||||
|
|
Loading…
Reference in New Issue