@@ -1,5 +1,5 @@
2− * Copyright (C) 2016 Canonical, Ltd.
2+ * Copyright (C) 2016-2017 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ import QtQuick 2.4
18import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
19import Unity.Application 0.1
19import Unity.Application 0.1
24 property alias surface: childWindow.surface
24 property alias surface: childWindow.surface
@@ -100,6 +100,13 @@ Item {
100 onFocusRequested: {
100 onFocusRequested: {
101 root.surface.activate();
101 root.surface.activate();
104+ if (root.surface.focused) {
105+ childWindow.focus = true;
105 // Using a loader here mainly to circunvent the "ChildWindowTree is instantiated recursively" error from the QML engine
112 // Using a loader here mainly to circunvent the "ChildWindowTree is instantiated recursively" error from the QML engine
@@ -119,5 +126,12 @@ Item {
119 property: "boundsItem"
126 property: "boundsItem"
120 value: root.boundsItem
127 value: root.boundsItem
131+ // A surface in some ChildWindowTree got focused.