Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable-key-repeat gets lost during initialization #3743

Open
tarek-y-ismail opened this issue Feb 7, 2025 · 0 comments · May be fixed by #3749
Open

enable-key-repeat gets lost during initialization #3743

tarek-y-ismail opened this issue Feb 7, 2025 · 0 comments · May be fixed by #3749
Labels

Comments

@tarek-y-ismail
Copy link
Contributor

Pointed out by @RAOF, the reference to the accessibility manager on this line is likely the only one, so after this line, its destroyed and the setting is lost.

auto const enable_repeat = options->get<bool>(options::enable_key_repeat_opt);
the_accessibility_manager()->override_key_repeat_settings(enable_repeat);

One possible solution (untested) is:

             auto const enable_repeat = options->get<bool>(options::enable_key_repeat_opt);
-            the_accessibility_manager()->override_key_repeat_settings(enable_repeat);
+            auto accessibility_manager = the_accessibility_manager();
+            accessibility_manager->override_key_repeat_settings(enable_repeat);
 
             auto const x11_enabled = options->is_set(mo::x11_display_opt) && options->get<bool>(mo::x11_display_opt);
 
@@ -398,7 +399,7 @@ std::shared_ptr<mf::Connector>
                     x11_enabled,
                     wayland_extension_hooks),
                 wayland_extension_filter,
-                the_accessibility_manager(),
+                std::move(accessibility_manager),
                 the_session_lock(),
                 the_decoration_strategy(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant