Unwanted button context menu item self-click

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Unwanted button context menu item self-click

Post by *DrShark »

For button bar and its buttons context menus, left or right mouse button may be used to press context menu items. However, under certain conditions such behavior may cause unwanted self-click on button's context menu item.

For me, it was reproduced under following conditions:
1. Screen resloution: 1024x768.
2. TC in a full screen.
3. The button is at the bottom of a vertical bar.
4. Button's tooltip is long enough to make TC show the button's context menu behind mouse cursor, screenshots:
* button at the bottom of vertical toolbar with long tooltip
* button's context menu
My test button:

Code: Select all

TOTALCMD#BAR#DATA
TEST

wcmicons.dll,27
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

0
-1
To reproduce:
1) using right mouse button, call such button's context menu: cursor will be on some item of a context menu;
1.1) (oprional) while still holding right button, move cursor on other context menu item;
2) release right mouse button: action of active context menu item will be used, although more expected behavior would be just selectiong menu item, with menu item action called only if separate click is made after release of right mouse button.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Unwanted button context menu item self-click

Post by *HolgerK »

DrShark wrote:2) release right mouse button: action of active context menu item will be used, although more expected behavior would be just selectiong menu item, with menu item action called only if separate click is made after release of right mouse button.
Please try this with any other standard windows context menu and you will notice that this is the standard behavior (<RMB up> executes the current entry).
The only flaw i see here is that TC opens the context menu with <RMB down> (Windows standard is <RMB up>).

Regards
Holger
Make our planet great again
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

2ghisler(Author)
In email from May 4, 2018 I attached a micro TC install to reproduce the issue. Also would be nice to get an answer to the question why TC doesn't call the context menu on right mouse button release event.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is that I don't have any influence on it - once I call TrackPopupMenu, the menu is handled entirely by Windows itself.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

ghisler(Author) wrote:once I call TrackPopupMenu, the menu is handled entirely by Windows itself.
The question is can you call it on right mouse button UP evet (when user releases right mouse button)? This would solve the issue.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have tried this now. Unfortunately it disrupts my work flow which I have acquired over the last 20 years: Press right click on button bar button, move to menu item, release button. I think that many other will not like it either, so I will keep it as it is now.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

I know you're tired of "make as an option" requests, but I really would prefer reliable context menu work (I don't want each time calling a button context menu to think about not releasing mouse button after menu just appeared to avoid such unwanted menu item clicks.)
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I think an option to chose between mouseup or mousedown is justified here.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply