mirror of
https://github.com/labwc/labwc.git
synced 2026-03-21 05:33:52 -04:00
move windows to back of cycle when they are minimized
This commit is contained in:
parent
b7d4df28c8
commit
7b7178ebfa
3 changed files with 14 additions and 0 deletions
|
|
@ -397,6 +397,7 @@ void foreign_toplevel_handle_create(struct view *view);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void desktop_raise_view(struct view *view);
|
void desktop_raise_view(struct view *view);
|
||||||
|
void desktop_move_view_to_end_of_cycle(struct view *to_end);
|
||||||
void desktop_focus_and_activate_view(struct seat *seat, struct view *view);
|
void desktop_focus_and_activate_view(struct seat *seat, struct view *view);
|
||||||
|
|
||||||
enum lab_cycle_dir {
|
enum lab_cycle_dir {
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,18 @@ desktop_cycle_view(struct server *server, struct view *current, enum lab_cycle_d
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
desktop_move_view_to_end_of_cycle(struct view *to_end) {
|
||||||
|
wl_list_remove(&to_end->link);
|
||||||
|
struct view *view;
|
||||||
|
wl_list_for_each_reverse (view, &to_end->server->views, link) {
|
||||||
|
wl_list_insert(&view->link, &to_end->link);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/* if the foreach did not return, this window was the only one in the list, so just reinsert it at the start */
|
||||||
|
wl_list_insert(&to_end->server->views, &to_end->link);
|
||||||
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
has_mapped_view(struct wl_list *wl_list)
|
has_mapped_view(struct wl_list *wl_list)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ view_minimize(struct view *view, bool minimized)
|
||||||
view->minimized = minimized;
|
view->minimized = minimized;
|
||||||
if (minimized) {
|
if (minimized) {
|
||||||
view->impl->unmap(view);
|
view->impl->unmap(view);
|
||||||
|
desktop_move_view_to_end_of_cycle(view);
|
||||||
} else {
|
} else {
|
||||||
view->impl->map(view);
|
view->impl->map(view);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue