wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

core: transfer views to same workspace as on destroyed output

Open lcolitti opened this issue 1 year ago • 3 comments

Currently, when an output is destroyed, views are transferred to the new output in roughly the same position as they were on the old output, but they are all transferred to the first workspace.

This is annoying: if they were not on the first workspace, then the user must have moved them, and after they're transferred, the user must will have to move them agein.

Instead, in the (common?) case that the old and the new output have the same number of workspaces, move each view to the same workspace it was on before.

lcolitti avatar Mar 29 '24 11:03 lcolitti

Is this not able to be fixed by only modifying the preserve-output plugin? Seems like that might be a better place for this to live.

soreau avatar Mar 29 '24 14:03 soreau

Is this not able to be fixed by only modifying the preserve-output plugin? Seems like that might be a better place for this to live.

Perhaps, but why require the user to run the preserve output plugin to get the correct behaviour? Core obviously needs to do the right thing here in case the user is not running the plugin. And in fact the code does try to do the right thing, by putting the views in roughly the same place as they were on the previous output, scaled by the ratio of output sizes. This commit just makes it put the views on the right desktop as well. :smile:

lcolitti avatar Mar 31 '24 07:03 lcolitti

I think the idea in general makes sense when destroying an output. It might make sense to add more flags to the function (instead of a bool). Maybe even add two overloads (to avoid breaking changes), one bool, one with flags, have one call the other :)

Done

lcolitti avatar Apr 04 '24 12:04 lcolitti