-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Windows not equal sizes after leaving fullscreen. #3547
Comments
it swaybar?. |
Had a look at the code to try and see what was happening. It seems the sequence of events is something like this:
Fixing this requires either not keeping the fullscreen width/height in the container width/height or changing the layout calculations to operate on saved_width and saved_height when fullscreen. The first option seems less of a hack but may require deeper surgery in the display code. |
If there is more than one new window layout correctly by calculating the default size of the new windows using the information of how many of them there are in total. This helps with issue swaywm#3547 but doesn't fix it in all situations. Things now work correctly if the first layout of new windows happens after leaving fullscreen. But if for some reason an arrange_container() gets called while we are fullscreen the windows will still be incorrectly sized after saved_width/save_height get used to restore the first window's size before going fullscreen.
If there is more than one new window layout correctly by calculating the default size of the new windows using the information of how many of them there are in total. This helps with issue swaywm#3547 but doesn't fix it in all situations. Things now work correctly if the first layout of new windows happens after leaving fullscreen. But if for some reason an arrange_container() gets called while we are fullscreen the windows will still be incorrectly sized after saved_width/saved_height get used to restore the first window's size before going fullscreen.
In fullscreen mode position/dimensions of the fullscreen container were being changed and then restored on unfullscreen. This would break things that manipulated those dimensions while the window was fullscreen. Instead have the rendering code handle the positioning directly and leave the container information alone. Fixes swaywm#3547
In fullscreen mode position/dimensions of the fullscreen container were being changed and then restored on unfullscreen. This would break things that manipulated those dimensions while the window was fullscreen. Instead have the rendering code handle the positioning directly and leave the container information alone. Fixes swaywm#3547
If there is more than one new window layout correctly by calculating the default size of the new windows using the information of how many of them there are in total. This helps with issue swaywm#3547 but doesn't fix it in all situations. Things now work correctly if the first layout of new windows happens after leaving fullscreen. But if for some reason an arrange_container() gets called while we are fullscreen the windows will still be incorrectly sized after saved_width/saved_height get used to restore the first window's size before going fullscreen.
When a container that includes a child that's fullscreen gets re-arranged also adjust the saved width/height of the fullscreen window so that on fullscreen exit the layout is correct. Fixes swaywm#3547
When a container that includes a child that's fullscreen gets re-arranged also adjust the saved width/height of the fullscreen window so that on fullscreen exit the layout is correct. Fixes swaywm#3547
If there is more than one new window layout correctly by calculating the default size of the new windows using the information of how many of them there are in total. This helps with issue swaywm#3547 but doesn't fix it in all situations. Things now work correctly if the first layout of new windows happens after leaving fullscreen. But if for some reason an arrange_container() gets called while we are fullscreen the windows will still be incorrectly sized after saved_width/saved_height get used to restore the first window's size before going fullscreen.
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. Fixes swaywm#3547
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. Fixes swaywm#3547
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. Fixes swaywm#3547
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. It also avoids accumulating error from the last window being given any leftover space in the container. Fixes swaywm#3547 Fixes swaywm#4297
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. Fixes swaywm#3547 Fixes swaywm#4297
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. Fixes swaywm#3547 Fixes swaywm#4297
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. Fixes swaywm#3547 Fixes swaywm#4297
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. Fixes swaywm#3547 Fixes swaywm#4297
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. To do this several parts are reworked: - The vertical and horizontal arrangement code is ajusted to work with fractions instead of directly with width/height - The resize code is then changed to manipulate the fractions when working on tiled containers. - Finally the places that manipulated width/height are adjusted to match. The adjusted parts are container split, swap, and the input seat code. It's possible that some parts of the code are now adjusting width and height only for those to be immediately recalculated. That's harmless and since non-tiled containers are still sized with width/height directly it may avoid breaking other corner cases. Fixes swaywm#3547 Fixes swaywm#4297
If there is more than one new window layout correctly by calculating the default size of the new windows using the information of how many of them there are in total. This helps with issue #3547 but doesn't fix it in all situations. Things now work correctly if the first layout of new windows happens after leaving fullscreen. But if for some reason an arrange_container() gets called while we are fullscreen the windows will still be incorrectly sized after saved_width/saved_height get used to restore the first window's size before going fullscreen.
Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. To do this several parts are reworked: - The vertical and horizontal arrangement code is ajusted to work with fractions instead of directly with width/height - The resize code is then changed to manipulate the fractions when working on tiled containers. - Finally the places that manipulated width/height are adjusted to match. The adjusted parts are container split, swap, and the input seat code. It's possible that some parts of the code are now adjusting width and height only for those to be immediately recalculated. That's harmless and since non-tiled containers are still sized with width/height directly it may avoid breaking other corner cases. Fixes #3547 Fixes #4297
Similar to #2866.
Steps to produce:
On i3, the windows would be of equal size.
The text was updated successfully, but these errors were encountered: