Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-712

windowmanager dbus signal issue in Dab 4.0 RC1[m3ulcb]

XMLWordPrintable

      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!

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ToshikazuOhiwa toshikazu oiwa
            wangzhiqiang zhiqiang wang
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: