aichingm / lonewolf

Organize and track your tasks with ease and flexibility
GNU General Public License v3.0
27 stars 1 forks source link

Automatically remember window size #10

Closed nekohayo closed 10 months ago

nekohayo commented 10 months ago

As tested with the Flathub flatpak version on Fedora 39 in a Wayland GNOME session,

when restarting the app, the window size is reset to the default size. Instead, it should automatically remember and restore the window size.

aichingm commented 10 months ago

I will see if there is something in the framework (Tauri) which could be used to fix this or if this is something which would need a custom solution.

Thanks for reporting this issue!

aichingm commented 10 months ago

Note to self: https://github.com/tauri-apps/tauri-plugin-window-state

aichingm commented 10 months ago

fixed in bd2480196794c0064f3ca294501a1e6a58ecf03e, released on flathub in version 1.2.0

nekohayo commented 10 months ago

I think there is a small bug with the way this was implemented: the window height expands a bit on every startup. It seems as if it includes (or excludes?) the window decoration and the header area (i.e. just above the content columns) in the calculation and this somehow increases it by the height of the window titlebar everytime? I've observed this on the Wayland version of GNOME, but haven't tried other WMs/DEs.

A side-effect of this is, in WMs like Mutter / GNOME Shell, once the height reaches the monitor's available height eventually after a couple of startups, the window will get automatically maximized.

aichingm commented 10 months ago

Hm, that's interesting. Lonewolf does not do anything spacial here. It is just using a plugin that comes with the framework and there is not too much going on. Basically just getting props from a gtk::ApplicationWindow and setting them on start up. The other unhelpful thing I can tell you is that it work in Arch+X+Plasma5 (with and without flatpak) without this issue.

Maybe I find time on the weekend to try it out on Fedora+Wayland+Gnome maybe Ubuntu+Wayland+Gnome too. But I think this is something which would needed to be fixed upstream in https://github.com/tauri-apps/tauri-plugin-window-state/

aichingm commented 10 months ago

I did tests with a few options:

OS DE DS Result Description
Arch KDE X11 :sunny: Size and Position are working
Fedora 39 Gnome Wayland :cloud: Size and position are “random”
Ubuntu 23.10 Gnome Wayland :cloud: Size and position are “random”
Ubuntu 23.10 Gnome X11 :partly_sunny: Size Works, position shifts