<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>373653</bug_id>
          
          <creation_ts>2016-12-14 18:28:24 +0000</creation_ts>
          <short_desc>Konsole occasionally displays the wrong context menu on right click</short_desc>
          <delta_ts>2018-04-08 08:44:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-kxmlgui</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Gentoo Packages</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michal Ziabkowski">mziab</reporter>
          <assigned_to name="kdelibs bugs">kdelibs-bugs-null</assigned_to>
          <cc>ricardo</cc>
    
    <cc>simonandric5</cc>
    
    <cc>wbauer1</cc>
          
          <cf_commitlink>https://commits.kde.org/kxmlgui/5381b8b4b76cc1fced0c32aed22653e3a52ebc7a</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1645167</commentid>
    <comment_count>0</comment_count>
    <who name="Michal Ziabkowski">mziab</who>
    <bug_when>2016-12-14 18:28:24 +0000</bug_when>
    <thetext>When right-clicking, there is a 1-to-5 chance than Konsole will display a context menu with the &quot;Configure shortcut...&quot; and &quot;Add to Toolbar&quot; (inactive) options instead of the regular Konsole one. The likelihood of the wrong menu appearing increases when clicking in rapid succession.

Upon some quick investigation, this seems to be the menu from kxmlgui&apos;s KMenuMenuHandler, which is erroneously displayed for some reason.

The bug is similar to #351595. However, I&apos;ve never had two menus displayed at the same time unlike the reporter of that bug, so I&apos;m filing this as a separate issue.

I am quite certain it is not a mouse issue, since the problem only appeared when I switched from the old KDE4-based Konsole to the frameworks-based one.

The way to reproduce is really simple:
1) Start Konsole
2) Right-click a few times somewhere in the middle of the terminal

Here are some system specs:
Konsole 16.08.3
kde-frameworks 5.29.0
Qt 5.6.2
xcb platform</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660014</commentid>
    <comment_count>1</comment_count>
    <who name="Ricardo J. Barberis">ricardo</who>
    <bug_when>2017-02-10 03:37:18 +0000</bug_when>
    <thetext>Confirmed (Konsole 16.12.1) and easily reproducible:

1- Right-click on konsole -&gt; normal popup is shown
2- Right-click on the popup -&gt; Michal&apos;s popup is shown</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660044</commentid>
    <comment_count>2</comment_count>
    <who name="Michal Ziabkowski">mziab</who>
    <bug_when>2017-02-10 09:27:06 +0000</bug_when>
    <thetext>Yes, that&apos;s a good observation. However, you don&apos;t even need to right-click the popup. It seems that as long as the normal popup is open, right-clicking anywhere inside the terminal will display the other &quot;Configure shortcut&quot; popup.

This is a regression in that right-clicking again used to close the current popup and redisplay it in the new location, and not display the other, completely different popup. The bug is still reproducible in Konsole 16.12.1 and Qt 5.7.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660445</commentid>
    <comment_count>3</comment_count>
    <who name="Kurt Hindenburg">khindenburg</who>
    <bug_when>2017-02-12 00:48:05 +0000</bug_when>
    <thetext>Yes, strange - I&apos;ve never noticed this before</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660454</commentid>
    <comment_count>4</comment_count>
    <who name="Kurt Hindenburg">khindenburg</who>
    <bug_when>2017-02-12 01:44:35 +0000</bug_when>
    <thetext>This is not just Konsole - it happens in Kate as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660551</commentid>
    <comment_count>5</comment_count>
    <who name="Kurt Hindenburg">khindenburg</who>
    <bug_when>2017-02-12 14:50:14 +0000</bug_when>
    <thetext>I don&apos;t think this is Konsole but the underlying kxmlgui</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660634</commentid>
    <comment_count>6</comment_count>
    <who name="Wolfgang Bauer">wbauer1</who>
    <bug_when>2017-02-12 19:51:54 +0000</bug_when>
    <thetext>(In reply to Kurt Hindenburg from comment #5)
&gt; I don&apos;t think this is Konsole but the underlying kxmlgui
I agree.

And I just noticed that it is also reproducible in Konsole/KDE4 and kmail/KDE4, so it seems to be a quite long-standing &quot;issue&quot; (or maybe a feature?) ;-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1700095</commentid>
    <comment_count>7</comment_count>
    <who name="Michal Ziabkowski">mziab</who>
    <bug_when>2017-09-09 10:20:09 +0000</bug_when>
    <thetext>I&apos;ve actually found a better, sure-fire way to trigger the bug:

1) Right-click to display the normal popup
2) Right-click anywhere inside the application window

This also causes the &quot;Configure shortcut&quot; popup to be displayed.

From what I know, the popup in question should only display when right-clicking menu items, which lets you customize the hotkeys. It seems as though the wrong event is triggered somehow.

I can confirm the bug is not Konsole-exclusive. Just tried ark and got the same behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1733912</commentid>
    <comment_count>8</comment_count>
    <who name="Kai Uwe Broulik">kde</who>
    <bug_when>2018-02-26 13:58:40 +0000</bug_when>
    <thetext>Git commit 5381b8b4b76cc1fced0c32aed22653e3a52ebc7a by Kai Uwe Broulik.
Committed on 26/02/2018 at 13:58.
Pushed by broulik into branch &apos;master&apos;.

Don&apos;t show context menu menu if right-clicking outside

When right-clicking a KXMLGui menu bar entry you can configure it.
The menu would also show up if right clicked outside the menu which is pointless as none of the actions in the menu
would work as there&apos;s no action to configure to begin with.

Differential Revision: https://phabricator.kde.org/D9675

M  +6    -1    src/kmenumenuhandler_p.cpp

https://commits.kde.org/kxmlgui/5381b8b4b76cc1fced0c32aed22653e3a52ebc7a</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>