summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDorota Czaplejewicz <dorota.czaplejewicz@puri.sm>2019-12-09 14:06:32 +0000
committerDorota Czaplejewicz <dorota.czaplejewicz@puri.sm>2019-12-12 18:20:06 +0000
commitc7c8ab662437a56dc038bef9c45eb6213bbcc6d5 (patch)
treea5739e95f1227a390e3559bc04c4a155f1d60a78
parentd1a9ba2c9316bd442ea100a45abc773583410423 (diff)
downloadgtk+-c7c8ab662437a56dc038bef9c45eb6213bbcc6d5.tar.gz
imwayland: Suppport terminal purpose
-rw-r--r--gtk/gtkenums.h4
-rw-r--r--modules/input/imwayland.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index 64104bc949..5bf3228a3e 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -985,6 +985,7 @@ G_END_DECLS
* @GTK_INPUT_PURPOSE_NAME: Edited field expects the name of a person
* @GTK_INPUT_PURPOSE_PASSWORD: Like @GTK_INPUT_PURPOSE_FREE_FORM, but characters are hidden
* @GTK_INPUT_PURPOSE_PIN: Like @GTK_INPUT_PURPOSE_DIGITS, but characters are hidden
+ * @GTK_INPUT_PURPOSE_TERMINAL: Allow any character, in addition to control codes
*
* Describes primary purpose of the input widget. This information is
* useful for on-screen keyboards and similar input methods to decide
@@ -1018,7 +1019,8 @@ typedef enum
GTK_INPUT_PURPOSE_EMAIL,
GTK_INPUT_PURPOSE_NAME,
GTK_INPUT_PURPOSE_PASSWORD,
- GTK_INPUT_PURPOSE_PIN
+ GTK_INPUT_PURPOSE_PIN,
+ GTK_INPUT_PURPOSE_TERMINAL,
} GtkInputPurpose;
/**
diff --git a/modules/input/imwayland.c b/modules/input/imwayland.c
index 41cb296336..bc9eb7ec3f 100644
--- a/modules/input/imwayland.c
+++ b/modules/input/imwayland.c
@@ -419,6 +419,8 @@ translate_purpose (GtkInputPurpose purpose)
return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PASSWORD;
case GTK_INPUT_PURPOSE_PIN:
return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PIN;
+ case GTK_INPUT_PURPOSE_TERMINAL:
+ return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TERMINAL;
}
return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NORMAL;