Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaps create unequally sized windows #4296

Closed
pedrocr opened this issue Jun 30, 2019 · 2 comments · Fixed by #4310
Closed

Gaps create unequally sized windows #4296

pedrocr opened this issue Jun 30, 2019 · 2 comments · Fixed by #4310

Comments

@pedrocr
Copy link
Contributor

pedrocr commented Jun 30, 2019

When using gaps windows that are the same size become unequally sized. To make it obvious just open two windows side by side a do something like:

swaymsg gaps inner all set 500

The end result will be something like this:

unevengaps

While large gaps make this very noticeable it happens on any sized gap.

pedrocr added a commit to pedrocr/sway that referenced this issue Jun 30, 2019
To make sure inner gaps don't generate unequally sized windows always
apply a total of one inner gap to all children. Doing just this would
result in half-gaps around the workspace border so compensate for that
by adding gaps to the workspace.

Fixes swaywm#4296
@copypaste10
Copy link

copypaste10 commented Jul 2, 2019

I also use gaps and it appears to affect the left window. For example I use 2 Nemo windows. Whenever I type a filename into the current folder inside of Nemo, the left Nemo window size decreases.

To reproduce my example you have to start Nemo as x11 (because of floating type-ahead feature). GDK_BACKEND=x11 nemo
Or in case of wayland mode, put for_window [title="nemo"] floating enable into sway config

@RedSoxFan
Copy link
Member

@copypaste10 That's a Nemo issue and has nothing to do with this one. Since it's not setting a parent for the window, it's being treated as a top level window and is being tiled.

Gdk-Message: 22:40:02.388: Window 0x55897ba544d0 is a temporary window without parent, application will not be able to position it on screen.
(nemo:8748): Gdk-CRITICAL **: 22:40:02.388: gdk_window_get_effective_toplevel: assertion 'GDK_IS_WINDOW (window)' failed
(nemo:8748): Gdk-WARNING **: 22:40:02.388: Couldn't map as window 0x55897ba544d0 as popup because it doesn't have a parent

pedrocr added a commit to pedrocr/sway that referenced this issue Jul 6, 2019
Instead of tracking gaps per child apply gaps in two logical places:

1. In tiled containers use the layout code to add the gaps between
windows. This is much simpler and guarantees that the sizing of children
is correct.
2. In the workspace itself apply all the gaps around the edge. Here
we're in the correct position to size inner and outer gaps correctly and
decide on smart gaps in a single location.

Fixes swaywm#4296
pedrocr added a commit to pedrocr/sway that referenced this issue Jul 6, 2019
Instead of tracking gaps per child apply gaps in two logical places:

1. In tiled containers use the layout code to add the gaps between
windows. This is much simpler and guarantees that the sizing of children
is correct.
2. In the workspace itself apply all the gaps around the edge. Here
we're in the correct position to size inner and outer gaps correctly and
decide on smart gaps in a single location.

Fixes swaywm#4296
pedrocr added a commit to pedrocr/sway that referenced this issue Jul 14, 2019
Instead of tracking gaps per child apply gaps in two logical places:

1. In tiled containers use the layout code to add the gaps between
windows. This is much simpler and guarantees that the sizing of children
is correct.
2. In the workspace itself apply all the gaps around the edge. Here
we're in the correct position to size inner and outer gaps correctly and
decide on smart gaps in a single location.

Fixes swaywm#4296
pedrocr added a commit to pedrocr/sway that referenced this issue Jul 14, 2019
Instead of tracking gaps per child apply gaps in two logical places:

1. In tiled containers use the layout code to add the gaps between
windows. This is much simpler and guarantees that the sizing of children
is correct.
2. In the workspace itself apply all the gaps around the edge. Here
we're in the correct position to size inner and outer gaps correctly and
decide on smart gaps in a single location.

Fixes swaywm#4296
RedSoxFan pushed a commit that referenced this issue Jul 16, 2019
Instead of tracking gaps per child apply gaps in two logical places:

1. In tiled containers use the layout code to add the gaps between
windows. This is much simpler and guarantees that the sizing of children
is correct.
2. In the workspace itself apply all the gaps around the edge. Here
we're in the correct position to size inner and outer gaps correctly and
decide on smart gaps in a single location.

Fixes #4296
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants