Repository navigation
cornerbar applet: Don't toggle the desktop on every drag motion - #14031
Open
DerAntonia wants to merge 1 commit into
Open
DerAntonia wants to merge 1 commit into
DerAntonia wants to merge 1 commit into
Conversation
handleDragOver() is called for every pointer motion while a drag hovers over the applet. It called show_desktop(), which toggles the desktop, so dragging a file onto the corner made the windows flicker between hidden and shown. Use the idempotent workspace manager show_desktop() instead; clicking the applet still toggles. Fixes linuxmint#13831 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #13831
Problem
Dragging a file (e.g. from Nemo) onto the corner bar makes the windows flicker between hidden and shown instead of showing the desktop once.
handleDragOver()is called for every pointer motion while a drag hovers over the applet. It calledthis.show_desktop(), which usesglobal.workspace_manager.toggle_desktop(), so each motion event flipped the desktop state.Fix
In
handleDragOver(), call the idempotentglobal.workspace_manager.show_desktop()instead of toggling. Repeated calls during the drag now leave the desktop shown, so the file can be dropped onto it. The peek state is reset the same wayshow_desktop()already did. Clicking the applet still toggles as before.Testing
Tested on Linux Mint 22.3 / Cinnamon 6.6.9 (X11) with the patched applet in
~/.local/share/cinnamon/applets/: dragging a file from Nemo onto the corner now shows the desktop once without flickering, and clicking still toggles.🤖 Generated with Claude Code