-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hello,
I know it's been a long time since the release of this tool but I've got a question.
I'd want to make the tool to disable the topmost state when using argument -r or --reset.
def enumHandler(hwnd, lParam):
if win32gui.IsWindowVisible(hwnd):
if sys.argv[1].lower() in win32gui.GetWindowText(hwnd).lower():
win32gui.SetWindowPos(hwnd, -1, 0, 0, 0, 0, 0x0001)
return True
elif sys.argv[1].lower() in win32gui.GetWindowText(hwnd).lower()
and sys.argv[2] in ["-r", "-reset", "--reset", "--r"]:
win32gui.SetWindowPos(hwnd, 1, 0, 0, 0, 0, 0x0001)
return True
I just added that elif to your code so if there is an -r argument the topmost state should be disabled and window should be no longer placed above all non-topmost windows. As you can see I've set the hWndInsertAfter parameter to HWND_BOTTOM (1), but it doesn't work.
Any suggestions? Thanks a lot π
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels