diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2020-06-20 23:16:15 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2020-07-10 00:35:28 +0300 |
commit | 3ac1a25bcfa27594ffd44f5255017322d517cb40 (patch) | |
tree | 030c89af09347bf65cef230fb54318771b201f33 /app/surface.hpp | |
parent | 6f05f0d2fb3619e85bee71a18c353908edf8bfe3 (diff) |
Conversion to using agl-compositor
- Use Qt/QtWayland to set-up an app_id for the main surface. We use that
surface and pass it to waylandsink. Waylandsink create a sub-surface
with the parent the Qt/QtWayland one.
- Install a handler for handling bus messages With it, it allows to pass
the wl_display with the help of a context and the surface backing up
the Widget.
- Installs a timer to wait for Qt to create/get the xdg_surface and
attach a buffer to it. Without we won't be able receive the commit
for the parent event in order to handle it.
Bug-AGL: SPEC-3382
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4237b7dad110ce36e3a01226e67cb508b6d9a6d9
Diffstat (limited to 'app/surface.hpp')
-rw-r--r-- | app/surface.hpp | 50 |
1 files changed, 5 insertions, 45 deletions
diff --git a/app/surface.hpp b/app/surface.hpp index 88be3bb..82b5c86 100644 --- a/app/surface.hpp +++ b/app/surface.hpp @@ -32,63 +32,23 @@ #include <map> #include <algorithm> -#include <ilm/ilm_control.h> -#include <libwindowmanager.h> - -class ILMControl -{ -public: - ILMControl(notificationFunc callback, void *user_data) { - ilm_init(); - ilm_registerNotification(callback, user_data); - } - - ~ILMControl(void) { - ilm_unregisterNotification(); - ilm_destroy(); - } -}; +#include "shell-desktop.h" class SurfaceHandler { public: SurfaceHandler(const int port, const std::string &token, const std::string &role); - - void notify_ivi_control_cb(ilmObjectType object, - t_ilm_uint id, - t_ilm_bool created); - - static void notify_ivi_control_cb_static (ilmObjectType object, - t_ilm_uint id, - t_ilm_bool created, - void *user_data); + void set_bounding_box(int x, int y, int bx, int by, int width, int height); private: int m_port; std::string m_token; - std::string m_role; - int m_rid = 0; - - LibWindowmanager *m_wm; - ILMControl *m_ic; - - std::vector<pid_t> m_pid_v; - - std::map<int, int> m_surfaces; // pair of <afm:rid, ivi:id> - - //bool m_pending_create = false; - bool m_pending_create = true; - - // Private functions - - int init_wm(void); + int init_agl_shell(void); - void register_surfpid(pid_t surf_pid); - void unregister_surfpid(pid_t surf_pid); - pid_t find_surfpid_by_rid(pid_t rid); - void setup_surface(int id); + struct agl_shell_desktop *shell; + Shell *aglShell; }; #endif // SURFACE_HPP |