Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Applicationwindow as parent
  • Loading branch information
locusf committed Apr 30, 2014
1 parent ee219fd commit fb18122
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
8 changes: 7 additions & 1 deletion src/qml/MainScreen.qml
Expand Up @@ -39,7 +39,12 @@ import org.nemomobile.configuration 1.0
import org.freedesktop.contextkit 1.0
import "scripts/desktop.js" as Desktop

Page {
ApplicationWindow {
id: appWindow

contentOrientation: Screen.orientation

initialPage: Page {

// This is used in the favorites page and in the lock screen
WallClock {
Expand Down Expand Up @@ -161,4 +166,5 @@ Page {
height: parent.height
z: 200
}
}
}
21 changes: 14 additions & 7 deletions src/qml/compositor.qml
Expand Up @@ -301,9 +301,9 @@ Compositor {
}

onWindowAdded: {
if (debug) console.log("Compositor: Window added \"" + window.title + "\"")
console.log("Compositor: Window added \"" + window.title + "\"")

var isHomeWindow = window.isInProcess && root.homeWindow == null && window.title == "Home"
var isHomeWindow = window.isInProcess && homeWindow == null && window.title == "Home"
var isNotificationWindow = window.category == "notification"
var isOverlayWindow = window.category == "overlay"
var parent = null
Expand All @@ -322,14 +322,21 @@ Compositor {
}

var w;
if (isOverlayWindow) w = alphaWrapper.createObject(parent, { window: window })
if (window.isInProcess) {
console.debug("InPROC")
w = window
}
else if (isOverlayWindow) w = alphaWrapper.createObject(parent, { window: window })
else w = windowWrapper.createObject(parent, { window: window })


window.userData = w

if (isHomeWindow) {
root.homeWindow = w
setCurrentWindow(homeWindow)
console.debug("What is w?: " + w)
console.debug("What is Window?: "+ window)
homeWindow = w
setCurrentWindow(homeWindow, true)
} else if (isNotificationWindow || isOverlayWindow) {

} else {
Expand All @@ -344,8 +351,8 @@ Compositor {

var w = window.userData;

if (root.topmostWindow == w)
setCurrentWindow(root.homeWindow);
if (topmostWindow == w)
setCurrentWindow(homeWindow);

if (window.userData)
window.userData.destroy()
Expand Down

0 comments on commit fb18122

Please sign in to comment.