windowmanager dbus signal issue in Dab 4.0 RC1[m3ulcb]

Description

We tried to add something in application dashboard at  “Dab 4.0 RC1” on m3ulcb, needs know if dashboard sceen is ontop or not. For example, change from dashboard to HomeScreen/Navigation.

First tried to find a method or siganal in windowmanager source, but got nothing.
And found something in 4.3.5 of this pdf, but don't know how to use it.

https://wiki.automotivelinux.org/_media/eg-ui-graphics/170606_agl_hmi-fw_arch_0_2_3.pdf

So we created by ourself like these. 

1) add a dbus signal in windowmanager named “appLayerVisibleChanged”, modified windowmanager.xml like this,

        <!--
        appLayerVisibleChanged:
        @pid: The pid of the app that changed.
        @visible: True, if the app layer is visible.
        This is emitted when the visible property of the app layer changes.
        -->
        <signal name="appLayerVisibleChanged">
        <arg name="pid" type="i"/>
        <arg name="visible" type="b"/>
        </signal>

2) changed windowmanager.hpp and windowmanager.cpp to send “appLayerVisibleChanged” signal

3) add receive signal code in dashboard like this,

        QDBusConnection::sessionBus().connect("org.agl.windowmanager",
        "/windowmanager",
        "org.agl.windowmanager",
        "appLayerVisibleChanged",
        this,
        SLOT(appLayerVisibleChangedSlot(int,bool)));

4) I test these on m3ulcb board,but dashboard application can not receive dbus signal.  Then I use dbus-monitor tool to track this signal , result like this,

        signal sender=:1.6 -> dest=(null destination) serial=7 path=/windowmanager; interface=org.agl.windowmanager; member=appLayerVisibleChanged
        int32 5271
        boolean true
        signal sender=:1.6 -> dest=(null destination) serial=8 path=/windowmanager; interface=org.agl.windowmanager; member=appLayerVisibleChanged
        int32 -1
        boolean false

   Windowmanager already sended “appLayerVisibleChanged” signal.   I thought may be dashboard application don’t have permission to receive this signal.   so I added a file named “windowmanager.conf” in /etc/dbus-1/session.d/ ,

        <?xml version="1.0"?> <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"<http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd>>
        <busconfig>
        <policy context="default">
                <allow receive_type="signal" receive_sender="org.agl.windowmanager" receive_interface="org.agl.windowmanager"/>
        </policy>
        </busconfig>

then reboot m3ulcb, swith to dashboard, dashboard application can receive this signal.

My question:

Q1: Does windowmanager had something can provide the application status?
       If not, may be windowmanager should provide IMO.

Q2: If Q1 is false. Does it correct that we add code like these.

Best Regards!

Environment

[{color:#0066cc}Dab{color}{color:#0066cc} 4.0 RC1,{color}|https://wiki.automotivelinux.org/agl-distro/release-notes?s[]=daring&s[]=dab#dab_40_rc1] m3ulcb board

Activity

Show:

toshikazu_ohiwa 
March 1, 2018 at 8:20 AM
(edited)

>Q1: Does windowmanager had something can provide the application status?

Yes.
Window Manager has the funciton to notify the screen display state (such as visible or invisible) to the currently displayed application.

Please refer to the following URL.

http://docs.automotivelinux.org/docs/apis_services/en/dev/reference/hmi-framework/3_2-WindowManager-Guide.html

 

Nobuhiko Tanibata 
March 1, 2018 at 4:15 AM
(edited)

window manager is leaded by Oiwa-san. Please answer this clarification.

zhiqiang wang 
August 29, 2017 at 1:51 AM

Because of windowmanager's surface callback function has this function,I'll give up this change in below page.
https://gerrit.automotivelinux.org/gerrit/#/c/10639/
When HomeScreen API migrating to AGL appfw and ivi-shell integration,I'll add unsubsribe function to my app when app is in background and doesn't need data.

Stephane Desneux 
June 29, 2017 at 8:03 AM

This issue is not related to appfw directly so I reassign to UI & Gfx EG leader to find a way to help.

BTW, the current homescreen implementation is going to change so don't put too much efforts on it.

Best regards,

Fixed

Details

Assignee

Reporter

Labels

Components

Priority

Created June 28, 2017 at 9:30 AM
Updated March 7, 2018 at 9:14 PM
Resolved March 1, 2018 at 8:20 AM

Flag notifications