Bug 4154 - unity 2d menus misbehave with mouse pointer
Summary: unity 2d menus misbehave with mouse pointer
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VNC (show other bugs)
Version: 3.2.0
Hardware: PC Linux Ubuntu
: P2 Normal
Target Milestone: 4.1.0
Assignee: Pierre Ossman
Keywords: derfian_tester
Depends on:
Blocks: 4168
  Show dependency treegraph
Reported: 2012-01-20 16:20 CET by Pierre Ossman
Modified: 2013-05-21 11:49 CEST (History)
0 users

See Also:
Acceptance Criteria:


Description Pierre Ossman cendio 2012-01-20 16:20:41 CET
Ubuntu managed to make the menu bar in Unity 2D break with VNC some time between 11.04 and 11.10. When you click a menu entry (or the widgets) it will open on mouse press, but close again on mouse release. The expected behaviour is to remain open after the mouse release.
Comment 1 Pierre Ossman cendio 2012-01-20 16:22:31 CET
The package is called unity-2d-panel and the version in 11.04 is and the one in 11.10 is 4.12.0-0ubuntu1.1.
Comment 3 Pierre Ossman cendio 2012-02-07 12:51:06 CET
Test if it still is a bug in 12.04. File an upstream bug report if it is.
Comment 4 Pierre Ossman cendio 2012-02-21 11:12:51 CET
Also check if this occurs with an Ubuntu Xvnc and report it if it does.
Comment 5 Aaron Sowry cendio 2012-02-29 15:52:19 CET
See https://bugs.launchpad.net/ubuntu/+source/unity-2d/+bug/866046. FWIW.
Comment 6 Pierre Ossman cendio 2012-04-05 16:21:20 CEST
The core of this issue seems to be XInput2 vs Core events. What I've determined so far:

 - Both working and non-working cases send a ButtonRelease/XI_ButtonRelease to the GTK process. So Xorg and Xvnc both behave as expected.

 - A GDK event is only generated with Xvnc (i.e. Core event), not with Xorg (XInput2 event)

It seems like the XInput2 event is lost inside XFilterEvent(). IOW, it seems like a bug in Xlib/xcb.
Comment 7 Pierre Ossman cendio 2012-04-05 17:15:16 CEST
Scratch that. gdb wasn't tracing properly. It is GDK that is filtering things somewhere in gdk_event_apply_filters().
Comment 8 Pierre Ossman cendio 2012-04-10 11:46:37 CEST
Lolbuntu's enterprise engineering strikes again!

Because of their quality architecture of having three processes to display a single menu, the proper behaviour is the one we're seeing in VNC (the button is released on the panel, which is technically outside the menu, so the menu should close).

To work around this, they have some horrible kludges implemented as GDK event filters. And last year some buffoon ripped out the X11 Core event code and replaced it with XInput2 code. This with the fantastic commit message "Fix the panel-service".

So either we grow XInput2 support, or Ubuntu fixes their shitty code. I don't see anyway we can work around this.

Aaron gets the privilege to report this in Launchpad since he has an account. The bug is in service/panel-service.c:event_filter(), and the issue is the lack of support for X11 Core events.
Comment 9 Pierre Ossman cendio 2012-04-17 10:38:15 CEST
We cannot do anything about this right now. Moving the bug to the next release so we can keep track of upstream.
Comment 10 Peter Åstrand cendio 2012-06-27 12:56:01 CEST
As a side note, besides adding yourself as a subscriber in launchpad, you should click on "Affects me". The latter adds 4 points to the "heat", while subscribing only adds 2 points.
Comment 11 Pierre Ossman cendio 2013-04-15 12:44:26 CEST
Our new Xvnc has Xinput2 and does indeed solve this problem.
Comment 12 Karl Mikaelsson cendio 2013-05-21 11:49:50 CEST
Works for me too.

Note You need to log in before you can comment on or make changes to this bug.