use remote stevia
This commit is contained in:
parent
cf92170b72
commit
7baee200fb
5 changed files with 34 additions and 62 deletions
18
flake.lock
generated
18
flake.lock
generated
|
|
@ -1253,6 +1253,7 @@
|
|||
"run0-sudo-shim": "run0-sudo-shim",
|
||||
"sable": "sable",
|
||||
"sable-next": "sable-next",
|
||||
"stevia-mobile": "stevia-mobile",
|
||||
"stylix": "stylix",
|
||||
"wrapper-manager": "wrapper-manager"
|
||||
}
|
||||
|
|
@ -1374,6 +1375,23 @@
|
|||
"url": "https://git.sable.moe/SableClient/sable-next"
|
||||
}
|
||||
},
|
||||
"stevia-mobile": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1794890246,
|
||||
"narHash": "sha256-l/7hLzzMnjCiy2M5pPrCbHS1qOIYv9Q+D7rS+y8K4xQ=",
|
||||
"ref": "quad/mobile",
|
||||
"rev": "6008f299dd78270e132dbb26f64adfa3c53885e3",
|
||||
"revCount": 1348,
|
||||
"type": "git",
|
||||
"url": "https://gitlab.gnome.org/Henry-Hiles/stevia"
|
||||
},
|
||||
"original": {
|
||||
"ref": "quad/mobile",
|
||||
"type": "git",
|
||||
"url": "https://gitlab.gnome.org/Henry-Hiles/stevia"
|
||||
}
|
||||
},
|
||||
"stylix": {
|
||||
"inputs": {
|
||||
"base16": "base16",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@
|
|||
url = "github:Henry-Hiles/niri/quad/mobile";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
stevia-mobile = {
|
||||
url = "git+https://gitlab.gnome.org/Henry-Hiles/stevia?ref=quad/mobile";
|
||||
flake = false;
|
||||
};
|
||||
nixphone = {
|
||||
url = "git+https://codeberg.org/nixphone/nixphone";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
|||
|
|
@ -17,11 +17,18 @@ let
|
|||
swayosd-client = lib.getExe' pkgs.swayosd "swayosd-client";
|
||||
|
||||
stevia = pkgs.stevia.overrideAttrs (old: {
|
||||
patches = (old.patches or [ ]) ++ [
|
||||
# Stevia normally needs a phoc-only protocol to start.
|
||||
./stevia-optional-device-state.patch
|
||||
# Bring back stevia on textfield re-focus
|
||||
./stevia-reshow-on-tap.patch
|
||||
version = "quad-mobile-${inputs.stevia-mobile.shortRev}";
|
||||
src = inputs.stevia-mobile;
|
||||
# Needed by newer Stevia than nixpkgs has
|
||||
buildInputs = old.buildInputs ++ [
|
||||
pkgs.gsettings-desktop-schemas
|
||||
pkgs.gst_all_1.gstreamer
|
||||
pkgs.gst_all_1.gst-plugins-base
|
||||
pkgs.libsoup_3
|
||||
];
|
||||
mesonFlags = old.mesonFlags ++ [
|
||||
"-Duim=disabled"
|
||||
"-Dgovarnam=disabled"
|
||||
];
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
--- a/src/pos-hw-tracker.c
|
||||
+++ b/src/pos-hw-tracker.c
|
||||
@@ -72,7 +72,9 @@
|
||||
gpointer device_state)
|
||||
{
|
||||
self->device_state = device_state;
|
||||
- zphoc_device_state_v1_add_listener (self->device_state, &device_state_listener, self);
|
||||
+ /* Only phoc has the device state protocol. Without it, assume there is no hardware keyboard. */
|
||||
+ if (self->device_state)
|
||||
+ zphoc_device_state_v1_add_listener (self->device_state, &device_state_listener, self);
|
||||
}
|
||||
|
||||
|
||||
--- a/src/pos-wayland.c
|
||||
+++ b/src/pos-wayland.c
|
||||
@@ -387,6 +387,5 @@
|
||||
self->zwlr_foreign_toplevel_manager_v1 &&
|
||||
self->layer_shell &&
|
||||
self->zxdg_output_manager_v1 &&
|
||||
- self->zphoc_device_state_v1 &&
|
||||
self->wlr_data_control_manager);
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
--- a/src/pos-input-method.c
|
||||
+++ b/src/pos-input-method.c
|
||||
@@ -62,6 +62,8 @@
|
||||
PosImState *submitted;
|
||||
|
||||
guint serial;
|
||||
+ /* Activated again while already active, e.g. after tapping a focused text field. */
|
||||
+ gboolean reactivated;
|
||||
};
|
||||
G_DEFINE_TYPE (PosInputMethod, pos_input_method, G_TYPE_OBJECT)
|
||||
|
||||
@@ -93,8 +95,11 @@
|
||||
|
||||
g_debug ("%s", __func__);
|
||||
|
||||
- if (self->pending->active == TRUE)
|
||||
+ /* Let the keyboard show itself again if it was hidden by the user. */
|
||||
+ if (self->pending->active == TRUE) {
|
||||
+ self->reactivated = TRUE;
|
||||
return;
|
||||
+ }
|
||||
|
||||
self->pending->active = TRUE;
|
||||
g_clear_pointer (&self->pending->surrounding_text, g_free);
|
||||
@@ -194,8 +199,9 @@
|
||||
|
||||
self->submitted = pos_im_state_dup (self->pending);
|
||||
|
||||
- if (current->active != self->submitted->active)
|
||||
+ if (current->active != self->submitted->active || self->reactivated)
|
||||
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ACTIVE]);
|
||||
+ self->reactivated = FALSE;
|
||||
|
||||
if (g_strcmp0 (current->surrounding_text, self->submitted->surrounding_text) ||
|
||||
current->cursor != self->submitted->cursor ||
|
||||
Loading…
Reference in a new issue