2* Copyright (C) 2016 Canonical Ltd.
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
6* the Free Software Foundation; version 3.
8* This program is distributed in the hope that it will be useful,
9* but WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
19import QtQuick.Window 2.2
20import WindowManager 1.0
21import QtMir.Application 0.1
29 objectName: "screen"+index
32 visible: screen != null
33 visibility: applicationArguments.hasFullscreen ? Window.FullScreen : Window.Windowed
34 flags: applicationArguments.hasFrameless ? Qt.FramelessWindowHint : 0
37 when: applicationArguments.hasGeometry
39 restoreMode: Binding.RestoreBinding
41 value: applicationArguments.windowGeometry.width
44 when: applicationArguments.hasGeometry
46 restoreMode: Binding.RestoreBinding
48 value: applicationArguments.windowGeometry.height
51 Component.onCompleted: screen.active = true
54 property var windowManagerSurfaceManagerBinding: Binding {
55 target: WindowManagerObjects
56 restoreMode: Binding.RestoreBinding
57 property: "surfaceManager"
60 property var windowManagerApplicationManagerBinding: Binding {
61 target: WindowManagerObjects
62 restoreMode: Binding.RestoreBinding
63 property: "applicationManager"
64 value: ApplicationManager
67 Component.onDestruction: {
68 WindowManagerObjects.surfaceManager = null;
69 WindowManagerObjects.applicationManager = null;