use remote stevia
This commit is contained in:
parent
cf92170b72
commit
7baee200fb
3 changed files with 34 additions and 62 deletions
|
|
@ -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