Skip to content
Snippets Groups Projects
Commit 7011c025 authored by Alexander Tuxen's avatar Alexander Tuxen Committed by Felix Gerking
Browse files

Cleanups and fix Applist handling

parent 64d9de75
No related branches found
No related tags found
1 merge request!48Rework Compositor
...@@ -369,6 +369,9 @@ WaylandCompositor { ...@@ -369,6 +369,9 @@ WaylandCompositor {
} }
} }
// ========================================================
// Returns the Screen that is associated with a given IviId
// ========================================================
function getScreenFromIviId(windowid) function getScreenFromIviId(windowid)
{ {
var item = {}; var item = {};
...@@ -404,6 +407,7 @@ WaylandCompositor { ...@@ -404,6 +407,7 @@ WaylandCompositor {
Connections { Connections {
target: commands target: commands
function onMoveWindowToScreen(windowid, screenid) { function onMoveWindowToScreen(windowid, screenid) {
cleanUpApplist();
console.log("Received a moveWindowToOutput Signal", windowid, screenid) console.log("Received a moveWindowToOutput Signal", windowid, screenid)
if( screenid >= screens.count || screenid < 0){ if( screenid >= screens.count || screenid < 0){
...@@ -436,32 +440,18 @@ WaylandCompositor { ...@@ -436,32 +440,18 @@ WaylandCompositor {
server.sendMessage("Move", windowid, screenid); server.sendMessage("Move", windowid, screenid);
} }
function windowVisibility(windowid, show) function windowVisibility(windowid, show){
// window visibility is now handled by the app via QWidget's hide() and show() methods. // window visibility is now handled by the app via QWidget's hide() and show() methods.
/* // We only send a broadcast message, so the app can do its thing.
var ret = 0; cleanUpApplist();
var affectedSurfaces = getActiveSurfaces(getPidFromIviId(windowid)); if (getScreenFromIviId(windowid) < 0)
if (affectedSurfaces.length === 0)
{ {
console.log("no screens found for IVI ID", windowid);
server.returnStatus(-1); server.returnStatus(-1);
return; return;
} }
for (var i=0; i < affectedSurfaces.length; i++)
{
var surface = affectedSurfaces[i];
if( surface )
{
console.log("Set visible to", show,"for", surface)
surface.visible = show
ret++;
}
}
*/
server.returnStatus(0); server.returnStatus(0);
server.sendMessage(show ? "Show" : "Hide", windowid, getScreenFromIviId(windowid)); server.sendMessage(show ? "Show" : "Hide", windowid, getScreenFromIviId(windowid));
//server.sendMessage(show ? "Show" : "Hide", windowid, 0);
} }
function onHideWindow(windowid){ function onHideWindow(windowid){
...@@ -475,6 +465,7 @@ WaylandCompositor { ...@@ -475,6 +465,7 @@ WaylandCompositor {
} }
function onLogWindows(){ function onLogWindows(){
cleanUpApplist();
var item = {}; var item = {};
var i = 0; var i = 0;
console.log("Active surfaces:") console.log("Active surfaces:")
...@@ -495,12 +486,15 @@ WaylandCompositor { ...@@ -495,12 +486,15 @@ WaylandCompositor {
} }
function onGetScreen(windowid){ function onGetScreen(windowid){
cleanUpApplist();
console.log("Received a getScreen Signal for window ID: ", windowid) console.log("Received a getScreen Signal for window ID: ", windowid)
server.returnStatus(getScreenFromIviId(windowid)) server.returnStatus(getScreenFromIviId(windowid))
} }
// This seems to be unused.
function onSetActiveScreen(screenId) function onSetActiveScreen(screenId)
{ {
cleanUpApplist();
if (screenId <= screens.count) if (screenId <= screens.count)
{ {
console.log("setting active screen", screenId); console.log("setting active screen", screenId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment