xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
584 stars 274 forks source link

Issues with dual-screen setup and copyToAll #797

Closed Robotix-00 closed 1 year ago

Robotix-00 commented 1 year ago

Hi, as stated in the title, if copyToAll from XMonad.Actions.CopyWindow (xmonad version 0.17.1) is used on a setup with two screens, it just doesnt work. If the copyToAll command is called, the selected window moves to the other (inactive) screen. When trying to switch screens, the window moves to the new inactive screen. It seems to work somehow, since the window is always visible (just on the wrong screen) independend from to workspace. I tested it with my second screen turned off and it worked as expected.

Is there a way for the copied window to either stay on the screen it originated from or to always be on the active screen?

geekosaur commented 1 year ago

copyToAll is a bit of a hack: it places the window id in every workspace, but doesn't and can't make an actual copy of the window. Therefore it gets rendered in the last position that X.O.windows places it. Looking at the code, I think the active workspace gets rendered first, which would mean the it would be placed in the last-rendered inactive but visible workspace. It's something of a bad fit with multi-monitor setups, in short.

TheMC47 commented 1 year ago

It's broken, and I don't think it's "fixable". I wanted to work on a replacement but didn't get to it yet.

slotThe commented 1 year ago

I think

copyToAll […] doesn't and can't make an actual copy of the window.

is key here. AFAIK, this is something that would need to be done on the compositor side.

Robotix-00 commented 1 year ago

Uppon further testing it turns out, that this issue only applies to floating windows. Any "normal" window remains on the same screen. Is there some way of using this?

geekosaur commented 1 year ago

Probably not, unless https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Layout-Monitor.html does what you want. Or you're willing to doIgnore the window, but then you can't focus or interact with it.