From 86ea71a5d3f1b15be7ab4d708b70264fc809e276 Mon Sep 17 00:00:00 2001
From: Marius Gripsgard <marius@ubports.com>
Date: Sun, 8 Sep 2019 19:54:55 +0200
Subject: [PATCH] Wayland hack, set maliit-server to inputmethod type (WIP)

---
 src/platforms/mirserver/windowmanagementpolicy.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

--- a/src/platforms/mirserver/wrappedwindowmanagementpolicy.cpp
+++ b/src/platforms/mirserver/wrappedwindowmanagementpolicy.cpp
@@ -139,6 +139,12 @@
             if (initialSize.isValid() && surfaceType == mir_window_type_normal) {
                 parameters.size() = toMirSize(initialSize);
             }
+
+            auto surfaceName = requestParameters.name().is_set() ? requestParameters.name().value() : "";
+
+            if (surfaceName == "maliit-server") {
+                parameters.type() = mir_window_type_inputmethod;
+            }
         }
 
         parameters.server_side_decorated() = false;
