Menu is obscured by the top window
Menu is obscured by the top window
Today I updated to 2.0.4, and I found that a menu that is displayed above the top window is not displayed anymore, it is blocked by this top window. In the version before 2.0.4, the menu was always displayed normally.
Is this a bug or a new feature that I didn't notice?
Is this a bug or a new feature that I didn't notice?
Re: Menu is obscured by the top window
Sorry, this problem only occurs with AutoHotkey-H v2.0.4 maintained by thqby.
@thqby
[Mod action: Moved topic from the main section to the AHK_H section.]
@thqby
Code: Select all
t:=gui()
t.show("x200 y200 w200 h200")
WinSetAlwaysOnTop 1, t.hwnd
MyMenu := Menu()
MyMenu.Add "Item 1", MenuHandler
MyMenu.Add "Item 2", MenuHandler
MyMenu.Add
MyMenu.Show(200, 200)
MenuHandler(Item, *) {
MsgBox "You selected " Item
}
MsgBox
[Mod action: Moved topic from the main section to the AHK_H section.]
Re: Menu is obscured by the top window
I also merged v2.1-alpha.1, and @lexikos added code so that scripts can display menus without blocking, which also caused this problem.
Re: Menu is obscured by the top window
Indeed, this problem also occurs in L2.1.
So should this topic be converted to the "Bug Reports" section?
So should this topic be converted to the "Bug Reports" section?
Re: Menu is obscured by the top window
@thqby This issue doesn't seem to be getting fixed anytime soon, can you fix it at ahk-h?
Re: Menu is obscured by the top window
Code: Select all
t:=gui()
t.show("x200 y200 w200 h200")
WinSetAlwaysOnTop 1, t.hwnd
MyMenu := Menu()
MyMenu.Add "Item 1", MenuHandler
MyMenu.Add "Item 2", MenuHandler
MyMenu.Add
WinSetAlwaysOnTop 1, A_ScriptHwnd
MyMenu.Show(200, 200)
MenuHandler(Item, *) {
MsgBox "You selected " Item
}
Re: Menu is obscured by the top window
I've modified it this way, but I'm using MyMenu.Handle, which has no effect. Thanks.
Re: Menu is obscured by the top window
Your method works.
I have done a similar modification, but I used "WinSetAlwaysOnTop 1, MyMenu.Handle" and it had no effect.
I have done a similar modification, but I used "WinSetAlwaysOnTop 1, MyMenu.Handle" and it had no effect.
Re: Menu is obscured by the top window
@thqby
Although this issue was fixed in v2.1-alpha.2, I found it to be incomplete.
If the window is topped, but not the active window. The menu will still be obscured.
I'm using Hv2.0.10 and I'm not sure if this is the same problem in L2 or H2.1.
Although this issue was fixed in v2.1-alpha.2, I found it to be incomplete.
If the window is topped, but not the active window. The menu will still be obscured.
I'm using Hv2.0.10 and I'm not sure if this is the same problem in L2 or H2.1.
Re: Menu is obscured by the top window
@crocodile
Is there any test code?
Is there any test code?
Re: Menu is obscured by the top window
Code: Select all
t:=gui()
t.show("x200 y200 w200 h200")
WinSetAlwaysOnTop 1, t.hwnd
MyMenu := Menu()
MyMenu.Add "Item 1", MenuHandler
MyMenu.Add "Item 2", MenuHandler
MyMenu.Add
return
f1::
{
;Make sure the gui is not the active window
t.getpos(&x, &y)
MyMenu.Show(x, y)
}
MenuHandler(Item, *) {
MsgBox "You selected " Item
}
Re: Menu is obscured by the top window
The issue cannot be reproduced, but there is an issue where the input focus is not on the menu.
Re: Menu is obscured by the top window
Yes, in the latest H2.0.10 I didn't reproduce the problem. Sorry the H2.0.10 I'm using seems to be some older version. Maybe H should use a version marker somewhere.
Re: Menu is obscured by the top window
This will cause too many release tags.
So only the file was updated.
So only the file was updated.