mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 15:15:39 +03:00
Backport media keys fixes to earlier GSD versions (#754)
This commit is contained in:
parent
d9434d0be6
commit
a814cecc19
@ -18,7 +18,7 @@
|
|||||||
namespace Gala {
|
namespace Gala {
|
||||||
public struct Accelerator {
|
public struct Accelerator {
|
||||||
public string name;
|
public string name;
|
||||||
#if HAS_MUTTER336
|
#if HAS_MUTTER332
|
||||||
public uint grab_flags;
|
public uint grab_flags;
|
||||||
#endif
|
#endif
|
||||||
public Meta.KeyBindingFlags flags;
|
public Meta.KeyBindingFlags flags;
|
||||||
@ -72,7 +72,7 @@ namespace Gala {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAS_MUTTER336
|
#if HAS_MUTTER332
|
||||||
public uint grab_accelerator (string accelerator, uint grab_flags, uint flags) throws DBusError, IOError {
|
public uint grab_accelerator (string accelerator, uint grab_flags, uint flags) throws DBusError, IOError {
|
||||||
#else
|
#else
|
||||||
public uint grab_accelerator (string accelerator, uint flags) throws DBusError, IOError {
|
public uint grab_accelerator (string accelerator, uint flags) throws DBusError, IOError {
|
||||||
@ -99,7 +99,7 @@ namespace Gala {
|
|||||||
uint[] actions = {};
|
uint[] actions = {};
|
||||||
|
|
||||||
foreach (unowned Accelerator? accelerator in accelerators) {
|
foreach (unowned Accelerator? accelerator in accelerators) {
|
||||||
#if HAS_MUTTER336
|
#if HAS_MUTTER332
|
||||||
actions += grab_accelerator (accelerator.name, accelerator.grab_flags, accelerator.flags);
|
actions += grab_accelerator (accelerator.name, accelerator.grab_flags, accelerator.flags);
|
||||||
#else
|
#else
|
||||||
actions += grab_accelerator (accelerator.name, accelerator.flags);
|
actions += grab_accelerator (accelerator.name, accelerator.flags);
|
||||||
@ -139,7 +139,7 @@ namespace Gala {
|
|||||||
if (parameters.contains ("label"))
|
if (parameters.contains ("label"))
|
||||||
label = parameters["label"].get_string ();
|
label = parameters["label"].get_string ();
|
||||||
int32 level = 0;
|
int32 level = 0;
|
||||||
#if HAS_MUTTER336
|
#if HAS_MUTTER334
|
||||||
if (parameters.contains ("level")) {
|
if (parameters.contains ("level")) {
|
||||||
var double_level = parameters["level"].get_double ();
|
var double_level = parameters["level"].get_double ();
|
||||||
level = (int)(double_level * 100);
|
level = (int)(double_level * 100);
|
||||||
|
Loading…
Reference in New Issue
Block a user