aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/homescreenhandler.cpp
AgeCommit message (Collapse)AuthorFilesLines
2023-04-14homescreenhandler: Avoid using a stale wl_outputsandbox/mvlad/update-homescreenoctopusMarius Vlad1-2/+4
Rather than storing wl_output when creating a HomeScreenHandler object, retrieve the output at activation. Presumably, we could use Screen and from there get it but seems to be easier this way. Re-plugging the connector back and forth would result in a stale wl_output, so this would retrieve it always as the currently enabled/active one. Bug-AGL: SPEC-4705 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id54c1f253b094e196c6bd367c7419c0ec5860d5f (cherry picked from commit 4c7852e6ff7fde510f4f11c21bec817583397951)
2023-01-20homescreen: Add support for defining an activation areaMarius Vlad1-3/+6
This is an example on how to use it, and it enables a new variable HOMESCREEN_EMBEDDED_PANELS to test it out. It gives out the same rectangle are we have in the homescreen demo, but the panels are this time embedded into the background surface, rather than being a separate surface. This introduces a new Qml file, background_with_panels which integrates both the top and the bottom panel into a single qml, which main.cpp loads. While at it, this corrects up the indentation we have in shell.cpp file and sets up the default output in homeScreenHandler constructor. Due to this way integrates and works, it should *not* be visual change between the two (the normal, two panel surfaces) and this version. It can used as a example how to integrate this better, when managing multiple surfaces is not easy to be done by the toolkit or runtime. Bug-AGL: SPEC-4594 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ibe274b336b15e9713d0cdded5424cc8e92257d7f
2022-10-07homescreen: Change from qmake to mesonMarius Vlad1-1/+2
This change will basically make way for adding grpc/protobuf support into homescreen, which turns out it's a pain to do with either qmake or cmake. Eventually, we'll move all our demos to using meson, which have gained a lot of support for building and support different technologies to allow far more saner configurations to take place. Based heavily on the work done by Scott Murray in libqtappfw, in the applauncher module. Bug-AGL: SPEC-4584 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Suggested-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Id64bf3d5b41912d32df7f78e94ab04d231bb0c83
2022-09-22homescreen: Add support for v3 of agl-shell protocolMarius Vlad1-14/+16
This protocol update adds support for started/terminated/activate/deactive events sent by the compositor. With this change we remove support for agl-shell-desktop protocol and instead rely on this new protocol update. Bug-AGL: SPEC-4528 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I9eb2135c5331eea82635583e8ca7cdf4e41a3d5e
2022-09-16Rework to use launcher wrapper from libqtappfwScott Murray1-80/+67
Changes: - Switch to using the new app launcher API wrapper from libqtappfw in order to migrate to the new gRPC based API implementation. - The appStarted and appTerminated methods in HomescreenHandler have been renamed to activateApp and deactivateApp, respectively, to better reflect what they do. A new processAppStatusEvent method had been added that calls them as appropriate based on the event from the AppLauncherClient status update signal. - The copyright headers in the source files have been tweaked to remove the Apache license boilerplate in favour of a SPDX license tag. - The code in main.cpp that was not formatted with Linux-style has been reformatted to match the rest of the file. Bug-AGL: SPEC-4559 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I236cb6a412945a6df7d35652c55f664264964f9c
2022-02-22homescreenhandler: Avoid passing an invalid appidmarlin_12.93.0marlin/12.93.012.93.0Marius Vlad1-1/+2
If there's no item added in the QList we'll return an invalid value pointing to some invalid memory, which we can not determine if its empty string or not, so this makes sure we check the list itself. Found when looking at removal/activation of surfaces while re-doing some parts in the compositor. Bug-AGL: SPEC-4263 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I912aa5a42a7d21374a389a7f193979f30504a83b
2022-01-20homescreenhandler: keep track of active appsArnaud Ferraris1-2/+27
When the current app window is closed, the current behavior depends on whether this action terminates the app: - if the app is terminated, then we switch back to the launcher - in the other case, we display the background, even if other apps are running In order to implement a better behavior, we should keep track of active apps and switch back to the previously active one when the current app window is closed. Bug-AGL: SPEC-4222 Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> Change-Id: Idf1fe42886e95e2b37349b066204fde002d7c3b5
2022-01-18homescreenhandler: Do not attempt to start launcherMarius Vlad1-6/+16
Our launcher application is started by systemd as a user session, and attempting to start it again would result into being started once more, but this by applaunchd. Until we merge homescreen and launcher together avoid starting it and just activate it whenever necessary. Bug-AGL: SPEC-4215 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I90806457b74a2439cb8bdc88068954eb7ef1d532
2022-01-10homescreenhandler: Remove old artifactsMarius Vlad1-101/+1
We're no longer using anything from the older appfw so remove dead code. Bug-AGL: SPEC-4204 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I8a9714701a9bbb0da6768cd4bcbca52cb23464cd
2022-01-10homescreenhandler: Start applications from homescreen panelMarius Vlad1-3/+11
We're missing application start-up from within homescreen. The top panel surface contains a list of applications which can be started directly (without the launcher). Bug-AGL: SPEC-4203 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Icd008c8bdbf3f107972b5b279f1439cab5aaebee
2021-12-29homescreenhandler: Set the application currently app runningMarius Vlad1-3/+3
Bug-AGL: SPEC-4202 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ifba64095536cee149ed80d94a42abeefdcdd16f4
2021-12-20homescreenhandler: use applaunchd for app activationmarlin_12.91.0marlin/12.91.012.91.0Arnaud Ferraris1-0/+31
As part of the App FW rework, we introduced a new app launcher service, accessible through D-Bus. This service accepts requests to activate applications, and notifies when a application successfully activated or terminated. Requests for activation are handled by a separate `launcher` application for now, so we only need to listen on incoming signals in order to react to those: - when an application successfully started or is switched to, ask the compositor to activate it - when an application terminates, activate the launcher so the user isn't facing a "blank" display Bug-AGL: SPEC-4160 Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> Change-Id: I7369944570651b45ec9dcca9ccde3dfd75719c3b
2021-11-04Initial rework to run without the app frameworkScott Murray1-4/+11
Changes: - Remove application framework build scripts, and update the application qmake file to just build a "homescreen" binary and support installing it to /usr/bin. - Remove voice API related code. Some of the associated QML and images for the UI have been retained in case equivalent functionality is re-added in the future. - Remove or stub out various app framework API access for the homescreen and launcher bindings, and comment out usage of the Qt wrappers from libqtappfw (e.g. Bluetooth). The aim is to provide a replacement library or libraries for the latter that provide the same functionality. - Remove the old homescreen API documentation and do an initial update of the build instructions in README.md. Bug-AGL: SPEC-4121 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Iab979c8e1341f2da0384f88f163a977b03664600
2020-07-22Add workaround for top panel button highlightingkoi_10.91.0koi/10.91.0jellyfish_9.99.4jellyfish_9.99.3jellyfish_9.99.2jellyfish/9.99.4jellyfish/9.99.3jellyfish/9.99.29.99.49.99.39.99.210.91.0Scott Murray1-2/+6
The switch to the new compositor removed the callback to update the top panel button highlight since it was being driven by the Event_ScreenUpdated event from the old windowmanager. For now, work around this by driving the ApplicationLauncher's setCurrent method from the appropriate place in the HomescreenHandler object's tapShortcut method. If a generic mechanism for notifications on application expose becomes available via agl-shell-desktop, that should be used instead. Additionally, add an explicit call to setCurrent on initialization to highlight the top panel Launcher button, matching the actual initial UI state. Bug-AGL: SPEC-3510 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ied5dd8e78195d061585510e60a758559ca4f69b3
2020-06-24agl-compositor: Conversion to agl-compositorMarius Vlad1-8/+33
Bug-AGL: SPEC-3447 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7da44ec333217d355ba643d2d21bea7d8940ad2b
2019-03-15Start app and get runnables list by homescreenwang_zhiqiang1-2/+2
1.only call showWindow when start application. 2.change area from "normal" to "normal.full". Bug-AGL: SPEC-2188 Change-Id: I0f3a72d996e73e3ef85eb19fdf130f46757683d6 Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
2019-01-16Modify notification event callback functionwang_zhiqiang1-4/+4
HomeScreen-Service unified event pattern,so in homescreen got caller application id in "parameter". BUG-AGL: SPEC-2120 Change-Id: I3a491cbc3b1ccf109409ed9b065111706fe6be5e Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
2018-11-27add new features in homescreen-service and homescreenwang_zhiqiang1-1/+34
homescreen-service: add five verbs. 1.showWindow: instead of tap_shortcut and show onscreen. 2.hideWindow: used when want to hide onscreen. 3.replyShowWindow: used when post onscreen reply information to application. 4.showNotification: used by application who want to display notification on homescreen top area. 5.showInformation: used by application who want to display information on homescreen botton area. homescreen: display notification and information. Bug-AGL: SPEC-1931 Change-Id: Ia17a9793c5d284458009ea71eb9594a40286fa8c Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
2018-11-06use appid instead of appname in "tap_shortcut"wang_zhiqiang1-3/+3
Now In homescreen-service used application_id to identify different application, so use appid instead of appname in "tap_shortcut" parameter. Bug-AGL: SPEC-1764 Change-Id: I2fdda76167c7af9af65b1135b838da1742515b8b Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
2018-08-24Revert "Use appid between homescreen-service and apps"guppy_6.90.0guppy/6.90.0flounder_5.99.6flounder_5.99.5flounder_5.99.4flounder/5.99.6flounder/5.99.5flounder/5.99.46.90.05.99.65.99.55.99.4Tadao Tanikawa1-3/+3
This reverts commit 389a02a99961f1bcc6d317ffc9223ea7f2d05023. Bug-AGL: SPEC-1685 Change-Id: I2f659dbb53b0b781ed588d19c2f3228e3abcbb4a Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
2018-08-08Use appid between homescreen-service and appsflounder_5.99.3flounder/5.99.35.99.3zheng_wenlong1-3/+3
Use appid between hss and apps, and check event destination in libhomescreen. So these is no need compare code when recived Event_TapShortcut Event. BUG-AGL: SPEC-1645 Change-Id: Idd052d3f76f83e1f5bfe46627d7698655ffad85d Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
2018-07-10Copy source code from homescreen-2017flounder_5.99.2flounder/5.99.25.99.2zheng_wenlong1-0/+88
We decide to use homescreen instead of homescreen-2017. Copy the source code from homescreen-2017 and delete word "-2017". Revision: b4db06287bc997ded71deab50ff0ff5889b09e1f Bug-AGL: SPEC-1549 Change-Id: Id77226b7ce35bbc29c868281c37b76ea3f930ad5 Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>