Commit baaedcc8 authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

Merge pull request #5 from locusf/app_covers

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