make sure y is in screen

This commit is contained in:
iLLiCiTiT 2021-11-08 17:22:35 +01:00
parent 8bb4e42465
commit 05b6390172

View file

@ -20,6 +20,8 @@ def center_window(window):
screen_geo = desktop.screenGeometry(screen_idx)
geo = window.frameGeometry()
geo.moveCenter(screen_geo.center())
if geo.y() < screen_geo.y():
geo.setY(screen_geo.y())
window.move(geo.topLeft())