Action icons stay visible when polly is not focused

Bug #870773 reported by Bertrand Lorentz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Polly
Triaged
Low
Unassigned

Bug Description

Steps to reproduce :
1/ Have another window overlap the Polly window
2/ Hover your mouse over a tweet in a stream, the action icons are displayed
3/ Move your mouse to the other window, transitioning directly from that tweet to the other window.

The action icons stay visible, which I think is a bit strange and unnecessary. See the attached screenshot.

This also happens is you use Alt+Tab to bring another window to the foreground and it happen to be under your mouse.

Revision history for this message
Bertrand Lorentz (bertrand-lorentz) wrote :
Revision history for this message
Bertrand Lorentz (bertrand-lorentz) wrote :

Oh, I forgot to mention I'm on Natty, using GNOME Shell from the gnome3 PPA.

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

Hi Bertrand,

Since you also work with a GTK app perhaps you can give me some suggestions on this one.

Currently, I'm making the icons disappear as a response to a "leave-notify-event" signal from the tweet box. However, this signal is also emitted when I hover a child of the tweet (such as the buttons themselves), so I had to put a condition for them to disappear only if the signal was emitted when the cursor is at one of the tweet borders.

The side effect of doing this is exactly what you reported: when you move the cursor to another window, the buttons do not disappear because the signal wasn't emitted when the cursor was at one of the borders.

Some kind of "really-leave-im-not-even-on-a-child" signal would solve this easily.

Changed in polly:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Bertrand Lorentz (bertrand-lorentz) wrote :

According to the docs, you need to mess with the GdkWindow of the widget when you use the leave-notify-event signal :
http://developer.gnome.org/gtk/stable/GtkWidget.html#GtkWidget-leave-notify-event

I don't know if it's necessary in Python, maybe it's done by the binding ?

In any case, here how it's done with the rating widget in Banshee:
http://git.gnome.org/browse/hyena/tree/Hyena.Gui/Hyena.Widgets/RatingEntry.cs#n162

Hope this helps

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

I think the masks are already setted when you use a GtkEventBox, which the tweet box subclasses.

I'll keep investigating, surely there's an easy way of knowing if the cursor is inside a widget or one of its children.

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

Other bug subscribers

Remote bug watches

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