mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-20 20:44:18 +02:00
Fix window positioning when switching to fullscreen
This commit is contained in:
parent
aa8f6b4208
commit
36f002dbe0
1 changed files with 9 additions and 7 deletions
16
keybinding.c
16
keybinding.c
|
|
@ -469,14 +469,16 @@ keybinding_workspace_fullscreen(struct cg_server *server) {
|
|||
struct cg_view *current_view = seat_get_focus(server->seat);
|
||||
struct cg_output *output = server->curr_output;
|
||||
|
||||
/* We are focused on the background */
|
||||
if(current_view == NULL) {
|
||||
struct cg_view *it = NULL;
|
||||
wl_list_for_each(it, &output->workspaces[output->curr_workspace]->views,
|
||||
link) {
|
||||
if(view_is_visible(it)) {
|
||||
struct cg_view *it = NULL, *tmp = NULL;
|
||||
wl_list_for_each_safe(it, tmp, &output->workspaces[output->curr_workspace]->views,
|
||||
link) {
|
||||
if(view_is_visible(it)) {
|
||||
if(current_view == NULL) {
|
||||
current_view = it;
|
||||
break;
|
||||
}
|
||||
if(&it->link!=&output->workspaces[output->curr_workspace]->views) {
|
||||
wl_list_remove(&it->link);
|
||||
wl_list_insert(&output->workspaces[output->curr_workspace]->views, &it->link);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue