ramensoftware / windhawk-mods

The official collection of Windhawk mods
311 stars 56 forks source link

[Vertical Taskbar for Windows 11] Taskbar icons context menu is being cut off #980

Closed Venthe closed 3 weeks ago

Venthe commented 2 months ago

Possible regression as this happens on L and R; Taskbar icons context menu is being cut off

R side: image

L side: image

17:10:06.283 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:06.305 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:06.305 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:06.410 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:06.410 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:06.502 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:07.514 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:07.922 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [680:CTaskListThumbnailWnd_DisplayUI_Hook]: >
17:10:07.923 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [2009:GetWindowRect_Hook]: Adjusting taskbar rect for TaskListThumbnailWnd
17:10:07.926 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [2009:GetWindowRect_Hook]: Adjusting taskbar rect for TaskListThumbnailWnd
17:10:07.926 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [2009:GetWindowRect_Hook]: Adjusting taskbar rect for TaskListThumbnailWnd
17:10:07.927 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [2107:SetWindowPos_Hook]: Adjusting pos for TaskListThumbnailWnd: 3426x3750, 18x256
17:10:07.937 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [349:TrayUI_GetDockedRect_Hook]: >
17:10:07.937 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0046 0000000000000000 000000000400F240
17:10:07.937 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0047 0000000000000000 000000000400F240
17:10:09.349 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0210 0000000000000204 00000000005C002A
17:10:09.352 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:09.425 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:09.425 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:09.427 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0086 0000000000000001 0000000000090C4E
17:10:09.429 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [349:TrayUI_GetDockedRect_Hook]: >
17:10:09.429 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0046 0000000000000000 000000000400B8B0
17:10:09.430 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [620:CTaskListWnd_ComputeJumpViewPosition_Hook]: >
17:10:09.430 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [664:CTaskListWnd_ComputeJumpViewPosition_Hook]: 1
17:10:09.431 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:09.431 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:09.433 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:09.517 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0086 0000000000000000 0000000000000000
17:10:09.518 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0127 0000000000030001 0000000000000000
17:10:09.518 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0006 0000000000000000 0000000000000000
17:10:09.518 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 001C 0000000000000000 0000000000003B3C
17:10:09.518 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 000302AC Shell_SecondaryTrayWnd 001C 0000000000000000 0000000000003B3C
17:10:09.826 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0084 0000000000000000 00000000005C0EE2
17:10:15.648 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:15.648 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:15.648 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [1588:TaskListButton_UpdateVisualStates_Hook]: >
17:10:15.656 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [349:TrayUI_GetDockedRect_Hook]: >
17:10:15.656 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0046 0000000000000000 000000000400E530
17:10:15.657 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 001C 0000000000000001 0000000000000000
17:10:15.658 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 000302AC Shell_SecondaryTrayWnd 001C 0000000000000001 0000000000000000
17:10:15.658 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0086 0000000000000000 0000000000000000
17:10:15.659 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0006 0000000000000001 0000000000000000
17:10:15.659 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0281 0000000000000001 00000000C000000F
17:10:15.659 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0282 0000000000000002 0000000000000000
17:10:15.660 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0007 0000000000000000 0000000000000000
17:10:15.660 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0008 00000000000D0674 0000000000000000
17:10:15.660 11604 explorer.exe  [WH] [local@taskbar-vertical-test] [474:TaskbarWndProcPostProcess]: >> 00090C4E Shell_TrayWnd 0281 0000000000000000 00000000C000000F
m417z commented 2 months ago

It was reported here as part of a list of problems: https://github.com/ramensoftware/windhawk-mods/issues/913.

That's a tricky one. The mod overrides the position of the menu to be placed near the mouse cursor, but the menu size isn't known at this point. It could place it at a lower location, but then it will look worse and will be less convenient for items which are not at the very top.

Venthe commented 2 months ago

I believe that this one is even more visible in my case, as I have enabled the "end task" action aside of "close". Still, it happens with two topmost icons for me, not ideal; but hardly a dealbreaker.

m417z commented 2 months ago

I added some threshold for the menu position, so that it won't be above a certain point. It should improve it, try it out: https://github.com/m417z/my-windhawk-mods/blob/8c5a8ea5af153e469a569e9e9c83463ce47403b1/mods/taskbar-vertical.wh.cpp

Venthe commented 2 months ago

While it is not perfect; it definitely is workable now

Worst case: image

bergamin commented 1 month ago

I'm not sure if it's part of this, but one that I've got is the list of extra actions informed by the application itself gets cut. For example, Firefoxs Incognito mode

m417z commented 1 month ago

I found a solution to this, which was implemented in the new Taskbar on top for Windows 11 mod.

https://github.com/user-attachments/assets/c7662d3b-533f-45d8-8fc2-73a47b87fe11

For the vertical taskbar, the cut off menus can be fixed, but there's the following question (also discussed with @SandTechStuff): if there's enough space, what would be the ideal placement for the menu relative to the mouse? Vertically centered? Aligned to top? To bottom? Perhaps centered is most visually appealing, although I thought that having the close menu item always near the mouse cursor (as it is now) can be convenient.

Also, should the whole menu always be shown? For example, the following will have twice the height without the scrollbar. I guess showing it fully is fine, just want to hear your opinion.

image

What do you think?

Venthe commented 1 month ago

IMO:

  1. Prefer top to bottom, aligning the first item with the icon itself
  2. If the cursor is close to the bottom, align the last item with the icon
  3. prefer non-scrollable modal if there is a space
  4. OR scroll only if there is not enough space to present all the elements

    I'm quite big on muscle memory. Having menu options always at the same (relative) position would be the best. Moreover, "most" of the world reads top to bottom; so we would want to have eyes going from the icon, to the list, then navigate towards the bottom.

Center would be less desirable due to the "always shifting" elements depending on the list size.

Scroll is suboptimal, as it both prevents muscle memory to form and obscures possible actions.

My two cents, so to speak :)

m417z commented 3 weeks ago

Fixed in version 1.3. Also, instead of debating about the jump list alignment, I just added an option that allows to customize it.