Detecting button-release on Main.panel in GNOME 3.6



Hi all,

I'm trying to detect a button-release-event on Main.panel.actor (top panel) in GNOME 3.6.

However, upon button press with a maximized window, the inbuilt Panel detects button-press-event and begins a grab op on the screen, which seems to eat up the corresponding button-release-event.

On GNOME 3.2 and 3.4, ending a grab op by releasing the button would still fire a button-release-event so I could connect to this event and not worry about anything.

On GNOME 3.6 I miss all button releases that also end a grab op, i.e. simply left clicking on the top panel fires a button-press from panel.actor and then a grab-op-end from global.screen but *no* button-release from panel.actor.

So, my question(s) are:

* am I right in my assumption that grab-ops gobble up the button-release event?
* how can I listen for the button-release event on Main.panel.actor? I could listen to button-press and upon that, listen to grab-op-end, but how can I check that the grab op ended on Main.panel.actor? (grab-op-end doesn't have an `event` parameter for me to get coordinates for).

I have tried adding my own button-press handler that returns `true` so that the event is handled and Main.panel's _onButtonPress function never gets to handle the event. However it turns out that Main.panel._onButtonPress gets a chance at handling the event before my function ever does (is there some way for me to make my function get a chance to handle the event before panel._onButtonPress without subclassing Panel? The handler is passed in in Panel._init with a Lang.bind() so I can't just override Panel.prototype._onButtonPress).

cheers,
Amy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]