Commit da121ffb authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

[alarms] Allow alarms window to be swipeable out.

parent 7d24d1a1
...@@ -41,7 +41,7 @@ Compositor { ...@@ -41,7 +41,7 @@ Compositor {
// The application window that was most recently topmost // The application window that was most recently topmost
property Item topmostApplicationWindow property Item topmostApplicationWindow
property Item topmostAlarmWindow property Item topmostAlarmWindow: null
function windowToFront(winId) { function windowToFront(winId) {
var o = root.windowForId(winId) var o = root.windowForId(winId)
...@@ -115,13 +115,13 @@ Compositor { ...@@ -115,13 +115,13 @@ Compositor {
} }
Item { Item {
id: alarmsLayer id: alarmsLayer
z: 7 z: 3
} }
} }
ScreenGestureArea { ScreenGestureArea {
id: gestureArea id: gestureArea
z: 2 z: 7
anchors.fill: parent anchors.fill: parent
...@@ -178,7 +178,7 @@ Compositor { ...@@ -178,7 +178,7 @@ Compositor {
} }
PropertyChanges { PropertyChanges {
target: appLayer target: root.topmostAlarmWindow == null ? appLayer : alarmsLayer
x: gestureArea.horizontal ? gestureArea.value : 0 x: gestureArea.horizontal ? gestureArea.value : 0
y: gestureArea.horizontal ? 0 : gestureArea.value y: gestureArea.horizontal ? 0 : gestureArea.value
} }
...@@ -343,10 +343,13 @@ Compositor { ...@@ -343,10 +343,13 @@ Compositor {
} }
onWindowRemoved: { onWindowRemoved: {
console.log("Compositor: Window removed \"" + window.title + "\"") console.log("Compositor: Window removed \"" + window.title + "\"" + " category: " + window.category)
var w = window.userData; var w = window.userData;
if (window.category == "alarm") {
root.topmostAlarmWindow = null
setCurrentWindow(root.homeWindow)
}
if (root.topmostWindow == w) if (root.topmostWindow == w)
setCurrentWindow(root.homeWindow); setCurrentWindow(root.homeWindow);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment