Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion src/PopoverWidget.vala
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ public class QuickSettings.PopoverWidget : Gtk.Box {
});

var applications_settings = new Settings ("org.gnome.desktop.a11y.applications");
applications_settings.bind ("screen-keyboard-enabled", onscreen_keyboard, "active", DEFAULT);
applications_settings.bind ("screen-reader-enabled", screen_reader, "active", DEFAULT);

var glib_settings = new Settings ("io.elementary.desktop.quick-settings");
Expand Down Expand Up @@ -146,6 +145,29 @@ public class QuickSettings.PopoverWidget : Gtk.Box {
current_user_button.clicked.connect (() => {
stack.visible_child = accounts_view;
});

if (!(Gdk.Display.get_default () is Gdk.Wayland.Display)) {
applications_settings.bind ("screen-keyboard-enabled", onscreen_keyboard, "active", DEFAULT);
} else {
onscreen_keyboard.notify["active"].connect (() => {
if (!onscreen_keyboard.active) {
return;
}

onscreen_keyboard.active = false;

var message_dialog = new Granite.MessageDialog (
_("On Screen keyboard is unavailable in the Secure session"),
_("Log out and select “Classic session” to use the On Screen Keyboard."),
new ThemedIcon ("onboard")
) {
badge_icon = new ThemedIcon ("system-log-out"),
transient_for = (Gtk.Window) get_toplevel ()
};
message_dialog.response.connect (message_dialog.destroy);
message_dialog.present ();
});
}
}

private async SensorProxy? setup_sensor_proxy () {
Expand Down