Commit 5d61489d authored by Guido Gunther's avatar Guido Gunther
Browse files

osk-button: Show/hide depending on a11y setting

This makes sure we don't show the button even though
squeekboard would not unfold.

Closes: #363
Signed-off-by: Guido Gunther's avatarGuido Günther <>
parent d0be6713
......@@ -81,6 +81,19 @@ on_osk_visibility_changed (PhoshOskButton *self, GParamSpec *pspec, PhoshOskMana
static gboolean
on_idle (PhoshOskButton *self)
g_autoptr (GSettings) settings = NULL;
settings = g_settings_new ("org.gnome.desktop.a11y.applications");
g_settings_bind (settings, "screen-keyboard-enabled",
self, "visible", G_SETTINGS_BIND_GET);
return FALSE;
static void
phosh_osk_button_constructed (GObject *object)
......@@ -116,6 +129,8 @@ phosh_osk_button_constructed (GObject *object)
on_osk_availability_changed (self, NULL, self->osk);
on_osk_visibility_changed (self, NULL, self->osk);
g_idle_add ((GSourceFunc) on_idle, self);
......@@ -41,7 +41,7 @@
<object class="PhoshOskButton" id="btn_osk">
<property name="visible">True</property>
<property name="visible">False</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment