mirror of
https://github.com/swaywm/sway.git
synced 2025-11-11 13:29:51 -05:00
Slightly better multihead support
This commit is contained in:
parent
dd115cece3
commit
96d7ff1e19
4 changed files with 20 additions and 4 deletions
|
|
@ -44,10 +44,16 @@ void arrange_windows(swayc_t *container, int width, int height) {
|
|||
sway_log(L_DEBUG, "Arranging output at %d", x);
|
||||
child->x = x;
|
||||
child->y = y;
|
||||
arrange_windows(child, child->width, child->height);
|
||||
arrange_windows(child, -1, -1);
|
||||
x += child->width;
|
||||
}
|
||||
return;
|
||||
case C_OUTPUT:
|
||||
container->width = width;
|
||||
container->height = height;
|
||||
x -= container->x;
|
||||
y -= container->y;
|
||||
break;
|
||||
case C_VIEW:
|
||||
{
|
||||
struct wlc_geometry geometry = {
|
||||
|
|
@ -342,9 +348,8 @@ void add_output(wlc_handle output) {
|
|||
add_child(container, workspace);
|
||||
sway_log(L_DEBUG, "Added workspace %s for output %d", workspace->name, output);
|
||||
|
||||
workspace_switch(workspace);
|
||||
|
||||
if (root_container.focused == NULL) {
|
||||
workspace_switch(workspace);
|
||||
unfocus_all(&root_container);
|
||||
focus_view(workspace);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue