centered-cinnamon-dock: fix dock becoming invisible after a workspace switch#1063
Open
Rogue1-OC wants to merge 1 commit into
Open
centered-cinnamon-dock: fix dock becoming invisible after a workspace switch#1063Rogue1-OC wants to merge 1 commit into
Rogue1-OC wants to merge 1 commit into
Conversation
Contributor
|
Good catch, thanks! I think it'd be safest if you bump both the changelog and metadata.json to 1.4 with your changes, so we skip my muddied waters :) |
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
With
autoHide: falseandhideOnFullscreen: true(the default mode), the dock panel becomes invisible after any workspace switch (keyboardCtrl+Alt+←/→or a 3-finger touchpad swipe). The actor is stillshow()n but left atopacity = 0, so the dock vanishes until something else (closing a fullscreen window, or a hover that callsshowPanel) happens to restore it.Reproduced on Cinnamon 6.6.7 (X11).
Root cause
In the
workspace-switchedhandler (6.4/extension.js, ~line 1186) the panel is blanked to recompute geometry, but nothing restores it on theautoHide:false/ no-fullscreen path:applyStyle()computessavedOpacity = state.isHidden ? 0 : panel.actor.opacity. Since opacity was just set to0andisHiddenisfalse,savedOpacityis 0, and it re-applies that 0 — preserving the invisible state.Mainloop.timeout_add(100, …)only ever hides (autoHide/hideOnFullscreen); withautoHide:falseand no fullscreen window it does nothing.startSizeMonitoringonly corrects opacity when it is strictly between 0 and 255 (opacity > 0 && opacity < 255), so exactly-0 is never recovered.Fix
Restore opacity after the style recompute. The existing 100ms timeout still re-hides correctly when
hideOnFullscreen/autoHiderequire it, so fullscreen-hide behavior is unchanged.Verified on Cinnamon 6.6.7: the dock now stays visible across workspace switches, and
hideOnFullscreenstill hides it when a fullscreen window is focused.I kept this to the minimal code change. The
metadata.jsonversion is currently1.2while the CHANGELOG already lists a1.3entry, so I left the version bump / changelog to you to avoid muddying that — happy to add it if you prefer.cc @mostlynick3 (original author)