diff --git a/compositor/KeyboardManager.vala b/compositor/KeyboardManager.vala index 1df06b6ff..8b8616fc9 100644 --- a/compositor/KeyboardManager.vala +++ b/compositor/KeyboardManager.vala @@ -20,11 +20,13 @@ namespace GreeterCompositor { static KeyboardManager? instance; static VariantType sources_variant_type; + public unowned Meta.Display display { construct; private get; } + public static void init (Meta.Display display) { if (instance != null) return; - instance = new KeyboardManager (); + instance = new KeyboardManager (display); display.modifiers_accelerator_activated.connect (instance.handle_modifiers_accelerator_activated); } @@ -35,8 +37,8 @@ namespace GreeterCompositor { GLib.Settings settings; - KeyboardManager () { - Object (); + KeyboardManager (Meta.Display display) { + Object (display: display); } construct { @@ -107,7 +109,7 @@ namespace GreeterCompositor { variant = variant + ","; } - Meta.Backend.get_backend ().set_keymap (layout, variant, options); + display.get_context ().get_backend ().set_keymap (layout, variant, options); } } } diff --git a/compositor/WindowManager.vala b/compositor/WindowManager.vala index 961abaaef..517f52ddf 100644 --- a/compositor/WindowManager.vala +++ b/compositor/WindowManager.vala @@ -312,7 +312,12 @@ namespace GreeterCompositor { public override void confirm_display_change () { +#if HAS_MUTTER44 + unowned var monitor_manager = get_display ().get_context ().get_backend ().get_monitor_manager (); + var timeout = monitor_manager.get_display_configuration_timeout (); +#else var timeout = Meta.MonitorManager.get_display_configuration_timeout (); +#endif var summary = ngettext ( "Changes will automatically revert after %i second.", "Changes will automatically revert after %i seconds.",