forked from enlightenment/enlightenment
And fixup desktop switching when windows are closed/loose focus.
Kevin Brosius <cobra@compuserve.com> SVN revision: 6664
This commit is contained in:
parent
422fe23bfe
commit
4760f8227e
19
src/border.c
19
src/border.c
|
@ -128,6 +128,13 @@ e_border_update_borders(void)
|
|||
e_border_reshape(b);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for a focused border, else focus the desktop */
|
||||
if( !e_border_current_focused())
|
||||
{
|
||||
if( !e_desktop_raise_next_border())
|
||||
e_icccm_send_focus_to( e_desktop_window(), 1);
|
||||
}
|
||||
e_db_runtime_flush();
|
||||
|
||||
D_RETURN;
|
||||
|
@ -2635,6 +2642,10 @@ E_Border *
|
|||
e_border_current_focused(void)
|
||||
{
|
||||
Evas_List * l;
|
||||
E_Desktop * desk;
|
||||
|
||||
/* Only check for borders on the current desktop */
|
||||
desk = e_desktops_get(e_desktops_get_current());
|
||||
|
||||
D_ENTER;
|
||||
for (l = borders; l; l = l->next)
|
||||
|
@ -2642,7 +2653,9 @@ e_border_current_focused(void)
|
|||
E_Border *b;
|
||||
|
||||
b = l->data;
|
||||
if (b->current.selected)
|
||||
if (b->current.selected &&
|
||||
b->desk == desk
|
||||
)
|
||||
D_RETURN_(b);
|
||||
}
|
||||
for (l = borders; l; l = l->next)
|
||||
|
@ -2650,7 +2663,9 @@ e_border_current_focused(void)
|
|||
E_Border *b;
|
||||
|
||||
b = l->data;
|
||||
if (b->current.select_lost_from_grab)
|
||||
if (b->current.select_lost_from_grab &&
|
||||
b->desk == desk
|
||||
)
|
||||
D_RETURN_(b);
|
||||
}
|
||||
|
||||
|
|
|
@ -802,7 +802,6 @@ e_desktops_goto(int d, int ax, int ay)
|
|||
|
||||
e_icccm_set_desk_area(0, desk->desk.area.x, desk->desk.area.y);
|
||||
e_icccm_set_desk(0, desk->desk.desk);
|
||||
e_icccm_send_focus_to(e_base_win, 1);
|
||||
e_observee_notify_observers(E_OBSERVEE(desk), E_EVENT_DESKTOP_SWITCH, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue