summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
8c5d363)
This is work around which control keyboard focus for some
applications on behalf of windowmanager or LayerManagerControl.
Change-Id: I3c26c4c3544b987f48d849b34a4ea10c5a05a63b
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GIO REQUIRED gio-2.0)
pkg_check_modules(ILMCONTROL REQUIRED ilmControl)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GIO REQUIRED gio-2.0)
pkg_check_modules(ILMCONTROL REQUIRED ilmControl)
+pkg_check_modules(ILMINPUT REQUIRED ilmInput)
# No configuration
# configure_file (
# No configuration
# configure_file (
include_directories(
"include"
"${ILMCONTROL_INCLUDE_DIRS}"
include_directories(
"include"
"${ILMCONTROL_INCLUDE_DIRS}"
+ "${ILMINPUT_INCLUDE_DIRS}"
"${GLIB_INCLUDE_DIRS}"
"${GIO_INCLUDE_DIRS}"
)
"${GLIB_INCLUDE_DIRS}"
"${GIO_INCLUDE_DIRS}"
)
windowmanager
homescreen
${ILMCONTROL_LIBRARIES}
windowmanager
homescreen
${ILMCONTROL_LIBRARIES}
m_launcher->register_surfpid(surf_pid);
if (m_launcher->m_rid &&
surf_pid == m_launcher->find_surfpid_by_rid(m_launcher->m_rid)) {
m_launcher->register_surfpid(surf_pid);
if (m_launcher->m_rid &&
surf_pid == m_launcher->find_surfpid_by_rid(m_launcher->m_rid)) {
+ m_ivi_id = id;
+ setup_surface();
}
m_surfaces[surf_pid] = id;
} else if (object == ILM_LAYER) {
}
m_surfaces[surf_pid] = id;
} else if (object == ILM_LAYER) {
- std::function< void(json_object*) > h_active = [](json_object* object) {
+ std::function< void(json_object*) > h_active = [this](json_object* object) {
AGL_DEBUG("Got Event_Active");
AGL_DEBUG("Got Event_Active");
+ t_ilm_surface s_ids[1] = { this->m_ivi_id };
+ ilm_setInputFocus(s_ids, 1, ILM_INPUT_DEVICE_KEYBOARD, ILM_TRUE);
- std::function< void(json_object*) > h_inactive = [](json_object* object) {
+ std::function< void(json_object*) > h_inactive = [this](json_object* object) {
AGL_DEBUG("Got Event_Inactive");
AGL_DEBUG("Got Event_Inactive");
+ t_ilm_surface s_ids[1] = { this->m_ivi_id };
+ ilm_setInputFocus(s_ids, 1, ILM_INPUT_DEVICE_KEYBOARD, ILM_FALSE);
};
std::function< void(json_object*) > h_visible = [](json_object* object) {
};
std::function< void(json_object*) > h_visible = [](json_object* object) {
AGL_DEBUG("RunXDG created.");
}
AGL_DEBUG("RunXDG created.");
}
-void RunXDG::setup_surface (int id)
+void RunXDG::setup_surface (void)
- std::string sid = std::to_string(id);
+ std::string sid = std::to_string(m_ivi_id);
// This surface is mine, register pair app_name and ivi id.
// This surface is mine, register pair app_name and ivi id.
- AGL_DEBUG("requestSurfaceXDG(%s,%d)", m_role.c_str(), id);
- m_wm->requestSurfaceXDG(this->m_role.c_str(), id);
+ AGL_DEBUG("requestSurfaceXDG(%s,%d)", m_role.c_str(), m_ivi_id);
+ m_wm->requestSurfaceXDG(this->m_role.c_str(), (unsigned int)m_ivi_id);
if (m_pending_create) {
// Recovering 1st time tap_shortcut is dropped because
if (m_pending_create) {
// Recovering 1st time tap_shortcut is dropped because
AGL_DEBUG("waiting for notification: surafce created");
m_pending_create = true;
AGL_DEBUG("waiting for notification: surafce created");
m_pending_create = true;
// in case, target app has already run
if (m_launcher->m_rid) {
pid_t surf_pid = m_launcher->find_surfpid_by_rid(m_launcher->m_rid);
// in case, target app has already run
if (m_launcher->m_rid) {
pid_t surf_pid = m_launcher->find_surfpid_by_rid(m_launcher->m_rid);
int id = itr->second;
AGL_DEBUG("surface %d for <%s> already exists", id,
m_role.c_str());
int id = itr->second;
AGL_DEBUG("surface %d for <%s> already exists", id,
m_role.c_str());
+ m_ivi_id = id;
+ setup_surface();
m_launcher->loop(e_flag);
}
m_launcher->loop(e_flag);
}
#include <gio/gio.h>
#include <ilm/ilm_control.h>
#include <gio/gio.h>
#include <ilm/ilm_control.h>
+#include <ilm/ilm_input.h>
#include <libwindowmanager.h>
#include <libhomescreen.hpp>
#include <libwindowmanager.h>
#include <libhomescreen.hpp>
LibHomeScreen *m_hs;
ILMControl *m_ic;
LibHomeScreen *m_hs;
ILMControl *m_ic;
+ t_ilm_surface m_ivi_id;
+
std::map<int, int> m_surfaces; // pair of <afm:rid, ivi:id>
bool m_pending_create = false;
std::map<int, int> m_surfaces; // pair of <afm:rid, ivi:id>
bool m_pending_create = false;
int parse_config(const char *file);
int parse_config(const char *file);
- void setup_surface(int id);
+ void setup_surface(void);