GNOME Bugzilla – Bug 654163
Slides the status bar when mouse pointer approaches
Last modified: 2012-01-16 23:54:25 UTC
WIP patch to reintroduce 'mouse escaping' for the status bar after the switch to the new GtkOverlay widget. The idea is to wrap the actual widget in a larger EventBox used to catch mouse motion in our 'escaping area'. This basically works, with a large caveat: I couldn't find a way to make the eventbox invisible and click events passthrough. So it is far from being reviewable, but I need some help here :)
Created attachment 191469 [details] [review] Slides the status bar when mouse pointer approaches Introduce a widget wrapper making it 'escape' the mouse pointer. Make use if it in EphyEmbed for the status bar.
I thought we had said it was just fine to listen to the events in our parent. Is this not feasible anymore?
(In reply to comment #2) > I thought we had said it was just fine to listen to the events in our parent. > Is this not feasible anymore? That's certainly feasible but the widgets hierarchy of GtkOverlay is hidden to us. I am not sure that trying to find the right parent and depending on GtkOverlay internal implemetation is a great idea. Also, the escaping behaviour is orthogonal to the overlay one, IMHO. Might be interesting to use it in other context. Still if it is the path you prefer we follow, I think subclassing GtkOverlay might be a better idea, after all the container should be responsible for its children placement. Looks like Gedit took that path with their GeditAnimatedOverlay. But well, if you know an easy trick to make the GtkEventBox not draw its background, I'd favor the proposed solution. I hope you share that opinion :)
Considering you are having problems to implement what you want, and that we have been using the "connect to the parent" thing for a while without issues, I'd prefer to stick to the same plan if it's possible (which seems to be, since Gedit does it as you say).
We are sharing NautilusFloatingBar with nautilus now, which does its own thing, so this is obsolete. Thanks for the patch though!