gtk.Label <a href> link-activate signal broken with compiz in natty

Bug #687732 reported by Michael Vogt
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
High
Unassigned
compiz (Ubuntu)
Fix Released
High
Sam Spilsbury
unity (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The attached test program works fine in maverick but fails in natty.

In a nutshell, when clicking on the link in the label nothing happens in natty but I expect that it prints something
(which it does in maverick). Oddly keyboard navigation (pressing enter on it) works.

Tags: unity
Revision history for this message
Michael Vogt (mvo) wrote :
summary: - gtk.Label <a href> broken in natty
+ gtk.Label <a href> link-activate signal broken in natty
Revision history for this message
Michael Vogt (mvo) wrote : Re: gtk.Label <a href> link-activate signal broken in natty

It turns out this only happens when compiz is running, so I reassign.

affects: pygtk (Ubuntu) → compiz (Ubuntu)
Changed in compiz (Ubuntu):
importance: Undecided → High
assignee: nobody → Sam "SmSpillaz" Spilsbury (smspillaz)
Michael Vogt (mvo)
summary: - gtk.Label <a href> link-activate signal broken in natty
+ gtk.Label <a href> link-activate signal broken with compiz in natty
Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Looking into this now. Maybe we aren't granting focus to the label object?

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Further info -> reparenting breaks it (suprise suprise)

Changed in compiz (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.2.1+glibmainloop4-0ubuntu1

---------------
compiz (1:0.9.2.1+glibmainloop4-0ubuntu1) natty; urgency=low

  [ Didier Roche ]
  * New upstream release:
    - Fixed a high number of wakeups (LP: #681696)
    - Fixed links not working in some gtk windows
    - Raise the window when it is moved if raise on click is enabled
    - Fix crash when loading plugins on the command line
    - Fix focus issues on window close and reopen rapidly
    - Fix focus issues with multiple X screens
    - Glib plugin removed
    - Fix bug where not moving the mouse and clicking button 2 or 3 in
      scale addon would close the current active window, not the window the
      mouse hovers over
    - Add unity-window-decorator
    - Move window doesn't raise window (LP: #695570)
    - gtk.Label <a href> link-activate signal broken with compiz in natty
      (LP: #687732)
  * debian/patches/060_move_checks_to_compiz.patch:
    - remove GNOME failsafe detection as now handled as a session type in
      gnome-session
  * Remove deprecated or now merge upstream patches:
    - 01_backport_trunk_fix.patch
    - 002_ship_splited_gconf_cmakeext_files.patch
    - 004_packagemode_is_release_debug_for_plugins.patch
    - 005_no_glib_plugin.patch
    - 017_always_unredirect_screensaver_on_nvidia.patch
    - 080_migrate_gconf_from_alpha1.patch
  * debian/compiz-gnome.gconf-defaults,
    debian/patches/029_default_options.patch:
    - new settings for natty. Also set the 2x2 layout by default
  * unity-decorator:
    - debian/compiz-decorator:
      launch unity-compiz-decorator in gnome sessions
    - debian/compiz-gnome.install:
      install it
    - debian/control:
      depends on latest metacity having the right extension
    - debian/patches/01_unity_window_decorator.patch:
      add unity-window-decorator
  * debian/patches/02_add_debug_spewer_for_apport.patch:
    - new plugin (not activated for now) to get additional info for apport

  [ Bryce Harrington ]
  * compiz-core.install, compiz-core.links, source_compiz.py:
    Replace the compiz apport hook with a link to xorg's apport script.
 -- Didier Roche <email address hidden> Thu, 13 Jan 2011 21:50:27 +0100

Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Sam Spilsbury (smspillaz) wrote :
tags: added: unity
Changed in unity:
status: New → Fix Released
milestone: none → 3.2.14
importance: Undecided → High
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

Reopening as this has regressed. I have compiz 1:0.9.4-0ubuntu5 and unity 3.6.4-0ubuntu1 and can reliably reproduce this with the test case.

Changed in compiz (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

Meh, looks like I'm doing something weird. Closing again, sorry for the noise.

Changed in compiz (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Conscious User (conscioususer) wrote :

I'm developing an application that uses linked labels a lot, and it seems that this bug is not completely solved, it's only happening less often. After testing with and without Compiz, I'm more or less convinced that links always work when Compiz is off and occasionally do not work when Compiz is on.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Re: [Bug 687732] Re: gtk.Label <a href> link-activate signal broken with compiz in natty

On Wed, Jun 1, 2011 at 12:09 PM, Conscious User <email address hidden> wrote:
> I'm developing an application that uses linked labels a lot, and it
> seems that this bug is not completely solved, it's only happening less
> often. After testing with and without Compiz, I'm more or less convinced
> that links always work when Compiz is off and occasionally do not work
> when Compiz is on.

They won't work when the window is not focused, yes.

Have a look at section 6.3 of the ICCCM for why they can't work:
http://tronche.com/gui/x/icccm/sec-6.html . In order to raise windows
we need to ensure that we can capture button clicks on them (otherwise
click raise won't work on anything other than the titlebar). By doing
this it will trigger a "grab" on the other application and it gets a
LeaveNotify event (the same kind of event that is given when the
cursor leaves the subwindow).

... unfortunately there is a bug in GTK+ where it does not actually
check the *reason* the LeaveNotify event was given, so the link will
not work in the case where we have the grab. I poked through the GTK+
code to try and figure out why this was, but I couldn't get a
substantive answer.

I've changed the compiz code in N to reflect this problem, so now we
do passive button grabs as little as possible, and only on windows
that we actually own.

Let me know if you're still experiencing this problem on focused and
raised windows.

>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/687732
>
> Title:
>  gtk.Label <a href> link-activate signal broken with compiz in natty
>
> Status in Unity:
>  Fix Released
> Status in “compiz” package in Ubuntu:
>  Fix Released
>
> Bug description:
>  The attached test program works fine in maverick but fails in natty.
>
>  In a nutshell, when clicking on the link in the label nothing happens in natty but I expect that it prints something
>  (which it does in maverick). Oddly keyboard navigation (pressing enter on it) works.
>

--
Sam Spilsbury

Revision history for this message
Conscious User (conscioususer) wrote :

I'm occasionally experiencing the problem when the window is already focused, but so far couldn't find a reliable way to reproduce it. But only seems to happen with GtkLabel links.

Revision history for this message
Conscious User (conscioususer) wrote :

What I could observe so far:

1) If links are working, they will keep working at least until you unfocus the window.

2) If links are not working, they will keep not working until you unfocus the window and focus it again. This unfocus and focus solution *never* failed so far.

Revision history for this message
Conscious User (conscioususer) wrote :

The unfocus and focus solution started failing recently. :(

I don't recall and Compiz update in my Natty box these days, so I'm not sure why this is now happening.

Revision history for this message
Conscious User (conscioususer) wrote :

@Sam Spilsbury:

I think I found a way to reliably reproduce this in my application, but couldn't translate this to a small demo. But it doesn't seem like it's my application's fault, since the bug does not happen without Compiz. What can I do to provide you with useful info?

Revision history for this message
Conscious User (conscioususer) wrote :

And yes, this is with windows that are already focused.

Revision history for this message
Conscious User (conscioususer) wrote :

Ok, thanks to cldx3000 I found a reliable way to reproduce this *with the program provided in this report*. (see Bug #790565)

1) open the link.py program
2) open another application, like nautilus
3) close this other application, so that the focus returns to link.py automatically
4) the link in link.py should not work

In short: the bug only happens when the window receives focus automatically (like when the one on top of it has been closed), and never when you focus it manually.

Changed in unity (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.