Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docking: fix window picker space for multi-monitor environments #2158

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

taoky
Copy link
Contributor

@taoky taoky commented Mar 16, 2024

Attempted to fix #2154.

This PR:

  • Checks whether the dock is in primary monitor in _computeWorkspacesBoxForState. It looks like that this function only cares about the workspace on primary monitor, as original GNOME dock is in primary one.
  • Adds a hook for WorkspacesView.SecondaryMonitorDisplay._getWorkspacesBoxForState. This function is similar to _computeWorkspacesBoxForState, and looks like the correct function to hook without glitches.

In _getWorkspacesBoxForState:

  • maybeAdjustBoxSize is not reused as the workspace in secondary monitor does not have things like searchBox.

  • Only bottom dock is handled, as it looks like nothing is wrong with docks positioned at left/right, and... I'm not sure how dock at top shall look like.

  • preferredHeight might be too large here:

    image

    But there's no this.spacing inside St.Widget :(

And this only fixes the window picker part. A similar bug in multi-monitor environments, when "Workspaces on primary display only" is chosen, still exists when overview state is app grid -- but this could be triggered even without any extensions and thus a gnome-shell bug at present (https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5316), though the space between dock and workspace is still too small.

@3v1n0
Copy link
Collaborator

3v1n0 commented Mar 21, 2024

Oh, thanks for looking into this!

Let's see if #2166 causes this to break before merging

@taoky taoky force-pushed the multimonitor-window-picker-fix branch from 149b1f5 to 65ed1ea Compare March 28, 2024 08:03
@3v1n0 3v1n0 merged commit 1322cf7 into micheleg:master Apr 8, 2024
1 check passed
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.

In multi-monitor setup dash dock could overlap window title tooltips in overview
2 participants