[gnome] Update extensions
This commit is contained in:
@ -106,8 +106,23 @@ export const Clipboard = GObject.registerClass(
|
||||
}
|
||||
}
|
||||
|
||||
async _onHandleMethodCall(iface, name, parameters, invocation) {
|
||||
async _onHandleMethodCall(iface, name, param1, param2) {
|
||||
let retval;
|
||||
let invocation, parameters;
|
||||
|
||||
// GNOME 50+ changed the callback signature from
|
||||
// (iface, name, parameters, invocation) to
|
||||
// (iface, name, invocation, parameters)
|
||||
// Detect which order is being used
|
||||
if (param1 instanceof GLib.Variant) {
|
||||
// Old order: parameters, invocation
|
||||
parameters = param1;
|
||||
invocation = param2;
|
||||
} else {
|
||||
// New order: invocation, parameters
|
||||
invocation = param1;
|
||||
parameters = param2;
|
||||
}
|
||||
|
||||
try {
|
||||
const args = parameters.recursiveUnpack();
|
||||
|
||||
Reference in New Issue
Block a user