When the user drags the message window or the sidebar window too much towards the edge of the main window, it may become too hard or even impossible to drag them back as towards the edge of the main window the cursor resizes the main window and doesn't allow dragging the sidebar separator. The only workaround in this case is to manually edit the Geany config file which is annoying.
This patch does two things: 1. When the sidebar/msgwindow divider is dragged to the edge of the window, at the 10px distance from the window border it "snaps" completely to the edge and toggles sidebar/msgwindow visibility. 2. When sidebar/msgwindow is toggled to be shown again, if its previous distance from the edge of the window is less than 10px, its size is restored to some reasonable size (300px for the sidebar, 200px for the message window)
This patch has been tested with all the sidebar/msgwindow location settings and should work correctly in all the configurations.
Fixes #4017. Fixes #1753. Fixes #3329. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/4023
-- Commit Summary --
* Improve sidebar and message window resizing behavior
-- File Changes --
M data/geany.glade (2) M src/callbacks.c (37) M src/msgwindow.c (15) M src/ui_utils.c (13)
-- Patch Links --
https://github.com/geany/geany/pull/4023.patch https://github.com/geany/geany/pull/4023.diff