Files
guru/x11-misc/squeekboard/files/450.patch
Marco Scardovi ac04184117 x11-misc/squeekboard: add package
squeekboard is the keyboard for phosh

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Marco Scardovi <marco@scardovi.com>
2021-06-22 19:57:52 +02:00

39 lines
1.5 KiB
Diff

From 4fdce2802ad3ed8705c9629aa5622c89c70eabae Mon Sep 17 00:00:00 2001
From: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
Date: Wed, 7 Apr 2021 15:26:18 +0000
Subject: [PATCH] layouts: Stop assuming that layout name always changes on
switch
Layout type switching outside of overlay was always done with gsettings in the middle, assuming that all clicks on languages in the popover result in a gsettings event. That's a bad assumption if there's only one xkb lang present.
This is a simple work around. A better solution would be to turn the entire system of layout switching into a central object that receives messages about changes that need to be applied, and then applies them.
---
src/popover.rs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/popover.rs b/src/popover.rs
index 92103869..0d909b82 100644
--- a/src/popover.rs
+++ b/src/popover.rs
@@ -213,7 +213,16 @@ fn set_visible_layout(
layout_id: LayoutId,
) {
match layout_id {
- LayoutId::System { kind, name } => set_layout(kind, name),
+ LayoutId::System { kind, name } => {
+ unsafe {
+ use std::ptr;
+ manager::c::eekboard_context_service_set_overlay(
+ manager,
+ ptr::null(),
+ );
+ }
+ set_layout(kind, name);
+ }
LayoutId::Local(name) => {
let name = CString::new(name.as_str()).unwrap();
let name_ptr = name.as_ptr();
--
GitLab