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

Let the current screen win in the fight for dupes #445

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

LSLeary
Copy link
Contributor

@LSLeary LSLeary commented Mar 30, 2023

windows generates mappings one screen at a time, starting with the
current. Tracking the windows it's already generated mappings for,
it excludes them from the tiles under consideration, hence supporting
window duplication in a first-biased manner. This allows the current
screen to win against any contenders and keep duplicated tiles within
reach.

However, it neglects to extend this treatment to floats; they end up
mapped in a last-biased manner. Consequently, duplicated floats become
very slippery, escaping to any inactive screen they can. This change
rectifies that issue.

See: xmonad/xmonad-contrib#797

Disclaimer: I haven't actually tested this yet, but I'd rather put it up now than let it stagnate until I get around to rebuilding my system xmonad.

It's not clear whether or not this change merits a changelog entry.

Checklist

  • I've read CONTRIBUTING.md

  • I've confirmed these changes don't belong in xmonad-contrib instead

  • I've considered how to best test these changes (property, unit,
    manually, ...) and concluded: XXX

  • I updated the CHANGES.md file

Copy link
Member

@slotThe slotThe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear whether or not this change merits a changelog entry.

If this really fixed xmonad/xmonad-contrib#797 then I'd say it definitely does. @Robotix-00 care to give this a try?

@geekosaur
Copy link
Contributor

Works here with a quick check.

@Robotix-00
Copy link

I can also confirm, that the copied window now appears on the currently selected screen rather than the last rendered one, which was always one of the unselected ones.
Its more pleasant, if the window doesn't try to escape from your cursor.

The change that would make this feature for me perfect would be, if the window were to stay on the screen it was "copied" on and doesn't move, no matter which screen is selected currently. I assume, without any expertise or insights into the code, that this would be a rather complicated change, so I am happy with this solution.
Thank you!

@TheMC47
Copy link
Member

TheMC47 commented Apr 1, 2023

The change that would make this feature for me perfect would be, if the window were to stay on the screen it was "copied" on and doesn't move, no matter which screen is selected currently.

That's the reason I'm not using that module. I have a draft for a module that sticks the window on a screen. Though it looks like it should work, the jmplementation fails because I did it as a logHook and called windows inside, which unbeknownst to me, is a big no no. I didn't have time to debug it with the core rewrite (notably #433), but if it works, I'll ping you

@Robotix-00
Copy link

That'd be great, thanks and godspeed to you.

@slotThe
Copy link
Member

slotThe commented Apr 3, 2023

@LSLeary I'd say put it into CHANGES (with perhaps a nod to X.A.CopyToAll) and then feel free to merge

`windows` generates mappings one screen at a time, starting with the
current. Tracking the windows it's already generated mappings for,
it excludes them from the tiles under consideration, hence supporting
window duplication in a first-biased manner. This allows the current
screen to win against any contenders and keep duplicated tiles within
reach.

However, it neglects to extend this treatment to floats; they end up
mapped in a last-biased manner. Consequently, duplicated floats become
very slippery, escaping to any inactive screen they can. This change
rectifies that issue.

See: xmonad/xmonad-contrib#797
@LSLeary
Copy link
Contributor Author

LSLeary commented Apr 3, 2023

@slotThe Amended and rebased. I don't have merge rights for core though, only contrib.

@slotThe
Copy link
Member

slotThe commented Apr 3, 2023

Perfect, thanks!

@slotThe slotThe merged commit eeac754 into xmonad:master Apr 3, 2023
14 checks passed
@LSLeary LSLeary deleted the current-wins branch April 3, 2023 12:54
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.

None yet

5 participants