Skip to content

Commit

Permalink
Removed popup wayland surface
Browse files Browse the repository at this point in the history
There was a popup support which was creating a new wayland
surface for each app. With this commit this approach was
removed since we would like to use org.freedesktop.Notification
both for notifications and popups. In that way we would
render popup just on one place and the system ui would
have the ownership.

Change-Id: I4f8eb5faccc4de4eb3b574ea1d6f5ab27cae4dc7
Reviewed-by: Dominik Holland <[email protected]>
  • Loading branch information
Nedim Hadzic committed Jul 22, 2016
1 parent 9b58bf3 commit 4b264d2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 deletions.
2 changes: 0 additions & 2 deletions modules/service/apps/AppsService.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ import QtQuick 2.1
QtObject {
id: root

property bool popupVisible: false
signal clusterWidgetReady(string category, Item item)
signal sendNavigationPopup(Item item)
}
29 changes: 0 additions & 29 deletions modules/utils/AppUIScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ ApplicationManagerWindow {

default property alias content: content.children
property alias cluster: clusterContainer.children
property alias popup: popupContainer.children

property bool _clusterSet: false
property bool _popupSet: false

onClusterChanged: _clusterSet = true
onPopupChanged: _popupSet = true

signal clusterKeyPressed(int key)
signal raiseApp()
Expand Down Expand Up @@ -93,32 +90,6 @@ ApplicationManagerWindow {
}
}

ApplicationManagerWindow {
id: popup
width: 285
height: typeof parent !== 'undefined' ? parent.height : 0
visible: false
Item {
id: popupContainer
anchors.fill: parent
}

Component.onCompleted: {
if (pelagicoreWindow._popupSet) {
pelagicoreWindow.sendPopupWidget()
}
else {
popup.setWindowProperty("windowType", "popup")
}

}

onWindowPropertyChanged: {
//print(":::AppUIScreen::: window property changed", name, value, Qt.Key_Up)
pelagicoreWindow.clusterKeyPressed(value)
}
}

Item {
id: content
anchors.fill: parent
Expand Down
25 changes: 2 additions & 23 deletions sysui/LaunchController.qml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ StackView {
print(":::LaunchController:::isWidget", isInWidgetState)
var isClusterWidget = (WindowManager.windowProperty(item, "windowType") === "clusterWidget")
print(":::LaunchController:::isClusterWidget", isClusterWidget)
var isPopup = (WindowManager.windowProperty(item, "windowType") === "popup")
print(":::LaunchController:::isPopup", isPopup)

var acceptWindow = true;
var appID = WindowManager.get(index).applicationId;
Expand All @@ -157,13 +155,7 @@ StackView {
}
acceptWindow = false
}
}
else if (isPopup) {
if (ApplicationManager.get(appID).categories[0] === "navigation")
AppsService.sendNavigationPopup(item)
acceptWindow = false
}
else {
} else {

for (var i = 0; i < root.blackListItems.length; ++i) {
if (appID === root.blackListItems[i])
Expand Down Expand Up @@ -231,24 +223,12 @@ StackView {

}
}
else if (name === "windowType" && value === "popup") {
// Workaround for qmlscene
if (ApplicationManager.dummy) {
AppsService.sendNavigationPopup(window)
}
}
else if (name === "goTo" && value === "fullScreen") {
index = WindowManager.indexOfWindow(window)
//print(":::LaunchController::: App found. Going to full screen the app ", index, WindowManager.get(index).applicationId)
ApplicationManager.startApplication(WindowManager.get(index).applicationId)
WindowManager.setWindowProperty(window, "goTo", "")
}
else if (name === "liveDriveEvent") {
NavigationService.liveDriveEvent = value
}
else if (name === "routeUpdate") {
NavigationService.routeUpdate = value
}
}

onRaiseApplicationWindow: {
Expand All @@ -260,11 +240,10 @@ StackView {
var isWidget = (WindowManager.windowProperty(item, "windowType") === "widget")
var isMapWidget = (WindowManager.windowProperty(item, "windowType") === "widgetMap")
var isClusterWidget = (WindowManager.windowProperty(item, "windowType") === "clusterWidget")
var isPopup = (WindowManager.windowProperty(item, "windowType") === "popup")
print(":::LaunchController:::isClusterWidget", isClusterWidget)
print(":::LaunchController:::isWidget", isWidget, isMapWidget)

if (!isMapWidget && !isClusterWidget && !isPopup) {
if (!isMapWidget && !isClusterWidget) {
WindowManager.setWindowProperty(item, "visibility", true)
WindowManager.setWindowProperty(item, "windowType", "fullScreen")
root.windowItem = item
Expand Down

0 comments on commit 4b264d2

Please sign in to comment.