Commit 5c05cfcc authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

[covers] Remove application covers from window model and do not show cover as window.

parent d6ce9ea7
#include "glacierwindowmodel.h"
GlacierWindowModel::GlacierWindowModel(): WindowModel()
{
}
GlacierWindowModel::~GlacierWindowModel() {
}
bool GlacierWindowModel::approveWindow(LipstickCompositorWindow *window)
{
return window->isInProcess() == false && window->category() != QLatin1String("overlay") && window->category() != QLatin1String("cover");
}
#ifndef GLACIERWINDOWMODEL_H
#define GLACIERWINDOWMODEL_H
#include <windowmodel.h>
#include <lipstickcompositorwindow.h>
#include <QDebug>
class LipstickCompositorWindow;
class QWaylandSurfaceItem;
class GlacierWindowModel : public WindowModel
{
public:
explicit GlacierWindowModel();
~GlacierWindowModel();
bool approveWindow(LipstickCompositorWindow *window);
};
#endif // GLACIERWINDOWMODEL_H
......@@ -24,6 +24,9 @@
#include <homeapplication.h>
#include <QFont>
#include <homewindow.h>
#include <QQmlEngine>
#include <QQmlContext>
#include "glacierwindowmodel.h"
int main(int argc, char **argv)
{
......@@ -35,9 +38,9 @@ int main(int argc, char **argv)
setenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1", 1);
app.setCompositorPath("qrc:/qml/compositor.qml");
qmlRegisterType<GlacierWindowModel>("org.nemomobile.glacier", 1, 0 ,"GlacierWindowModel");
app.setQmlPath("qrc:/qml/MainScreen.qml");
app.mainWindowInstance()->showFullScreen();
return app.exec();
}
......@@ -26,6 +26,7 @@ import QtQuick 2.0
import org.nemomobile.lipstick 0.1
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import org.nemomobile.glacier 1.0
// App Switcher page
// The place for browsing already running apps
......@@ -78,7 +79,7 @@ Item {
Repeater {
id: gridRepeater
model: WindowModel {
model: GlacierWindowModel {
id:switcherModel
}
......
......@@ -28,7 +28,7 @@ import org.nemomobile.lipstick 0.1
MouseArea {
id: switcherItemRoot
property bool rotateWindowContent: (screen.frameBufferRotation === 90) ? desktop.isPortrait : !desktop.isPortrait
property bool rotateWindowContent: desktop.isPortrait
WindowPixmapItem {
id: windowPixmap
......
......@@ -224,8 +224,11 @@ Compositor {
var isHomeWindow = window.isInProcess && root.homeWindow == null && window.title == "Home"
var isNotificationWindow = window.category == "notification"
var isOverlayWindow = window.category == "overlay"
var parent = null
if (window.category == "cover") {
window.visible = false
return
}
if (isHomeWindow) {
parent = homeLayer
} else if (isNotificationWindow) {
......@@ -246,6 +249,7 @@ Compositor {
root.homeWindow = w
setCurrentWindow(homeWindow)
} else if (isNotificationWindow || isOverlayWindow) {
} else {
w = mysticWrapper.createObject(parent, {window: window})
window.userData = w
......
......@@ -29,7 +29,6 @@ Item {
width: window.width
height: window.height
NumberAnimation on opacity { id: fadeInAnimation; running: false; from: 0; to: 1 }
function animateIn() { fadeInAnimation.start(); }
Component.onCompleted: window.parent = wrapper
......
......@@ -27,16 +27,9 @@ import org.nemomobile.lipstick 0.1
WindowWrapperBase {
id: wrapper
ShaderEffect {
anchors.fill: parent
z: 2
/*hasCover: coverWindowId.value != undefined ? true : false
WindowProperty {
id: coverWindowId
windowId: window.windowId
property: "SAILFISH_COVER_WINDOW"
}*/
// source Item must be a texture provider
property Item source: wrapper.window
......
......@@ -12,12 +12,14 @@ config.path = /usr/share/lipstick
INSTALLS += config
CONFIG += qt link_pkgconfig
QT += quick
HEADERS +=
QT += quick compositor
DEFINES += QT_COMPOSITOR_QUICK
HEADERS += \
glacierwindowmodel.h
SOURCES += \
main.cpp
main.cpp \
glacierwindowmodel.cpp
RESOURCES += \
resources-qml.qrc
......
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