feat(applets): add destroy tooltip popup action#1138
Open
hammerlink wants to merge 1 commit intopop-os:masterfrom
Open
feat(applets): add destroy tooltip popup action#1138hammerlink wants to merge 1 commit intopop-os:masterfrom
hammerlink wants to merge 1 commit intopop-os:masterfrom
Conversation
5 tasks
wash2
approved these changes
Mar 23, 2026
wash2
requested changes
Mar 23, 2026
src/app/cosmic.rs
Outdated
| } | ||
| #[cfg(feature = "wayland")] | ||
| crate::surface::Action::DestroyTooltipPopup => { | ||
| iced_winit::commands::popup::destroy_popup(*crate::applet::TOOLTIP_WINDOW_ID) |
Contributor
There was a problem hiding this comment.
this should be gated by the applet feature
Suggested change
| iced_winit::commands::popup::destroy_popup(*crate::applet::TOOLTIP_WINDOW_ID) | |
| #[cfg(feature = "applet")] | |
| { | |
| iced_winit::commands::popup::destroy_popup(*crate::applet::TOOLTIP_WINDOW_ID) | |
| } | |
| #[cfg(not(feature = "applet"))] | |
| { | |
| Task::none() | |
| } |
Author
This commit adds a new surface action to explicitly destroy the tooltip popup on `TOOLTIP_WINDOW_ID`, allowing proper cleanup when minimizing applets.
d975166 to
3e710ff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When an applet is minimized, its tooltip remains visible after activating the minimized button.
After the applet button is clicked it gets removed and it is no longer capable of detecting mouse movements.
Solution
After the applet button is removed destroy the tooltip popup.
At the moment the cosmic-applet-minimize cannot access the WindowId of the popup.
Therefor this PR exposes a Surface Action to destroy the tooltip popup on Window TOOLTIP_WINDOW_ID.
An alternative can be to expose
TOOLTIP_WINDOW_IDdirectly instead of adding a new Surface action. Will change if wanted.Related to pop-os/cosmic-panel#458
Needed for pop-os/cosmic-applets#1324
Checks