Add option to hide on close - #741
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR repurposes the existing taskbar-related setting so that, when enabled, closing the main window hides it and prevents application exit; otherwise the close event proceeds normally. Implementation moves from window-state/taskbar-hint updates to a delete-event handler using gtk_widget_hide(), which is compatible with Wayland. Sequence diagram for hiding the main window on closesequenceDiagram
participant User
participant MainWindow
participant DeleteHandler
participant ProgramData
User->>MainWindow: close
MainWindow->>DeleteHandler: main_window_on_delete_event
DeleteHandler->>ProgramData: isHideTaskbarWhenMainWindowIconified()
alt hide-on-close enabled
DeleteHandler->>MainWindow: gtk_widget_hide
DeleteHandler-->>MainWindow: TRUE
MainWindow-->>User: window hidden, application remains running
else option disabled
DeleteHandler-->>MainWindow: FALSE
MainWindow-->>User: close proceeds normally
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
build failed @City-busz |
Instead of hiding the main window from the taskbar, hide the window on close if the option is checked. This works also on Wayland.
4a920f6 to
bd26a94
Compare
|
I removed the unused parameter to fix the build. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #741 +/- ##
==========================================
+ Coverage 52.47% 52.49% +0.01%
==========================================
Files 71 71
Lines 9004 9001 -3
==========================================
Hits 4725 4725
+ Misses 4279 4276 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



Instead of hiding the main window from the taskbar, hide the window on close if the option is checked. This works also on Wayland.
Summary by Sourcery
Allow users to hide the main window on close while keeping the application running.
New Features:
Enhancements: