Skip to content

cornerbar applet: Don't toggle the desktop on every drag motion - #14031

Open
DerAntonia wants to merge 1 commit into
linuxmint:masterfrom
DerAntonia:cornerbar-dnd-flicker
Open

DerAntonia wants to merge 1 commit into
linuxmint:masterfrom
DerAntonia:cornerbar-dnd-flicker

Conversation

@DerAntonia

Copy link
Copy Markdown

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 called this.show_desktop(), which uses global.workspace_manager.toggle_desktop(), so each motion event flipped the desktop state.

Fix

In handleDragOver(), call the idempotent global.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 way show_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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Window flickering when hovering "Show Desktop" zone during file drag from Nemo

1 participant