mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Merge pull request #2728 from RedSoxFan/move-sticky-on-evac
Move sticky containers in output_evacuate
This commit is contained in:
commit
e518c5dbaf
2 changed files with 30 additions and 5 deletions
|
|
@ -823,9 +823,16 @@ void container_floating_move_to_center(struct sway_container *con) {
|
|||
return;
|
||||
}
|
||||
struct sway_workspace *ws = con->workspace;
|
||||
bool full = con->is_fullscreen;
|
||||
if (full) {
|
||||
container_set_fullscreen(con, false);
|
||||
}
|
||||
double new_lx = ws->x + (ws->width - con->width) / 2;
|
||||
double new_ly = ws->y + (ws->height - con->height) / 2;
|
||||
container_floating_translate(con, new_lx - con->x, new_ly - con->y);
|
||||
if (full) {
|
||||
container_set_fullscreen(con, true);
|
||||
}
|
||||
}
|
||||
|
||||
static bool find_urgent_iterator(struct sway_container *con, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue