indicatorStatusIcon: Use XAyatanaSecondaryActivate passing timestamp
This is not available in all the implementations, so if that's not the
case just fallback to default activation.
Marco Trevisan (TreviƱo)
2 years ago
373 | 373 |
this._proxy.ActivateRemote(x, y);
|
374 | 374 |
}
|
375 | 375 |
|
376 | |
secondaryActivate(x, y) {
|
377 | |
this._proxy.SecondaryActivateRemote(x, y);
|
|
376 |
secondaryActivate(timestamp, x, y) {
|
|
377 |
this._proxy.XAyatanaSecondaryActivateRemote(timestamp, (_, e) => {
|
|
378 |
if (e && e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD))
|
|
379 |
this._proxy.SecondaryActivateRemote(x, y);
|
|
380 |
else if (e)
|
|
381 |
logError(e);
|
|
382 |
});
|
378 | 383 |
}
|
379 | 384 |
|
380 | 385 |
scroll(dx, dy) {
|
249 | 249 |
// if middle mouse button clicked send SecondaryActivate dbus event and do not show appindicator menu
|
250 | 250 |
if (buttonEvent.button === 2) {
|
251 | 251 |
Main.panel.menuManager._closeMenu(true, Main.panel.menuManager.activeMenu);
|
252 | |
this._indicator.secondaryActivate(buttonEvent.x, buttonEvent.y);
|
|
252 |
this._indicator.secondaryActivate(buttonEvent.time, buttonEvent.x, buttonEvent.y);
|
253 | 253 |
return Clutter.EVENT_STOP;
|
254 | 254 |
}
|
255 | 255 |
|
69 | 69 |
<arg name="y" type="i" direction="in"/>
|
70 | 70 |
</method>
|
71 | 71 |
|
|
72 |
<method name="XAyatanaSecondaryActivate">
|
|
73 |
<arg name="timestamp" type="u" direction="in"/>
|
|
74 |
</method>
|
|
75 |
|
72 | 76 |
<method name="Scroll">
|
73 | 77 |
<arg name="delta" type="i" direction="in"/>
|
74 | 78 |
<arg name="orientation" type="s" direction="in"/>
|