forked from enlightenment/enlightenment
handle bizarre focus properties. ie take_focus - but a window that never
actually takes focus... SVN revision: 35365
This commit is contained in:
parent
c430855a1d
commit
dc88eeb646
|
@ -1410,7 +1410,6 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
|||
(!bd->client.icccm.take_focus)) return;
|
||||
/* dont focus an iconified window. that's silly! */
|
||||
if ((focus) && (bd->iconic)) return;
|
||||
|
||||
if ((bd->modal) && (bd->modal != bd))
|
||||
{
|
||||
e_border_focus_set(bd->modal, focus, set);
|
||||
|
@ -1421,6 +1420,37 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
|||
e_border_focus_set(bd->leader->modal, focus, set);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((focus) && (set) && (!bd->focused))
|
||||
{
|
||||
if ((bd->client.icccm.accepts_focus) &&
|
||||
(bd->client.icccm.take_focus))
|
||||
{
|
||||
if ((bd->visible) && (bd->changes.visible))
|
||||
{
|
||||
e_border_focus_latest_set(bd);
|
||||
bd->want_focus = 1;
|
||||
bd->changed = 1;
|
||||
return;
|
||||
}
|
||||
e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_LOCALLY_ACTIVE);
|
||||
return;
|
||||
}
|
||||
else if ((!bd->client.icccm.accepts_focus) &&
|
||||
(bd->client.icccm.take_focus))
|
||||
{
|
||||
if ((bd->visible) && (bd->changes.visible))
|
||||
{
|
||||
e_border_focus_latest_set(bd);
|
||||
bd->want_focus = 1;
|
||||
bd->changed = 1;
|
||||
return;
|
||||
}
|
||||
e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_GLOBALLY_ACTIVE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((bd->visible) && (bd->changes.visible))
|
||||
{
|
||||
if ((bd->want_focus) && (set) && (!focus))
|
||||
|
|
Loading…
Reference in New Issue