Closed fnix2 closed 2 years ago
Nice work, and good to see that there are still people caring about and contributing PRs to Viewnior :)
On my system (Arch Linux, openbox), the behavior with this patch is very buggy. If I move the window towards the side of the screen and start to resize it, it will jump between the center of the screen and back to where it was. It continues to flicker back and forth for as long as I keep resizing it. It might be that the behavior is different on other systems, but on this machine, the patch does not play nice with the system.
While it works, it does conflict for me with preference : Fit to window mode, or applied patch : Best fit The issue is when changing to next/prev image the window scales back to original image size, instead of maintaining my prefered window size.
On my system (Gnome 40 on Wayland) the PR works well until I try resizing - the window start moving around as @sjoblomjsqueed describes. I played around looking for a simple fix, but couldn't find anything stable enough - adding gtk_window_move
, gtk_window_set_gravity
, gtk_window_set_position
, and gtk_main_iteration
in various constellations does not work every time. So I think unless a heavier "machinery" is implemented to listen to resizes, redraws, etc and position the window accordingly, then centering the window would be buggy/unreliable. At this point I think the feature is not worth the effort :thinking:
@fnix2 Thanks for the PR. If you can resolve the issues above and update accordingly I can take a look at this again :+1:
Ok. If I succeed.
When the "Adjust window size" checkbox is checked, positions the window in the center when scrolling through images