overview: click empty workspace cell to switch + close overview#189
Open
kanikamaxxing wants to merge 2 commits into
Open
overview: click empty workspace cell to switch + close overview#189kanikamaxxing wants to merge 2 commits into
kanikamaxxing wants to merge 2 commits into
Conversation
The mapped monitor object in AxctlService discards mon.metadata.x/y/transform so monitorData.x is undefined for every monitor. OverviewWindow's position math falls back to 0, which works for the monitor at the origin but renders windows on any other monitor outside the thumbnail bounds (the global window x is used without the monitor offset subtracted). Also drops the per-monitor window filter in Overview so each overview shows all windows across monitors, and computes per-window scale from the window's own monitor width so cross-monitor windows fit the cell properly instead of being sized for the overview's monitor. OverviewWindow now also pins the target workspace to the drop monitor after movetoworkspacesilent, so drops on cells in monitor A's overview actually land on monitor A regardless of where the workspace currently lives. And imports qs.modules.bar.workspaces so the existing CompositorData reference on drag finalize stops throwing ReferenceError. Repro for the primary bug: dual-monitor setup with monitors at non-zero offsets. The overview on the second monitor renders all window thumbnails outside their cell because monitorData.x is undefined and global x positions are used as-is.
Single-click on an empty workspace cell in the overview now switches to that workspace and closes the overview, so the user can immediately interact with or open new windows on the empty workspace. Previously single-click would only switch the workspace and leave the overview open (a double-click was needed to close it), which made the empty-cell flow feel like an extra step. Also fixes a stale-state issue where draggingTargetWorkspace was not always reset to -1 after a prior drag, blocking subsequent legitimate clicks via the existing guard. The new handler resets draggingTargetWorkspace defensively and uses hyprctl directly to avoid the same axctl edge cases that prevented the workspace switch from firing.
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.
Summary
Single-click on an empty workspace cell in the overview now switches to that workspace and closes the overview. Previously a single click would only switch the workspace and leave the overview open, so opening a new window on an empty workspace required clicking the cell, then closing the overview, then spawning the window — two extra steps.
Also fixes a small stale-state issue where
draggingTargetWorkspacewasn't always reset to-1after a prior drag, which let the existing=== -1guard block subsequent legitimate clicks until the next drag.Changes
Overview.qmlcellMouseArea.onClicked: close the overview viaVisibilities.setActiveModule(""), resetdraggingTargetWorkspacedefensively, then dispatch the workspace switch.hyprctl dispatch workspace <n>directly via a childProcessso the click-to-switch path doesn't depend onAxctlService.dispatchsucceeding for empty workspaces (some edge cases there).onDoubleClickedhandler since single-click now does what double-click did.Test plan
— robin