diff options
Diffstat (limited to 'wayland/democompositor/qml/main.qml')
-rw-r--r-- | wayland/democompositor/qml/main.qml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/wayland/democompositor/qml/main.qml b/wayland/democompositor/qml/main.qml index 8c0c621..3947b52 100644 --- a/wayland/democompositor/qml/main.qml +++ b/wayland/democompositor/qml/main.qml @@ -57,6 +57,7 @@ WaylandCompositor { property var primarySurfacesArea: null Screen { + id: mainScreen compositor: comp } @@ -69,7 +70,18 @@ WaylandCompositor { WlShell { id: defaultShell onWlShellSurfaceCreated: { - chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); + const pid = shellSurface.surface.client.processId; + const appState = mainScreen.appLauncher.appStateForPid(pid); + var appEntry; + if (!appState) { + console.log("shellSurface of unknown application. Continuing. PID=" + pid); + } else { + console.log("shellSurface belonging to " + appState.appEntry.executableName); + appEntry = appState.appEntry; + } + chromeComponent.createObject(defaultOutput.surfaceArea, { + "shellSurface": shellSurface, + "appEntry": appEntry } ); defaultOutput.relayout(); } } |