Bug 113918 - Menu unexpected behavior: Right-Click behaves as Left-Clicking (LMB)
Summary: Menu unexpected behavior: Right-Click behaves as Left-Clicking (LMB)
Status: RESOLVED UPSTREAM
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
: 147840 160667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-05 22:18 UTC by Mohd Asif Ali Rizwaan
Modified: 2012-08-26 11:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohd Asif Ali Rizwaan 2005-10-05 22:18:33 UTC
Version:           unknown (using KDE 3.4.91 (beta1, >= 20050910), compiled sources)
Compiler:          gcc version 3.3.4
OS:                Linux (i686) release 2.6.11.7

Problem/Annoyance: As soon as the Right-click mouse button is released, most of the time the first item in the RMB menu get executed, which is very unexpected behavior. And a users never try to execute a "menu command/item" using RMB.

How to Reproduce: works will all menus (except main kmenu)
-----------------
With Menubar
1. click on the "Location" and Right-Click (RMB) on any menu-item, the menu item get's executed (launched) which is supposed to be executed with LMB (left-clicking)

2. RMB on Desktop (CTRL+ALT+D) right-click on any item, and the item gets executed. 

3. KMenu->Quick browser->RMB on "open with konsole" or "open with konqueror", the right-click behaves as left click.

4. RMB on any System-Tray Applet, then in the RMB-menu, right click on any item. again it behaves as left-click.

5. Right click HERE and right-click on any item form the RMB-menu. that's not expected again.

Expected Behavior:
------------------

The Menu items must not be "executed" or launched by Right_Mouse_Button or on Right-Clicking.

And the reason is simple, it causes confusion and unwanted launch of actions/commands/applications, causing annoyance.

It would be good to Launch/execute any item by LEFT-Click only!

Thanks.
Comment 1 Thiago Macieira 2005-10-06 13:47:52 UTC
For the system, this isn't a simple RMB click. What you're doing is actually RMB down, drag, RMB release, which you're entitled to do.

I think this is solved by moving the popup menus a few pixels away from the mouse down coordinates.
Comment 2 Mohd Asif Ali Rizwaan 2005-10-08 18:50:21 UTC
>I think this is solved by moving the popup menus a few pixels away from the mouse down coordinates. 

1. That's a good idea!

2. and disabling "Right click to execute" (even RMB release/pressed) would be good.
Comment 3 Thiago Macieira 2005-10-08 19:09:33 UTC
I don't agree with #2.
Comment 4 Maciej Pilichowski 2007-07-17 18:30:59 UTC
Thiago, I am not doing any dragging.

RMB, _WAIT_, RMB on any item menu. It is treated as LMB.
Comment 5 Bram Schoenmakers 2007-07-17 21:16:09 UTC
*** Bug 147840 has been marked as a duplicate of this bug. ***
Comment 6 Jens Rutschmann 2008-04-22 13:23:46 UTC
Since this bug is still unconfirmed, I hereby confirm it :-)

I'm running KDE 3.6.9 on Gentoo here, compiled with GCC 4.2.3
Qt version is 3.3.8.

Btw. this "bug" also occurs in plain Qt programs such as the VirtualBox GUI or the WPA_Supplicant admin GUI.

So perhaps it is a "bug" in Qt. I also tried with the Keramik window style (usually I'm using Plastik) - same behaviour.

Also i want to add that the behaviour is only visible with "bottom-level" menu entries, not with that menu buttons that contain a sub menu. In other words: Clicking with RMB on "File" in KWrite's main menu won't do anything but clicking with RMB on "File"->"New" would.

It seems as if the menu entries react on all mouse button events - even the middle button works on them.

I can see the benefit the current behaviour of course: Pressing the RMB and keeping it pressed while dragging the mouse over the desired entry and then releasing the button mya be conventient for some users.

It would be really nice if one could disable this behaviour, you can't imagine how often I closed applications by accidently activating the "close" entry in systray menus. 
Comment 7 Maciej Pilichowski 2008-04-22 13:31:24 UTC
I doubt this is Qt issue -- compare it to Bookmarks menu in Konqueror. It can be pretty well handled in KDE.
Comment 8 Jens Rutschmann 2008-04-22 13:43:33 UTC
I think Qt defaults to use all mouse events for those menu entries.

In Konqueror's Bookmarks menu I can activate the "New Bookmark Folder" entry with all mouse buttons whereas the bookmark entries intself show the following behavior:
LMB - Open bookmark in current window
MMB - Open bookmark in new window
RMB - Open bookmark context menu

So it seems that applications are able to override it without problems but the default is still common among Qt programs:

I also tested this with Skype and Opera.
Skype menu reacts on all buttons.
Opera menu ignores the RMB but still reacts on MMB.
Comment 9 Christoph Feck 2011-08-10 15:43:47 UTC
*** Bug 160667 has been marked as a duplicate of this bug. ***
Comment 10 Martin Koller 2012-08-26 11:34:54 UTC
This is std. Qt behavior (checked here with Qt 4.8.2).
I see no reason why KDE should change that.