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

Improved logWindows to include iviIds.

parent c0f96372
No related branches found
No related tags found
1 merge request!48Rework Compositor
...@@ -191,6 +191,8 @@ WaylandCompositor { ...@@ -191,6 +191,8 @@ WaylandCompositor {
// Remove destroyed surface from the suface list // Remove destroyed surface from the suface list
// ============================================= // =============================================
onSurfaceAboutToBeDestroyed: { onSurfaceAboutToBeDestroyed: {
// Removing this seems to have fixed the crashes.
//Also, with the new way to keep the applist clean of undefined objects, it is unnecessary.
/* /*
console.log("Surface will be destroyed", surface); console.log("Surface will be destroyed", surface);
console.log("appList length: ", activeSurfaces.length); console.log("appList length: ", activeSurfaces.length);
...@@ -305,13 +307,20 @@ WaylandCompositor { ...@@ -305,13 +307,20 @@ WaylandCompositor {
windowVisibility(windowid, true) windowVisibility(windowid, true)
} }
function onLogWindows(){ function onLogWindows(){
cleanUpApplist();
console.log("Active surfaces:") console.log("Active surfaces:")
for (var i=0; i < activeSurfaces.length; i++) { for (var i=0; i < activeSurfaces.length; i++) {
var item = activeSurfaces[i]; var item = activeSurfaces[i];
console.log("- Surface", i, ": ", item.surface, "on", item.screen) if (item.surface.surface) {
console.log("- Surface", i, item.surface, "pid", item.surface.surface.client.processId, "on screen", item.screen);
}
else if (item.surface.shellSurface) {
console.log("- Surface", i, "iviId:", item.surface.shellSurface.iviId, item.surface, "on screen", item.screen);
}
} }
} }
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)
var screenId = -1; var screenId = -1;
for (var i=0; i < activeSurfaces.length; i++) { for (var i=0; i < activeSurfaces.length; i++) {
...@@ -322,7 +331,7 @@ WaylandCompositor { ...@@ -322,7 +331,7 @@ WaylandCompositor {
screenId = item.screen; screenId = item.screen;
} }
else if ((item.surface.shellSurface) && ( windowid === item.surface.shellSurface.iviId)) { else if ((item.surface.shellSurface) && ( windowid === item.surface.shellSurface.iviId)) {
console.log("Surface", i, item.surface, "on screen", item.screen) console.log("- Surface", i, "iviId:", item.surface.shellSurface.iviId, item.surface, "on screen", item.screen)
screenId = item.screen; screenId = item.screen;
} }
} }
......
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