ewmh_m2m icon indicating copy to clipboard operation
ewmh_m2m copied to clipboard

Window forgets unmaximized resolution after move

Open tobip opened this issue 4 years ago • 3 comments

After moving a maximized window from one screen to another, it "forgot" its unmaximized width and height settings.

Maybe there is a possibility to remember the unmaximized state?

At the moment, after moving a maximized window, and then unmaximizing it, the state gets changed from maximized to unmaximized, but the width and height stay almost the same.

tobip avatar Jan 25 '20 00:01 tobip

Yeah, I noticed this also.

Needs some investigations. Stay tuned.

AlexisBRENON avatar Jan 25 '20 14:01 AlexisBRENON

Alright.

Well I don't know how the script works, so this is just what I have in my mind: Maybe it's possible to unmaximize the window, then move it to the other screen, and then maximize it, immediately after each other.

tobip avatar Jan 25 '20 18:01 tobip

For what I remember, this used to be working in the past (because it was one of my expected feature).

The code works exactly like this:

  • unmaximize the window (because it's mandatory before moving it)
  • compute the relative size of the window with respect to the screen
  • move it to the new screen
  • resize it to match the same ratio (this allow to nicely handle screens of different sizes)
  • maximize it if it was maximized before.

However, the resize step does not seem to work anymore... I opened an issue BurntSushi/xpybutil#15 to get some help.

AlexisBRENON avatar Feb 11 '20 09:02 AlexisBRENON