GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
557 stars 60 forks source link

[Bug]: App incorrectly remembers window dimensions when in a specific adaptive layout #901

Closed TriVoxel closed 14 hours ago

TriVoxel commented 5 months ago

Describe the bug

On desktop, when the app is resized to a mobile layout and then closed, it will re-open in the last-used window dimension. Same goes for the next adaptive size up. However, in the third adaptive state, it will not re-open in windowed mode, it will open fullscreen.

Steps To Reproduce

  1. Resize the window to where there is padding to the left and right of the posts on the Home feed
  2. Close the application
  3. Re-open the application

Logs and/or Screenshots

Will remember window size properly: Screenshot from 2024-04-12 00-34-10

Will not remember window size properly: Screenshot from 2024-04-12 00-34-17

Video demo: Screencast from 2024-04-12 00-36-26.webm

Instance Backend

Mastodon

Operating System

Fedora Silverblue

Package

Flatpak

Troubleshooting information

os: GNOME 46 (Flatpak runtime) prefix: /app flatpak: true version: 0.7.2 (production) gtk: 4.14.1 (4.14.1) libadwaita: 1.5.0 (1.5.0) libsoup: 3.4.4 (3.4.4) libgtksourceview: 5.12.0 (5.12.0)

Additional Context

I have an ultrawide monitor (21:9), so this issue is especially obvious to me.

GeopJr commented 5 months ago

However, in the third adaptive state, it will not re-open in windowed mode, it will open fullscreen.

I'm pretty sure that's just a shell/mutter thing, though I'd love it if you could confirm. From my end, if I for example open Files, make the window really big, almost touching the edges of my screen - without maximizing it, close it and then re-open it, it will open maximized

For the sake of debugging, here's Tuba's log doing the same as above (which reproduced your issue):

Start is what Tuba set the window size, End is what Tuba saved, W is width, H is height, M is maximized

End: W737 H600 Mfalse
Start: W737 H600 Mfalse
End: W1868 H998 Mfalse
Start: W1868 H998 Mfalse

I closed the window at a small size, opened it and it was exactly as left. Tuba loaded and saved the dimensions correctly. Then I made it really big and closed it. Tuba saved it correctly. But upon opening it, it was maximized - even though Tuba set it to the values set prior.

TriVoxel commented 5 months ago

@GeopJr Yeah, definitely a GNOME/Mutter thing. In hindsight, I think I've noticed this in other apps, making it kind of impractical to use windows well... windowed. I think GNOME hard-coded the window dimensions to where a certain width counts as re-opening maximized, but on an ultra-wide where I often have things with wider than average windows, it's just annoying lol. I'll open an issue there sometime...

GeopJr commented 14 hours ago

[PR Cleanup] closing as there is nothing I can do and it's a shell/mutter thing