diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2017-09-29 13:32:06 +0200 |
---|---|---|
committer | Holger Freyther <holger+qt@freyther.de> | 2017-11-09 13:04:04 +0000 |
commit | c22860511e43ac88a2bad398a0dfcea537501e16 (patch) | |
tree | 2ec221b353f24263de6583b6e3d141e3e334c396 /wayland/democompositor/qml/main.qml | |
parent | e5047dc19d84dc45eef92c2c59bab52637f092d6 (diff) |
democompositor: Store the AppEntry in the Chrome
Keep the AppEntry in the Chrome and set it when a new surface is
created. Handle the situation when an external application is launched
and check for null.
Change-Id: Ib327ec266587bba9a2c48eacbcb79c508b2066d0
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'wayland/democompositor/qml/main.qml')
-rw-r--r-- | wayland/democompositor/qml/main.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wayland/democompositor/qml/main.qml b/wayland/democompositor/qml/main.qml index 75d1adc..3947b52 100644 --- a/wayland/democompositor/qml/main.qml +++ b/wayland/democompositor/qml/main.qml @@ -72,12 +72,16 @@ WaylandCompositor { onWlShellSurfaceCreated: { 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 } ); + chromeComponent.createObject(defaultOutput.surfaceArea, { + "shellSurface": shellSurface, + "appEntry": appEntry } ); defaultOutput.relayout(); } } |