mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
fixed fullscreen & focusing
This commit is contained in:
parent
322989c431
commit
824a3d81aa
2 changed files with 26 additions and 10 deletions
|
|
@ -286,6 +286,14 @@ static bool cmd_fullscreen(struct sway_config *config, int argc, char **argv) {
|
|||
swayc_t *container = get_focused_container(&root_container);
|
||||
bool current = (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) > 0;
|
||||
wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current);
|
||||
//Resize workspace if going from fullscreen -> notfullscreen
|
||||
//otherwise just resize container
|
||||
if (current) {
|
||||
while (container->type != C_WORKSPACE) {
|
||||
container = container->parent;
|
||||
}
|
||||
}
|
||||
//Only resize container when going into fullscreen
|
||||
arrange_windows(container, -1, -1);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue