AlexisBRENON / ewmh_m2m

EWMH-compliant move to monitor utility
https://pypi.org/project/ewmh-m2m/
MIT License
90 stars 5 forks source link

Error when no screen found #22

Closed AlexisBRENON closed 1 year ago

AlexisBRENON commented 1 year ago

@juleswh I tried something with a context manager, which make the things clearer (I feel). Can you try it (I don’t have workstation to test it...) ? Does it work as expected ?

juleswh commented 1 year ago

Apparently the upgrade breaks everything. -> not the upgrade in cause, it's another bug.

Apart from that, rolling back to c3929dc, there is only one bug :

From the code, I really can't understand why. In situations where the window is moved as expected, there are no problems with the maximization.

juleswh commented 1 year ago

I updated my comment. The reported bug is the only new thing. The other bug I though were due to the upgrade might not be new, it occurs when a window is across two screens.

AlexisBRENON commented 1 year ago

Didn’t read the documentation:

If an unhandled exception occurs in the block, it is reraised inside the generator at the point where the yield occurred. Thus, you can use a try…except…finally statement to [...] ensure that some cleanup takes place

Should be better now.

juleswh commented 1 year ago

All good now !