parent
235d4f9810
commit
0fb524dc8c
|
@ -1411,26 +1411,18 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
// if (!bd->client.icccm.accepts_focus) return;
|
// if (!bd->client.icccm.accepts_focus) return;
|
||||||
if ((!bd->client.icccm.accepts_focus) &&
|
if ((!bd->client.icccm.accepts_focus) &&
|
||||||
(!bd->client.icccm.take_focus))
|
(!bd->client.icccm.take_focus))
|
||||||
{
|
|
||||||
printf(" - SKIP I F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
/* dont focus an iconified window. that's silly! */
|
/* dont focus an iconified window. that's silly! */
|
||||||
if ((focus) && (bd->iconic))
|
if ((focus) && (bd->iconic))
|
||||||
{
|
return;
|
||||||
printf(" - SKIP H F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((bd->modal) && (bd->modal != bd))
|
if ((bd->modal) && (bd->modal != bd))
|
||||||
{
|
{
|
||||||
e_border_focus_set(bd->modal, focus, set);
|
e_border_focus_set(bd->modal, focus, set);
|
||||||
printf(" - SKIP G F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ((bd->leader) && (bd->leader->modal) && (bd->leader->modal != bd))
|
else if ((bd->leader) && (bd->leader->modal) && (bd->leader->modal != bd))
|
||||||
{
|
{
|
||||||
e_border_focus_set(bd->leader->modal, focus, set);
|
e_border_focus_set(bd->leader->modal, focus, set);
|
||||||
printf(" - SKIP F F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1444,11 +1436,9 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
e_border_focus_latest_set(bd);
|
e_border_focus_latest_set(bd);
|
||||||
bd->want_focus = 1;
|
bd->want_focus = 1;
|
||||||
bd->changed = 1;
|
bd->changed = 1;
|
||||||
printf(" - SKIP E F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_LOCALLY_ACTIVE);
|
e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_LOCALLY_ACTIVE);
|
||||||
printf(" - SKIP D F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ((!bd->client.icccm.accepts_focus) &&
|
else if ((!bd->client.icccm.accepts_focus) &&
|
||||||
|
@ -1459,11 +1449,9 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
e_border_focus_latest_set(bd);
|
e_border_focus_latest_set(bd);
|
||||||
bd->want_focus = 1;
|
bd->want_focus = 1;
|
||||||
bd->changed = 1;
|
bd->changed = 1;
|
||||||
printf(" - SKIP C F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_GLOBALLY_ACTIVE);
|
e_grabinput_focus(bd->client.win, E_FOCUS_METHOD_GLOBALLY_ACTIVE);
|
||||||
printf(" - SKIP B F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1478,7 +1466,6 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
e_border_focus_latest_set(bd);
|
e_border_focus_latest_set(bd);
|
||||||
bd->want_focus = 1;
|
bd->want_focus = 1;
|
||||||
bd->changed = 1;
|
bd->changed = 1;
|
||||||
printf(" - SKIP AA F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((focus) && (!bd->focused))
|
if ((focus) && (!bd->focused))
|
||||||
|
@ -1488,7 +1475,6 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
e_border_focus_latest_set(bd);
|
e_border_focus_latest_set(bd);
|
||||||
bd->want_focus = 1;
|
bd->want_focus = 1;
|
||||||
bd->changed = 1;
|
bd->changed = 1;
|
||||||
printf(" - SKIP A F %p %i %i\n", bd, focus, set);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if (bd->visible)
|
// if (bd->visible)
|
||||||
|
@ -1564,7 +1550,6 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
{
|
{
|
||||||
E_Event_Border_Focus_Out *ev;
|
E_Event_Border_Focus_Out *ev;
|
||||||
|
|
||||||
printf("unfocus previous\n");
|
|
||||||
edje_object_signal_emit(focused->bg_object, "e,state,unfocused", "e");
|
edje_object_signal_emit(focused->bg_object, "e,state,unfocused", "e");
|
||||||
if (focused->icon_object)
|
if (focused->icon_object)
|
||||||
edje_object_signal_emit(focused->icon_object, "e,state,unfocused", "e");
|
edje_object_signal_emit(focused->icon_object, "e,state,unfocused", "e");
|
||||||
|
@ -1576,7 +1561,6 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
|
|
||||||
ecore_event_add(E_EVENT_BORDER_FOCUS_OUT, ev,
|
ecore_event_add(E_EVENT_BORDER_FOCUS_OUT, ev,
|
||||||
_e_border_event_border_focus_out_free, NULL);
|
_e_border_event_border_focus_out_free, NULL);
|
||||||
printf("FOUT %s\n", bd->client.netwm.name);
|
|
||||||
|
|
||||||
/* FIXME: Sometimes we should leave the window fullscreen! */
|
/* FIXME: Sometimes we should leave the window fullscreen! */
|
||||||
// if (focused->fullscreen) e_border_unfullscreen(focused);
|
// if (focused->fullscreen) e_border_unfullscreen(focused);
|
||||||
|
@ -1620,14 +1604,12 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
printf("- F=%i, S=%i V=%i, W=%i\n", focus, set, bd->visible, bd->want_focus);
|
|
||||||
if (focus_changed)
|
if (focus_changed)
|
||||||
{
|
{
|
||||||
if (bd->focused)
|
if (bd->focused)
|
||||||
{
|
{
|
||||||
E_Event_Border_Focus_In *ev;
|
E_Event_Border_Focus_In *ev;
|
||||||
|
|
||||||
printf(" - focused = %p\n", focused);
|
|
||||||
focused = bd;
|
focused = bd;
|
||||||
//printf("set focused to %p\n", focused);
|
//printf("set focused to %p\n", focused);
|
||||||
|
|
||||||
|
@ -1639,7 +1621,6 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
|
|
||||||
ecore_event_add(E_EVENT_BORDER_FOCUS_IN, ev,
|
ecore_event_add(E_EVENT_BORDER_FOCUS_IN, ev,
|
||||||
_e_border_event_border_focus_in_free, NULL);
|
_e_border_event_border_focus_in_free, NULL);
|
||||||
printf("FIN %s\n", bd->client.netwm.name);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1656,7 +1637,6 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
|
|
||||||
ecore_event_add(E_EVENT_BORDER_FOCUS_OUT, ev,
|
ecore_event_add(E_EVENT_BORDER_FOCUS_OUT, ev,
|
||||||
_e_border_event_border_focus_out_free, NULL);
|
_e_border_event_border_focus_out_free, NULL);
|
||||||
printf("FOUT %s\n", bd->client.netwm.name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue