on xenial help sign in
Resize input method surfaces to match the Shell size
commit0f863ba0a57c45ae68df3c23e41b42cd72f96117 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateTue 3 Jun 2014, 14:16 (12 years ago) parente08f346
2 files changed+4−10
qml/Components/InputMethod.qml−7 qml/Shell.qml+4−3
qml/Components/InputMethod.qml−7
@@ -74,15 +74,8 @@ Item {
7474 }
7575 }
7676
77− function removeSurface() {
78− surface.parent = null;
79− surface.release();
80− }
81−
8277 onSurfaceChanged: {
8378 if (surface) {
84− root.width = surface.implicitWidth;
85− root.height = surface.implicitHeight;
8679 surface.parent = root;
8780 surface.anchors.fill = root;
8881 }
qml/Shell.qml+4−3
@@ -245,6 +245,7 @@ FocusScope {
245245
246246 InputMethod {
247247 id: inputMethod
248+ anchors.fill: parent
248249 }
249250
250251 Connections {
@@ -258,11 +259,11 @@ FocusScope {
258259 }
259260
260261 onSurfaceDestroyed: {
261− var orphan = !surface.parent;
262262 if (inputMethod.surface == surface) {
263− inputMethod.removeSurface(surface);
263+ inputMethod.surface = null;
264+ surface.parent = null;
264265 }
265− if (orphan) {
266+ if (!surface.parent) {
266267 // there's no one displaying it. delete it right away
267268 surface.release();
268269 }