Commit 4780bb28 authored by Aleksi Suomalainen's avatar Aleksi Suomalainen Committed by eekkelund

Overlay stuffsies

parent e5c0a690
...@@ -25,9 +25,16 @@ import org.nemomobile.devicelock 1.0 ...@@ -25,9 +25,16 @@ import org.nemomobile.devicelock 1.0
import "compositor" import "compositor"
import "scripts/desktop.js" as Desktop import "scripts/desktop.js" as Desktop
Item { Item {
id: root id: root
property bool isShaderUsed: false property bool isShaderUsed: false
property bool isAlarmWindow: false
property alias wrapperMystic: mysticWrapper
// Qt::WindowType enum has no option for an Input Method window type. This is a magic value
// used by ubuntumirclient QPA for special clients to request input method windows from Mir.
property int inputMethodWindowType: 2;
Connections { Connections {
target: comp.quickWindow target: comp.quickWindow
onActiveFocusItemChanged: { onActiveFocusItemChanged: {
...@@ -267,6 +274,7 @@ Item { ...@@ -267,6 +274,7 @@ Item {
Component { Component {
id: mysticWrapper id: mysticWrapper
WindowWrapperMystic { WindowWrapperMystic {
id: innerMystic
} }
} }
Compositor { Compositor {
...@@ -288,21 +296,12 @@ Item { ...@@ -288,21 +296,12 @@ Item {
var window = null var window = null
var wi = null var wi = null
if (o) if (o)
window = o.userData window = o
if (window == null) if (window == null)
window = homeWindow window = homeWindow
setCurrentWindow(window) setCurrentWindow(window)
if (isAlarmWindow){
comp.topmostAlarmWindow = window
wi = mysticWrapper.createObject(parent, {window: window})
window.userData = wi
setCurrentWindow(wi)
} else {
if (!comp.topmostAlarmWindow) {
wi = mysticWrapper.createObject(parent, {window: window})
}
}
} }
function setCurrentWindow(w, skipAnimation) { function setCurrentWindow(w, skipAnimation) {
...@@ -318,9 +317,7 @@ Item { ...@@ -318,9 +317,7 @@ Item {
topmostApplicationWindow.visible = false topmostApplicationWindow.visible = false
topmostApplicationWindow = topmostWindow topmostApplicationWindow = topmostWindow
topmostApplicationWindow.visible = true topmostApplicationWindow.visible = true
if (!skipAnimation) if (w.window) w.window.takeFocus()
topmostApplicationWindow.animateIn()
w.window.takeFocus()
} }
} }
onSensorOrientationChanged: { onSensorOrientationChanged: {
...@@ -332,14 +329,14 @@ Item { ...@@ -332,14 +329,14 @@ Item {
onWindowAdded: { onWindowAdded: {
console.log("Compositor: Window added \"" + window.title + "\"" console.log("Compositor: Window added \"" + window.title + "\""
+ " category: " + window.category) + " category: " + window.category + " flags " + window.windowFlags)
var isHomeWindow = window.isInProcess && comp.homeWindow == null var isHomeWindow = window.isInProcess && comp.homeWindow == null
&& window.title === "Home" && window.title === "Home"
var isDialogWindow = window.category === "dialog" var isDialogWindow = window.category === "dialog"
var isNotificationWindow = window.category == "notification" var isNotificationWindow = window.category == "notification"
var isOverlayWindow = window.category == "overlay" var isOverlayWindow = window.category == "overlay" || window.windowFlags === inputMethodWindowType
var isAlarmWindow = window.category == "alarm" isAlarmWindow = window.category == "alarm"
var parent = null var parent = null
if (window.category == "cover" || window.title == "_CoverWindow") { if (window.category == "cover" || window.title == "_CoverWindow") {
window.visible = false window.visible = false
...@@ -358,10 +355,12 @@ Item { ...@@ -358,10 +355,12 @@ Item {
} }
var w var w
if (isOverlayWindow) if (isOverlayWindow) {
console.debug("Have overlay")
w = alphaWrapper.createObject(parent, { w = alphaWrapper.createObject(parent, {
window: window window: window
}) })
}
else else
w = windowWrapper.createObject(parent, { w = windowWrapper.createObject(parent, {
window: window window: window
......
...@@ -12,16 +12,15 @@ styles.path = /usr/share/lipstick-glacier-home-qt5 ...@@ -12,16 +12,15 @@ styles.path = /usr/share/lipstick-glacier-home-qt5
styles.files = nemovars.conf styles.files = nemovars.conf
images.path = /usr/share/lipstick-glacier-home-qt5/qml/images images.path = /usr/share/lipstick-glacier-home-qt5/qml/images
images.files = qml/images/*.png \ images.files = $$files(qml/images/*.png,false) \
qml/images/*.jpg \ $$files(qml/images/*.jpg,false) \
qml/images/*.svg $$files(qml/images/*.svg,false)
theme.path = /usr/share/lipstick-glacier-home-qt5/qml/theme theme.path = /usr/share/lipstick-glacier-home-qt5/qml/theme
theme.files = qml/theme/*.png theme.files = $$files(qml/theme/*.png,false)
qml.path = /usr/share/lipstick-glacier-home-qt5/qml qml.path = /usr/share/lipstick-glacier-home-qt5/qml
qml.files = qml/MainScreen.qml \ qml.files = qml/MainScreen.qml \
qml/compositor.qml \
qml/LauncherItemDelegate.qml \ qml/LauncherItemDelegate.qml \
qml/Lockscreen.qml \ qml/Lockscreen.qml \
qml/LockscreenClock.qml \ qml/LockscreenClock.qml \
...@@ -30,25 +29,19 @@ qml.files = qml/MainScreen.qml \ ...@@ -30,25 +29,19 @@ qml.files = qml/MainScreen.qml \
qml/ToolBarLayoutExample.qml \ qml/ToolBarLayoutExample.qml \
qml/SwitcherItem.qml \ qml/SwitcherItem.qml \
qml/CloseButton.qml \ qml/CloseButton.qml \
qml/NotificationPreview.qml \
qml/FeedsPage.qml \ qml/FeedsPage.qml \
qml/Statusbar.qml \ qml/Statusbar.qml \
qml/StatusbarItem.qml \
qml/WifiPanel.qml \
qml/SimPanel.qml \
qml/NumButton.qml \
qml/USBModeSelector.qml \
qml/Pager.qml \ qml/Pager.qml \
qml/VolumeControl.qml \ qml/VolumeControl.qml \
qml/BatteryPanel.qml \
qml/CommonPanel.qml \
qml/ShutdownScreen.qml \ qml/ShutdownScreen.qml \
qml/GlacierRotation.qml \ qml/GlacierRotation.qml \
qml/DeviceLockUI.qml \ qml/DeviceLockUI.qml \
qml/LauncherItemWrapper.qml \ qml/LauncherItemWrapper.qml \
qml/LauncherItemFolder.qml \ qml/LauncherItemFolder.qml \
qml/SearchListView.qml \ qml/SearchListView.qml \
qml/compositor_new.qml qml/compositor_new.qml \
qml/compositor.qml \
qml/LayerManager.qml
qmlcompositor.path = /usr/share/lipstick-glacier-home-qt5/qml/compositor qmlcompositor.path = /usr/share/lipstick-glacier-home-qt5/qml/compositor
qmlcompositor.files = qml/compositor/WindowWrapperMystic.qml \ qmlcompositor.files = qml/compositor/WindowWrapperMystic.qml \
...@@ -57,8 +50,7 @@ qmlcompositor.files = qml/compositor/WindowWrapperMystic.qml \ ...@@ -57,8 +50,7 @@ qmlcompositor.files = qml/compositor/WindowWrapperMystic.qml \
qml/compositor/ScreenGestureArea.qml qml/compositor/ScreenGestureArea.qml
scripts.path = /usr/share/lipstick-glacier-home-qt5/qml/scripts scripts.path = /usr/share/lipstick-glacier-home-qt5/qml/scripts
scripts.files = qml/scripts/desktop.js \ scripts.files = qml/scripts/desktop.js
qml/scripts/rotation.js
system.path = /usr/share/lipstick-glacier-home-qt5/qml/system system.path = /usr/share/lipstick-glacier-home-qt5/qml/system
system.files = qml/ShutdownScreen.qml system.files = qml/ShutdownScreen.qml
...@@ -155,4 +147,6 @@ DISTFILES += \ ...@@ -155,4 +147,6 @@ DISTFILES += \
settings-plugins/*/*.qml \ settings-plugins/*/*.qml \
settings-plugins/*/*.json \ settings-plugins/*/*.json \
settings-plugins/*/*.svg settings-plugins/*/*.svg
qml/connectivity/ConnectionSelector.qml \
qml/statusbar/BatteryIndicator.qml \
qml/LayerManager.qml
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