Skip to content

Commit

Permalink
fixup! Add support for Mutter 44
Browse files Browse the repository at this point in the history
  • Loading branch information
bobby285271 committed Mar 26, 2023
1 parent 203b87a commit 8d17ec2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 6 additions & 4 deletions compositor/KeyboardManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -35,8 +37,8 @@ namespace GreeterCompositor {

GLib.Settings settings;

KeyboardManager () {
Object ();
KeyboardManager (Meta.Display display) {
Object (display: display);
}

construct {
Expand Down Expand Up @@ -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);
}
}
}
5 changes: 5 additions & 0 deletions compositor/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit 8d17ec2

Please sign in to comment.