Kalmat / PyWinCtl

Cross-Platform module to get info on and control windows on screen
Other
179 stars 19 forks source link

Fix crash in small screens and refactor test (MacOS only) #80

Closed SamuMazzi closed 11 months ago

Kalmat commented 11 months ago

Thank you!

If I am not wrong, the position and size values are still the same than in previous version, right? Is the problem with small screens solved and, just curious, how?

SamuMazzi commented 11 months ago

Exactly, I left the same values, I just refactored a bit. Regarding the problem I just moved the window before making it bigger, so that it could have enough space to get larger.

Also I wanted to say that this piece of code lowered = npw.lowerWindow() doesn't return the correct value (in the test it actually doesn't get lowered) Maybe this isn't the right place to tell it, but I didn't want to forget that

Kalmat commented 11 months ago

Ah, Ok! Sorry for not realizing...

I will take a look into lowerWindow() method, thank you for pointing it out! The problem is that there is no way to lower a window using Apple Script. I had to work on a sort of "hack", but perhaps it's not working as intended.

Kalmat commented 11 months ago

By the way, the test_move() function is gorgeous! I didn't know that was even possible! You will never go to bed... without learning something new! HAHAHAHA!

I have adopted that solution for the rest of the OSs. Now all basic_* tests look the same.

Thank you!