DBusAccelerator: Fix grab_accelerator argument order (#761)

This commit is contained in:
David Hewitt 2020-04-02 19:29:25 +01:00 committed by GitHub
parent b450a98314
commit 79f998e75d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,10 +18,10 @@
namespace Gala {
public struct Accelerator {
public string name;
public uint flags;
#if HAS_MUTTER332
public uint grab_flags;
public Meta.KeyBindingFlags grab_flags;
#endif
public Meta.KeyBindingFlags flags;
}
[DBus (name="org.gnome.Shell")]
@ -73,7 +73,7 @@ namespace Gala {
}
#if HAS_MUTTER332
public uint grab_accelerator (string accelerator, uint grab_flags, uint flags) throws DBusError, IOError {
public uint grab_accelerator (string accelerator, uint flags, Meta.KeyBindingFlags grab_flags) throws DBusError, IOError {
#else
public uint grab_accelerator (string accelerator, uint flags) throws DBusError, IOError {
#endif
@ -81,7 +81,7 @@ namespace Gala {
if (action == null) {
#if HAS_MUTTER332
action = wm.get_display ().grab_accelerator (accelerator, (Meta.KeyBindingFlags)flags);
action = wm.get_display ().grab_accelerator (accelerator, grab_flags);
#elif HAS_MUTTER330
action = wm.get_display ().grab_accelerator (accelerator);
#else
@ -100,7 +100,7 @@ namespace Gala {
foreach (unowned Accelerator? accelerator in accelerators) {
#if HAS_MUTTER332
actions += grab_accelerator (accelerator.name, accelerator.grab_flags, accelerator.flags);
actions += grab_accelerator (accelerator.name, accelerator.flags, accelerator.grab_flags);
#else
actions += grab_accelerator (accelerator.name, accelerator.flags);
#endif