Commit d13baa8f authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

imwayland: Translate hint for not showing an OSK

INHIBIT_OSK becomes ON_SCREEN_INPUT_PROVIDED in accordance to the second version of text_input_v3 Wayland protocol.
parent e5b05d24
Pipeline #50141 failed with stage
in 0 seconds
...@@ -383,7 +383,8 @@ translate_hints (GtkInputHints input_hints, ...@@ -383,7 +383,8 @@ translate_hints (GtkInputHints input_hints,
hints |= ZWP_TEXT_INPUT_V3_CONTENT_HINT_TITLECASE; hints |= ZWP_TEXT_INPUT_V3_CONTENT_HINT_TITLECASE;
if (input_hints & GTK_INPUT_HINT_UPPERCASE_SENTENCES) if (input_hints & GTK_INPUT_HINT_UPPERCASE_SENTENCES)
hints |= ZWP_TEXT_INPUT_V3_CONTENT_HINT_AUTO_CAPITALIZATION; hints |= ZWP_TEXT_INPUT_V3_CONTENT_HINT_AUTO_CAPITALIZATION;
if (input_hints & GTK_INPUT_HINT_INHIBIT_OSK)
hints |= ZWP_TEXT_INPUT_V3_CONTENT_HINT_ON_SCREEN_INPUT_PROVIDED;
if (purpose == GTK_INPUT_PURPOSE_PIN || if (purpose == GTK_INPUT_PURPOSE_PIN ||
purpose == GTK_INPUT_PURPOSE_PASSWORD) purpose == GTK_INPUT_PURPOSE_PASSWORD)
{ {
...@@ -491,17 +492,13 @@ released_cb (GtkGestureMultiPress *gesture, ...@@ -491,17 +492,13 @@ released_cb (GtkGestureMultiPress *gesture,
gdouble y, gdouble y,
GtkIMContextWayland *context) GtkIMContextWayland *context)
{ {
GtkInputHints hints;
gboolean result; gboolean result;
if (!global->current) if (!global->current)
return; return;
g_object_get (context, "input-hints", &hints, NULL);
if (global->focused && if (global->focused &&
n_press == 1 && n_press == 1 &&
(hints & GTK_INPUT_HINT_INHIBIT_OSK) == 0 &&
!gtk_drag_check_threshold (context->widget, !gtk_drag_check_threshold (context->widget,
context->press_x, context->press_x,
context->press_y, context->press_y,
......
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