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

Fixes for behavior when workspaces are moved back to on output on hotplug #920

Merged
merged 7 commits into from
Oct 21, 2024

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Oct 11, 2024

I've been annoyed by how this adds an empty initial workspace which ends up focused instead of one of the non-empty ones. For some reason that's still happening... I also see some other things that could be fixed.

It seems there also is (sometimes?) an issue where a window becomes unresponsive after being moved. Probably a frame callback issue... I need to look into that more.

@hojjatabdollahi
Copy link

Also it messes up the workspace numbers when you plug your monitors back in.

image

@ids1024
Copy link
Member Author

ids1024 commented Oct 12, 2024

cc6dace should fix the workspace numbering.

Perhaps some of this could be manged a bit differently to make sure it stays in sync without keeping track of things in multiple places.

`from_raw_parts()` is only sound if the alignment is the same, so it
can't be used to covert to a `Vec<u8>` from a type with a greater
alignment.

This isn't hard to avoid, luckily.
This resulted in a somewhat weird effect, where the empty workspace at
the end on the monitor has an `output_stack` with the other output, so
a window created there is moved back to to second output when it is
re-connected. This seems unexpected.
…utput

Instead of preserving the active workspace index, which may not match if
a workspace before it has been moved back to another output.
Previously, workspace numbering could end up with numbers skipped,
because an intermediate workspace was moved.
Maybe there's some reason for this, but I don't think the first loop
needs to handle the new set.

I do not expect this to change behavior.
`WorkspaceSet::new()` now creates a set with no workspaces, instead of
one with a single workspace.
@Drakulix Drakulix marked this pull request as ready for review October 21, 2024 16:10
@Drakulix Drakulix merged commit 2497992 into master Oct 21, 2024
7 checks passed
@Drakulix Drakulix deleted the workspace branch October 21, 2024 16:10
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.

3 participants