Error sound after right click drive button

Bug reports will be moved here when the described bug has been fixed

Moderators: sheep, Hacker, Stefan2, white

User avatar
petermad
Power Member
Power Member
Posts: 8965
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Post by *petermad » 2018-06-11, 16:16 UTC

It seems to be a specific XP behaviour
Well, as I wrote, I hear it without exception under Windows 7 and 8.1 - and occasionally under Windows 10
License #524 (1994)
Danish Total Commander Translator
TC 9.5b8 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW » 2018-06-11, 17:24 UTC

@ghisler(Author)

Could you please test, if this code solves the problem - and still works properly with cm_* commands - with Lazarus?

Code: Select all

if ActivePopupMenu <> nil then begin 
    MessageBeep(mb_iconexclamation); 
    exit; 
  end;
If so, there is also a possible solution for Delphi.

User avatar
Usher
Power Member
Power Member
Posts: 625
Joined: 2011-03-11, 10:11 UTC

Post by *Usher » 2018-06-11, 23:00 UTC

When MS GUI devs introduced context menu under right click, they decided that there should be only ONE context menu open.
So when you right click another place, the system always closes already opened context menu and opens a new one in the new place.
You don't have two context menus open at a time. You don't need to close any context menu if you want to do anything else (f.e. open another context menu in a different context) - there is even NO button to close context menu and there is NO warning/error sound when you right click many times one by one (if there is no modal windows open).
Regards from Poland
Andrzej P. Wozniak

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38395
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-06-12, 14:17 UTC

The problem isn't the opening of multiple context menus - Windows does prevent that. The problem is with internal processing when the user calls multiple context menu functions at once. Therefore I will keep the error beep in place.
Author of Total Commander
http://www.ghisler.com

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

Post by *DrShark » 2018-06-13, 08:11 UTC

2ghisler(Author)
DrShark wrote:... I noticed a difference when entering "System Volume Information" in c:\ in file panel (by mouse left doubleclick or keyboard Enter key) and by executing
cd "c:\System Volume Information"
from TC's command line: in second case there is no "Critical stop" sound after pressing OK button or Esc key in error dialog.
Can you please comment the reason of that behavior?
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38395
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-06-13, 17:56 UTC

Hmm, no idea - the entered path gets a "cd" in front and is sent to the same function as the command line.
Author of Total Commander
http://www.ghisler.com

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW » 2018-06-14, 11:36 UTC

@ghisler(Author): I can see two solutions for the original problem described in this topic.


1) Instead of using ShowRightclickMenuActive variable, just use ActivePopupMenu <> nil clause:

Code: Select all

if ActivePopupMenu <> nil then begin 
    MessageBeep(mb_iconexclamation); 
    exit; 
  end;
2) If, for some reason, the ShowRightclickMenuActive variable cannot be replaced in this way, beeps can still be limited to situations, when a popup menu is being displayed:

Code: Select all

if ShowRightclickMenuActive then begin
    if ActivePopupMenu <> nil then // ADDED HERE
      MessageBeep(mb_iconexclamation); 
    exit; 
  end;
If you could tell me if this solves the problem in Lazarus, I could post a similar solution for Delphi.

Regards

User avatar
Usher
Power Member
Power Member
Posts: 625
Joined: 2011-03-11, 10:11 UTC

Post by *Usher » 2018-06-14, 13:52 UTC

ghisler(Author) wrote:The problem is with internal processing when the user calls multiple context menu functions at once.
If it's some problem with races, you can add delay when processing right clicks, as it is for right click on file list.

You have already stated, that there is NO system error when using double right click or double click twice, so error sound is misleading for common users (what app gives error?) and annoying for all users (the second right click is the right one, intended by user, <pun also intended>).
Regards from Poland
Andrzej P. Wozniak

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38395
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-06-15, 10:02 UTC

Unfortunately I cannot tell whether the user right clicked again on purpose, or whether the right click notification was sent twice due to some error. Therefore I prefer to keep it as it is for now.
Author of Total Commander
http://www.ghisler.com

User avatar
Usher
Power Member
Power Member
Posts: 625
Joined: 2011-03-11, 10:11 UTC

Post by *Usher » 2018-06-15, 20:11 UTC

Right clicking many times one by one is definitely NOT an error. It's a NORMAL way to learn program features.

And in a common use right clicking twice is NOT an error as well, but it may be a mistake. In such cases the first right click usually misses intended target in a hurry or because of dirty mousepad, so the second right click is done on purpose to finish intended actions.
Regards from Poland
Andrzej P. Wozniak

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38395
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-06-17, 07:32 UTC

So what do you expect me to do? Either not play any error sound at all, and the user wonders why the menu doesn't open. Or play an error sound, and it also gets played when there isn't an error? These are the two only options.
Author of Total Commander
http://www.ghisler.com

User avatar
Usher
Power Member
Power Member
Posts: 625
Joined: 2011-03-11, 10:11 UTC

Post by *Usher » 2018-06-17, 13:02 UTC

ghisler(Author) wrote: Either not play any error sound at all, and the user wonders why the menu doesn't open.
But the context menu DOES open, in all the cases and at the right place, no matter - intended or not. NO error sound is nedeed in any case.
ghisler(Author) wrote:Or play an error sound, and it also gets played when there isn't an error? These are the two only options.
Mistake IS NOT an error. Where do you see (not hear) a real error?
Regards from Poland
Andrzej P. Wozniak

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38395
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-06-18, 09:45 UTC

OK, I removed the MessageBeep call, and - surprise - it still beeps! It was actually something completely different: The previous context menu was returning 0 as selected item, and TC beeped to signal an error. I will fix it.
Author of Total Commander
http://www.ghisler.com

User avatar
Usher
Power Member
Power Member
Posts: 625
Joined: 2011-03-11, 10:11 UTC

Post by *Usher » 2018-06-18, 12:18 UTC

Many thanks for your work.
Regards from Poland
Andrzej P. Wozniak

User avatar
Usher
Power Member
Power Member
Posts: 625
Joined: 2011-03-11, 10:11 UTC

Post by *Usher » 2018-06-20, 18:18 UTC

Fixed in TC920rc2. Thanks once again.
Regards from Poland
Andrzej P. Wozniak

Post Reply