GUI with +alwaysOnTop makes other windows always on top Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
iuc
Posts: 3
Joined: 18 Sep 2021, 12:12

GUI with +alwaysOnTop makes other windows always on top

18 Sep 2021, 12:58

[Moderator's note: Topic moved from Bug Reports.]

I made a GUI that stays on top of other windows.

With this UI on screen (not minimized), when I have another window focused (e.g. a browser), and I use the Windows key + D shortcut to show the desktop, then use the shortcut again, the said window now appears always on top.

Code: Select all

gui, test:new, +alwaysOnTop
gui, test:show, w250 h50
return

testGuiClose:
exitApp
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: GUI with +alwaysOnTop makes other windows always on top

19 Sep 2021, 07:38

unreproducible, win10 21h1 x64, ahk 1.1.33.10 u64

the browser is focused(edge), Win + D is pressed to view the desktop, Win + D is pressed to restore all windows, browser("said window") is not AlwaysOnTop
Image
iuc
Posts: 3
Joined: 18 Sep 2021, 12:12

Re: GUI with +alwaysOnTop makes other windows always on top

19 Sep 2021, 10:11

Sorry, I forgot to mention an extra step.

Have you tried to focus your open folder or visual studio after doing that?

win10 20h2 x64, ahk 1.1.33.10 u64

Image
User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: GUI with +alwaysOnTop makes other windows always on top

19 Sep 2021, 16:34

It looks like the other window already has +AlwaysOnTop.
If you want to keep your window on top of it, it needs to be shown without activating it (show option: "NA") after you have activated the other window.
That will keep it on top until the next time you click on your window or some other window and back.

To keep it going, monitor when you activate different windows and when the time is right do this.

Code: Select all

Gui, Show, NA
That... or just do what I normally do.

Code: Select all


SetTimer, PutOnTop, 1000

PutOnTop:
	Gui, Show, NA
	return

iuc
Posts: 3
Joined: 18 Sep 2021, 12:12

Re: GUI with +alwaysOnTop makes other windows always on top  Topic is solved

26 Sep 2021, 22:42

Sorry, it wasn't AHK's fault.

In my case, it was TeamViewer service's doing. Any window set always on top (with AHK or not) would cause this issue upon showing the desktop, until I stopped the service.
There are other programs that may cause this though. Here are some links that might help others with this issue: link#1 link#2 link#3

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], haomingchen1998, xask1 and 238 guests