Panel Titlebar double click is emitted for any mouse button

Bug #736491 reported by Dylan McCall on 2011-03-16
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Low
Marco Trevisan (Treviño)
unity-2d
Low
Unassigned
unity (Ubuntu)
Low
Marco Trevisan (Treviño)
Precise
Undecided
Unassigned
unity-2d (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned

Bug Description

[Test Case]
1. Run any maximize-able application
2. Maximize the window
3. Double click the panel titlebar with the right mouse button
   -> Nothing should happen, the window should remain maximized
4. Double click the panel titlebar with the left mouse button
   -> The window should restore itself

[Regression Potential]
No regression potential that we can think of, trivial change of adding one 'if'.

Original description:

We can double click the panel titlebar to restore a maximized window. However, this happens with any mouse button! Unity lets me double left click or double middle click to the same effect. This is a bit of a problem if I feel like paging through maximized windows really quickly with a middle click.

Usually, titlebar double click only responds to a double left click, so we should stick to that for consistency.

Related branches

Dylan McCall (dylanmccall) wrote :

Okay, this is a little weird: GetEventButton returns 1 for both a left and a right click in our RecvMouseDoubleClick function. Is that normal?

I'm attaching a patch that at least solves the middle clicking issue, though.

Didier Roche (didrocks) wrote :

@Dylan, can you please merge you work with the proposed branch? I think all this change in one can make sense :)

The doubleclick event is basically broken right now in nux. You should maybe have a look at the double click connect I've hacked in src/PanelTitlebarGrabAreaView.cpp, ensure that the other function is using the same (I remember someone contributed a patch for that, he possibly didn't connect to the same event) and make the button_flags check here which should give the right value.

Does it make sense? Do not hesitate if you need further help ;)

Alex Launi (alexlauni) on 2011-03-21
Changed in unity:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
importance: Undecided → Low
Changed in unity (Ubuntu):
importance: Undecided → Low
Didier Roche (didrocks) wrote :

Not that from my tests the lp:~dylanmccall/unity/panel-drag-frontmost-maximized branch doesn't fix the issue despite the specific code for that. Leaving the bug opened so.

Dylan McCall (dylanmccall) wrote :

Oops, did I mark it fixed in that branch? I meant to just link it to this bug report :)

Indeed, the earlier comment is still the case. For some reason, nux gives us the same event button (1) for both a left click and a right click. I'm probably missing something (or Unity's double click code is being funny), because surely the launcher is able to discern left from right…

tags: added: patch
Andrea Azzarone (azzar1) on 2011-08-19
Changed in unity:
assignee: nobody → Unity Community Hackers (unity-community-hackers)
Changed in unity:
assignee: Unity Community Hackers (unity-community-hackers) → Marco Trevisan (Treviño) (3v1n0)
Changed in unity (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in unity:
status: Confirmed → In Progress
Changed in unity (Ubuntu):
status: Confirmed → In Progress
Andrea Grandi (andreagrandi) wrote :

Please note that this bug could not be trivial for Unity-2D because actually it doesn't react to any double click. Since we need to keep the Unity-2D features syncronized with Unity, I think we should add this feature to Unity-2D too.

Dylan McCall (dylanmccall) wrote :

Andrea, thank you for organizing but I don't think Unity-2d has a relation to this. It will never experience the bug because it'll be going through Qt for the double click event. The lack of double click itself is a separate issue (bug #661049).

Changed in unity-2d:
assignee: nobody → Andrea Grandi (andreagrandi)
status: New → In Progress
Omer Akram (om26er) wrote :

this issue is not fixed in Oneiric

Changed in unity (Ubuntu):
status: In Progress → Fix Released
Changed in unity:
status: In Progress → Fix Released
Changed in unity-2d:
importance: Undecided → Low
Neil J. Patel (njpatel) on 2011-09-26
Changed in unity:
milestone: none → 4.18.0
pablomme (pablomme) wrote :

This "any mouse button triggers an action" problem affects other bits of unity too. I reported bug #758110 about the titlebar, which is now indeed fixed, but there are more instances of this. The biggest problem this causes is when one is using a touchpad with two-finger vertical and horizontal scrolling on, where attempting to scroll up and down may send events for buttons 6 and 7 if the drag is not exactly vertical (which it almost never is).

The problems I am aware of are:
- Panel indicator menus can be opened with buttons 6 and 7. This means that using the "scrollwheel" on the sound menu to modify the sound volume may pop the menu open, where the scrollwheel action is inhibited.
- Items displayed in unity lenses may be opened with buttons 6 or 7, so scrolling over a list of many items risks opening any one of them that happens to fall under the mouse pointer.

Didier Roche (didrocks) on 2011-10-03
Changed in unity-2d (Ubuntu):
status: New → In Progress
Albert Astals Cid (aacid) wrote :

Andrea are you still working on this? I see you've got a branch you a Merge Request was never made out of it

Albert Astals Cid (aacid) wrote :

Removing Andrea from assignee since he didn't answer my question in a month

Changed in unity-2d:
assignee: Andrea Grandi (andreagrandi) → nobody
status: In Progress → Triaged
Changed in unity-2d (Ubuntu):
status: In Progress → Confirmed
Changed in unity-2d:
assignee: nobody → Albert Astals Cid (aacid)
status: Triaged → In Progress
Changed in unity-2d:
status: In Progress → Fix Committed
milestone: none → 5.14
description: updated
Didier Roche (didrocks) on 2012-05-30
Changed in unity (Ubuntu Precise):
status: New → Fix Released
Gerry Boland (gerboland) on 2012-05-30
Changed in unity-2d:
milestone: 5.14 → 5.12.1
description: updated
Changed in unity-2d:
milestone: 5.12.1 → 5.14
Changed in unity-2d (Ubuntu):
status: Confirmed → Fix Released
Changed in unity-2d:
assignee: Albert Astals Cid (aacid) → nobody

Hello Dylan, or anyone else affected,

Accepted unity-2d into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unity-2d/5.14.0-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unity-2d (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Łukasz Zemczak (sil2100) wrote :

Test-case works as expected.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-2d - 5.14.0-0ubuntu1

---------------
unity-2d (5.14.0-0ubuntu1) precise-proposed; urgency=low

  * New upstream release (LP: #1060262):
    - [Launcher] [Multi-monitor] Removing a non running app tile from a
      launcher should remove it from all (LP: #988739)
    - Panel Titlebar double click is emitted for any mouse button (LP: #736491)
    - Launcher does not hide if shown while dragging a file (LP: #1002308)
    - icon isn't reset when clearing the search query (LP: #973225)
    - Issue when ejecting busy device from the Unity 2D Shell (LP: #997786)
    - Sticky edges don't work in RTL (LP: #984092)
    - pips are not correctly updated when plugin in a second monitor
      (LP: #1003943)
    - [dash] Unable to maximize (LP: #918648)
    - all panels have same window focus on multiple monitors unity2d
      (LP: #930147)
    - Dash will not open files under Greek folders (LP: #1002710)
    - Launcher does not respond to changes in icon theme (LP: #605475)
    - [panel] Invisible items in systray (LP: #703389)
    - [panel] Ignores "enabled" property on top-level menus (LP: #850017)
  * Reverted some quantal-specific commits which are no longer relevant
 -- Lukasz 'sil2100' Zemczak <email address hidden> Tue, 30 Oct 2012 09:59:49 +0100

Changed in unity-2d (Ubuntu Precise):
status: Fix Committed → Fix Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers