summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/ico-uxf-weston-plugin.changes14
-rw-r--r--packaging/ico-uxf-weston-plugin.spec2
-rw-r--r--protocol/ico_input_mgr.xml3
-rw-r--r--protocol/ico_window_mgr.xml2
-rwxr-xr-x[-rw-r--r--]settings/weston.ini0
-rw-r--r--src/ico_input_mgr.c57
-rw-r--r--src/ico_ivi_shell.c87
-rw-r--r--src/ico_ivi_shell.h12
-rw-r--r--src/ico_window_animation.c17
-rw-r--r--src/ico_window_mgr.c217
-rw-r--r--src/ico_window_mgr.h7
-rw-r--r--tests/test-homescreen.c2
-rw-r--r--tests/testdata/hs_mapsurf.dat1
-rw-r--r--tests/testdata/hs_sendinput.dat19
-rw-r--r--tests/weston.ini30
15 files changed, 344 insertions, 126 deletions
diff --git a/packaging/ico-uxf-weston-plugin.changes b/packaging/ico-uxf-weston-plugin.changes
index f768f00..2f530c9 100644
--- a/packaging/ico-uxf-weston-plugin.changes
+++ b/packaging/ico-uxf-weston-plugin.changes
@@ -1,14 +1,24 @@
+* Thu Sep 26 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/20130919.204240@80cee2e
+- 0.9.05 release
+-- fix for - surface of the fullscreen is not displayed.
+-- fix for - sometimes a cursor layer is not made rendering.
+-- fix for - switch input event from GtForce is abandoned in EFL(ecore) application.
+-- change /etc/xdg/weston/weston.ini for weekeyboard and HDMI3.
+-- change of the interface of the multi-input-manager plugin.
+-- Fix for - TIVI-1834 Homescreen resizes windows too small
+-- When configure came from application, ico-window-mgr does not handle indication ratio recomputation
+-- fix for - weston crashed when System Controller exit
+-- fix for - The position of the slide(to left) animation is wrong
+
* Thu Sep 19 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> submit/tizen/20130919.011341@e71fb82
- 0.9.04 release.
-- fix for - Weston sometimes crashes at the time of surface creation.
-- Weston crashes when an event comes from DRM just after shell surface creation, because shader is
-- unestablished, it is necessary to set default shader at the time of shell surface creation.
--- fix for - Remove /etc/profile.d/ico_weston.sh
-- The change of the interface of the input region for haptic device.
-- internal bug fix.
-- Deletion of an unnecessary files.
-
* Thu Sep 19 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/20130911.005338@d5948b7
- 0.9.03-2.1 release
-- Remove the installation to /etc/profile.d/* .
diff --git a/packaging/ico-uxf-weston-plugin.spec b/packaging/ico-uxf-weston-plugin.spec
index 9523c62..04b15e5 100644
--- a/packaging/ico-uxf-weston-plugin.spec
+++ b/packaging/ico-uxf-weston-plugin.spec
@@ -1,6 +1,6 @@
Name: ico-uxf-weston-plugin
Summary: Weston Plugins for IVI
-Version: 0.9.04
+Version: 0.9.05
Release: 1.1
Group: Graphics & UI Framework/Automotive UI
License: MIT
diff --git a/protocol/ico_input_mgr.xml b/protocol/ico_input_mgr.xml
index e2e9e6f..6e4c993 100644
--- a/protocol/ico_input_mgr.xml
+++ b/protocol/ico_input_mgr.xml
@@ -30,10 +30,11 @@
<description summary="send input event to application">
Mouse, Touch or Keyboard event sent to application.
</description>
- <arg name="appid" type="string" summary="application Id for input switch"/>
+ <arg name="target" type="string" summary="target surface@application for input switch"/>
<arg name="surfaceid" type="uint" summary="event surface Id"/>
<arg name="type" type="int" summary="event device type"/>
<arg name="deviceno" type="int" summary="device number"/>
+ <arg name="time" type="uint" summary="event time"/>
<arg name="code" type="int" summary="event code"/>
<arg name="value" type="int" summary="event value"/>
</request>
diff --git a/protocol/ico_window_mgr.xml b/protocol/ico_window_mgr.xml
index 5446767..26ae3ac 100644
--- a/protocol/ico_window_mgr.xml
+++ b/protocol/ico_window_mgr.xml
@@ -11,6 +11,8 @@
</description>
<entry name="nochange" value="0x8000" summary="no change value"/>
<entry name="mainsurface" value="0x8000" summary="main serface id"/>
+ <entry name="layer_input" value="0x2000" summary="input layer id"/>
+ <entry name="layer_cursor" value="0x3000" summary="cursor layer id"/>
</enum>
<enum name="declare_manager">
diff --git a/settings/weston.ini b/settings/weston.ini
index c6db4a0..c6db4a0 100644..100755
--- a/settings/weston.ini
+++ b/settings/weston.ini
diff --git a/src/ico_input_mgr.c b/src/ico_input_mgr.c
index 6049c31..64ac83b 100644
--- a/src/ico_input_mgr.c
+++ b/src/ico_input_mgr.c
@@ -114,6 +114,8 @@ struct uifw_input_device {
struct wl_list link; /* link to next device */
uint16_t type; /* device type */
uint16_t no; /* device number */
+ int disp_x; /* display X coordinate */
+ int disp_y; /* display Y coordinate */
int x; /* current X coordinate */
int y; /* current Y coordinate */
int pend_x; /* pending X coordinate */
@@ -155,8 +157,9 @@ static void ico_mgr_del_input_app(struct wl_client *client, struct wl_resource *
const char *appid, const char *device, int32_t input);
/* send input event from manager */
static void ico_mgr_send_input_event(struct wl_client *client, struct wl_resource *resource,
- const char *appid, uint32_t surfaceid, int32_t type,
- int32_t deviceno, int32_t code, int32_t value);
+ const char *target, uint32_t surfaceid, int32_t type,
+ int32_t deviceno, uint32_t time,
+ int32_t code, int32_t value);
/* set input region */
static void ico_mgr_set_input_region(struct wl_client *client, struct wl_resource *resource,
const char *target, int32_t x, int32_t y,
@@ -410,10 +413,11 @@ ico_mgr_del_input_app(struct wl_client *client, struct wl_resource *resource,
*
* @param[in] client client(HomeScreen)
* @param[in] resource resource of request
- * @param[in] appid target application id
+ * @param[in] target target window name and application id
* @param[in] surfaceid target surface id
* @param[in] type event device type
* @param[in] deviceno device number
+ * @param[in] time event time (if 0, generate)
* @param[in] code event code
* @param[in] value event value
* @return none
@@ -421,20 +425,23 @@ ico_mgr_del_input_app(struct wl_client *client, struct wl_resource *resource,
/*--------------------------------------------------------------------------*/
static void
ico_mgr_send_input_event(struct wl_client *client, struct wl_resource *resource,
- const char *appid, uint32_t surfaceid, int32_t type,
- int32_t deviceno, int32_t code, int32_t value)
+ const char *target, uint32_t surfaceid, int32_t type,
+ int32_t deviceno, uint32_t time, int32_t code, int32_t value)
{
struct uifw_win_surface *usurf; /* UIFW surface */
struct uifw_input_device *dev; /* device control table */
struct wl_resource *cres; /* event send client resource */
+ struct wl_array dummy_array; /* dummy array for wayland API */
uint32_t ctime; /* current time(ms) */
uint32_t serial; /* event serial number */
int event; /* event flag */
wl_fixed_t fix_x; /* wayland X coordinate */
wl_fixed_t fix_y; /* wayland Y coordinate */
+ int keyboard_active; /* keyborad active surface flag */
- uifw_trace("ico_mgr_send_input_event: Enter(app=%s surf=%08x dev=%d.%d code=%x value=%d)",
- appid ? appid : "(NULL)", surfaceid, type, deviceno, code, value);
+ uifw_trace("ico_mgr_send_input_event: Enter(target=%s surf=%x dev=%d.%d "
+ "code=%x value=%d)",
+ target ? target : "(NULL)", surfaceid, type, deviceno, code, value);
/* search pseudo input device */
wl_list_for_each (dev, &pInputMgr->dev_list, link) {
@@ -451,6 +458,11 @@ ico_mgr_send_input_event(struct wl_client *client, struct wl_resource *resource,
memset(dev, 0, sizeof(struct uifw_input_device));
dev->type = type;
dev->no = deviceno;
+ if ((type == ICO_INPUT_MGR_DEVICE_TYPE_POINTER) ||
+ (type == ICO_INPUT_MGR_DEVICE_TYPE_TOUCH) ||
+ (type == ICO_INPUT_MGR_DEVICE_TYPE_HAPTIC)) {
+ ico_window_mgr_get_display_coordinate(deviceno, &dev->disp_x, &dev->disp_y);
+ }
wl_list_insert(pInputMgr->dev_list.prev, &dev->link);
}
@@ -560,11 +572,16 @@ ico_mgr_send_input_event(struct wl_client *client, struct wl_resource *resource,
return;
}
- ctime = weston_compositor_get_time();
- fix_x = wl_fixed_from_int(dev->x);
- fix_y = wl_fixed_from_int(dev->y);
+ if (time) {
+ ctime = time;
+ }
+ else {
+ ctime = weston_compositor_get_time();
+ }
+ fix_x = wl_fixed_from_int(dev->x + dev->disp_x);
+ fix_y = wl_fixed_from_int(dev->y + dev->disp_y);
- if ((surfaceid == 0) && ((appid == NULL) || (*appid == 0) || (*appid == ' '))) {
+ if ((surfaceid == 0) && ((target == NULL) || (*target == 0) || (*target == ' '))) {
/* send event to surface via weston */
/* disable the event transmission to a touch layer */
@@ -613,13 +630,14 @@ ico_mgr_send_input_event(struct wl_client *client, struct wl_resource *resource,
ico_window_mgr_restack_layer(NULL, FALSE);
}
else {
- if ((appid != NULL) && (*appid != 0) && (*appid != ' ')) {
+ if ((target != NULL) && (*target != 0) && (*target != ' ')) {
/* send event to fixed application */
/* get application surface */
- usurf = ico_window_mgr_get_client_usurf(appid, NULL);
+ usurf = ico_window_mgr_get_client_usurf(target);
if (! usurf) {
- uifw_trace("ico_mgr_send_input_event: Leave(app=%s dose not exist)", appid);
+ uifw_trace("ico_mgr_send_input_event: Leave(window=%s dose not exist)",
+ target);
return;
}
}
@@ -683,10 +701,21 @@ ico_mgr_send_input_event(struct wl_client *client, struct wl_resource *resource,
&pInputMgr->seat->keyboard->resource_list,
wl_resource_get_client(usurf->surface->resource));
if (cres) {
+ keyboard_active = ico_window_mgr_ismykeyboard(usurf);
+ if (! keyboard_active) {
+ wl_array_init(&dummy_array);
+ serial = wl_display_next_serial(pInputMgr->compositor->wl_display);
+ wl_keyboard_send_enter(cres, serial,
+ usurf->surface->resource, &dummy_array);
+ }
serial = wl_display_next_serial(pInputMgr->compositor->wl_display);
wl_keyboard_send_key(cres, serial, ctime, code,
value ? WL_KEYBOARD_KEY_STATE_PRESSED :
WL_KEYBOARD_KEY_STATE_RELEASED);
+ if (! keyboard_active) {
+ serial = wl_display_next_serial(pInputMgr->compositor->wl_display);
+ wl_keyboard_send_leave(cres, serial, usurf->surface->resource);
+ }
}
break;
default:
diff --git a/src/ico_ivi_shell.c b/src/ico_ivi_shell.c
index 3507296..735a493 100644
--- a/src/ico_ivi_shell.c
+++ b/src/ico_ivi_shell.c
@@ -197,6 +197,8 @@ struct shell_surface {
int32_t saved_x, saved_y;
bool saved_position_valid;
bool saved_rotation_valid;
+ char layer_type; /* surface layer type */
+ int layer_serial;
int unresponsive;
struct {
@@ -299,6 +301,7 @@ shell_fade_startup(struct desktop_shell *shell);
/* shell management table */
static struct desktop_shell *_ico_ivi_shell = NULL;
+static int _layer_serial = 0;
/* shell program path for ico-ivi */
static char *shell_exe = NULL;
#define DEFAULT_DEBUG_LEVEL 4
@@ -4905,6 +4908,90 @@ ico_ivi_shell_startup(void *shell)
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_ivi_shell_set_layertype: set layer type
+ *
+ * @param none
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+WL_EXPORT void
+ico_ivi_shell_set_layertype(void)
+{
+ struct weston_surface *es;
+
+ _layer_serial ++;
+ wl_list_for_each(es, &_ico_ivi_shell->panel_layer.surface_list, layer_link) {
+ if (es->configure == shell_surface_configure) {
+ ((struct shell_surface *)es->configure_private)->layer_type
+ = LAYER_TYPE_PANEL;
+ ((struct shell_surface *)es->configure_private)->layer_serial = _layer_serial;
+ }
+ }
+ wl_list_for_each(es, &_ico_ivi_shell->fullscreen_layer.surface_list, layer_link) {
+ if (es->configure == shell_surface_configure) {
+ ((struct shell_surface *)es->configure_private)->layer_type
+ = LAYER_TYPE_FULLSCREEN;
+ ((struct shell_surface *)es->configure_private)->layer_serial = _layer_serial;
+ }
+ }
+ wl_list_for_each(es, &_ico_ivi_shell->background_layer.surface_list, layer_link) {
+ if (es->configure == shell_surface_configure) {
+ ((struct shell_surface *)es->configure_private)->layer_type
+ = LAYER_TYPE_BACKGROUND;
+ ((struct shell_surface *)es->configure_private)->layer_serial = _layer_serial;
+ }
+ }
+ wl_list_for_each(es, &_ico_ivi_shell->compositor->cursor_layer.link, layer_link) {
+ if (es->configure == shell_surface_configure) {
+ ((struct shell_surface *)es->configure_private)->layer_type
+ = LAYER_TYPE_CURSOR;
+ ((struct shell_surface *)es->configure_private)->layer_serial = _layer_serial;
+ }
+ }
+ wl_list_for_each(es, &_ico_ivi_shell->compositor->fade_layer.link, layer_link) {
+ if (es->configure == shell_surface_configure) {
+ ((struct shell_surface *)es->configure_private)->layer_type
+ = LAYER_TYPE_FADE;
+ ((struct shell_surface *)es->configure_private)->layer_serial = _layer_serial;
+ }
+ }
+ wl_list_for_each(es, &_ico_ivi_shell->lock_layer.surface_list, layer_link) {
+ if (es->configure == shell_surface_configure) {
+ ((struct shell_surface *)es->configure_private)->layer_type
+ = LAYER_TYPE_LOCK;
+ ((struct shell_surface *)es->configure_private)->layer_serial = _layer_serial;
+ }
+ }
+ wl_list_for_each(es, &_ico_ivi_shell->input_panel_layer.surface_list, layer_link) {
+ if (es->configure == shell_surface_configure) {
+ ((struct shell_surface *)es->configure_private)->layer_type
+ = LAYER_TYPE_INPUTPANEL;
+ ((struct shell_surface *)es->configure_private)->layer_serial = _layer_serial;
+ }
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief ico_ivi_shell_layertype: get layer type
+ *
+ * @param[in] surface weston surface
+ * @return layer type
+ */
+/*--------------------------------------------------------------------------*/
+WL_EXPORT int
+ico_ivi_shell_layertype(struct weston_surface *surface)
+{
+ if ((surface->configure == shell_surface_configure) &&
+ (((struct shell_surface *)surface->configure_private)->layer_serial
+ == _layer_serial)) {
+ return ((struct shell_surface *)surface->configure_private)->layer_type;
+ }
+ return LAYER_TYPE_UNKNOWN;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief ico_ivi_shell_hook_bind: regist hook function for shell bind
*
* @param[in] hook_bind hook function(if NULL, reset hook function)
diff --git a/src/ico_ivi_shell.h b/src/ico_ivi_shell.h
index ef6fcec..c2be398 100644
--- a/src/ico_ivi_shell.h
+++ b/src/ico_ivi_shell.h
@@ -43,6 +43,16 @@ enum shell_surface_type {
SHELL_SURFACE_XWAYLAND
};
+/* weston layer type */
+#define LAYER_TYPE_UNKNOWN 0
+#define LAYER_TYPE_LOCK 1
+#define LAYER_TYPE_BACKGROUND 2
+#define LAYER_TYPE_PANEL 3
+#define LAYER_TYPE_FULLSCREEN 4
+#define LAYER_TYPE_INPUTPANEL 5
+#define LAYER_TYPE_CURSOR 6
+#define LAYER_TYPE_FADE 7
+
/* Prototype for get/set function */
struct weston_layer *ico_ivi_shell_weston_layer(void);
void ico_ivi_shell_set_toplevel(struct shell_surface *shsurf);
@@ -51,6 +61,8 @@ void ico_ivi_shell_set_surface_type(struct shell_surface *shsurf);
void ico_ivi_shell_send_configure(struct weston_surface *surface,
const uint32_t edges, const int width, const int height);
void ico_ivi_shell_startup(void *shell);
+void ico_ivi_shell_set_layertype(void);
+int ico_ivi_shell_layertype(struct weston_surface *surface);
/* Prototypr for hook routine */
void ico_ivi_shell_hook_bind(void (*hook_bind)(struct wl_client *client, void *shell));
diff --git a/src/ico_window_animation.c b/src/ico_window_animation.c
index 8d008b4..a5f497d 100644
--- a/src/ico_window_animation.c
+++ b/src/ico_window_animation.c
@@ -435,6 +435,7 @@ animation_end(struct uifw_win_surface *usurf, const int disp)
weston_surface_geometry_dirty(usurf->surface);
}
if (disp) {
+ usurf->restrain_configure = 0;
if ((usurf->animation.visible == ANIMA_HIDE_AT_END) &&
(usurf->visible != 0)) {
ico_window_mgr_set_visible(usurf, 0);
@@ -445,9 +446,8 @@ animation_end(struct uifw_win_surface *usurf, const int disp)
ico_window_mgr_set_visible(usurf, 1);
weston_surface_damage(usurf->surface);
}
- usurf->restrain_configure = 0;
weston_surface_geometry_dirty(usurf->surface);
- weston_compositor_schedule_repaint(weston_ec);
+ ico_window_mgr_restack_layer(usurf, 0);
}
usurf->animation.visible = ANIMA_NOCONTROL_AT_END;
if (usurf->animation.next_anima != ICO_WINDOW_MGR_ANIMATION_NONE) {
@@ -477,6 +477,9 @@ animation_end(struct uifw_win_surface *usurf, const int disp)
free_data = animadata;
}
usurf->animation.type = ICO_WINDOW_MGR_ANIMATION_OPNONE;
+ if (! disp) {
+ ico_window_mgr_restack_layer(usurf, 0);
+ }
}
/*--------------------------------------------------------------------------*/
@@ -512,7 +515,7 @@ animation_slide(struct weston_animation *animation,
}
par = usurf->animation.current;
- uifw_trace("animation_slide: %08x count=%d %d%% anima=%d state=%d",
+ uifw_debug("animation_slide: %08x count=%d %d%% anima=%d state=%d",
usurf->surfaceid, animation->frame_counter, par,
usurf->animation.anima, usurf->animation.state);
@@ -573,6 +576,8 @@ animation_slide(struct weston_animation *animation,
break;
}
+ uifw_debug("animation_slide: %08x %d%% %d/%d(target %d/%d)",
+ usurf->surfaceid, par, x, y, usurf->x, usurf->y);
es->geometry.x = usurf->node_tbl->disp_x + x;
es->geometry.y = usurf->node_tbl->disp_y + y;
if ((es->output) && (es->buffer_ref.buffer) &&
@@ -625,7 +630,7 @@ animation_wipe(struct weston_animation *animation,
}
par = usurf->animation.current;
- uifw_trace("animation_wipe: %08x count=%d %d%% anima=%d state=%d",
+ uifw_debug("animation_wipe: %08x count=%d %d%% anima=%d state=%d",
usurf->surfaceid, animation->frame_counter, par,
usurf->animation.anima, usurf->animation.state);
@@ -739,7 +744,7 @@ animation_swing(struct weston_animation *animation,
return;
}
- uifw_trace("animation_swing: %08x count=%d %d%% anima=%d state=%d",
+ uifw_debug("animation_swing: %08x count=%d %d%% anima=%d state=%d",
usurf->surfaceid, animation->frame_counter, par,
usurf->animation.anima, usurf->animation.state);
@@ -943,7 +948,7 @@ animation_fade(struct weston_animation *animation,
if (es->alpha < 0.0) es->alpha = 0.0;
else if (es->alpha > 1.0) es->alpha = 1.0;
- uifw_trace("animation_fade: %08x count=%d %d%% alpha=%1.2f anima=%d state=%d",
+ uifw_debug("animation_fade: %08x count=%d %d%% alpha=%1.2f anima=%d state=%d",
usurf->surfaceid, animation->frame_counter, par, es->alpha,
usurf->animation.anima, usurf->animation.state);
diff --git a/src/ico_window_mgr.c b/src/ico_window_mgr.c
index 005fef0..890bca5 100644
--- a/src/ico_window_mgr.c
+++ b/src/ico_window_mgr.c
@@ -631,6 +631,26 @@ ico_window_mgr_get_appid(struct wl_client* client)
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_window_mgr_get_display_coordinate: get display coordinate
+ *
+ * @param[in] displayno display number
+ * @param[out] x relative X coordinate
+ * @param[out] y relative Y coordinate
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+WL_EXPORT void
+ico_window_mgr_get_display_coordinate(int displayno, int *x, int *y)
+{
+ if ((displayno <= _ico_num_nodes) || (displayno < 0)) {
+ displayno = 0;
+ }
+ *x = _ico_node_table[displayno].disp_x;
+ *y = _ico_node_table[displayno].disp_y;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief generate_id: generate uniq id for UIFW surface id
*
* @param none
@@ -1109,13 +1129,17 @@ win_mgr_map_surface(struct weston_surface *surface, int32_t *width, int32_t *hei
WL_EXPORT void
ico_window_mgr_restack_layer(struct uifw_win_surface *usurf, const int omit_touch)
{
- struct uifw_win_surface *es;
+ struct uifw_win_surface *eu;
struct uifw_win_layer *el;
int32_t buf_width, buf_height;
float new_x, new_y;
struct weston_layer *wlayer;
struct weston_surface *surface, *surfacetmp;
int num_visible = 0;
+ int layer_type;
+
+ /* set layer type */
+ ico_ivi_shell_set_layertype();
/* make compositor surface list */
wlayer = ico_ivi_shell_weston_layer();
@@ -1131,62 +1155,65 @@ ico_window_mgr_restack_layer(struct uifw_win_surface *usurf, const int omit_touc
wl_list_init(&wlayer->surface_list);
wl_list_for_each (el, &_ico_win_mgr->ivi_layer_list, link) {
- wl_list_for_each (es, &el->surface_list, ivi_layer) {
- /* if surface not exist or surface type is not TopLevel, Skip */
- if ((es->surface == NULL) ||
- (ico_ivi_shell_get_surfacetype(es->shsurf) != SHELL_SURFACE_TOPLEVEL)) {
+ if (el->layer_type == ICO_WINDOW_MGR_LAYER_TYPE_CURSOR) continue;
+ wl_list_for_each (eu, &el->surface_list, ivi_layer) {
+ if (eu->surface == NULL) continue;
+
+ /* target only panel or unknown layer */
+ layer_type = ico_ivi_shell_layertype(eu->surface);
+ if ((layer_type != LAYER_TYPE_PANEL) && (layer_type != LAYER_TYPE_UNKNOWN)) {
continue;
}
- wl_list_remove(&es->surface->layer_link);
- wl_list_init(&es->surface->layer_link);
+ wl_list_remove(&eu->surface->layer_link);
+ wl_list_init(&eu->surface->layer_link);
- if (es->mapped != 0) {
- if ((el->visible == FALSE) || (es->visible == FALSE) ||
+ if (eu->mapped != 0) {
+ if ((el->visible == FALSE) || (eu->visible == FALSE) ||
((omit_touch != FALSE) &&
- ((el->layer_type == ICO_WINDOW_MGR_LAYER_TYPE_INPUT) ||
- (el->layer_type == ICO_WINDOW_MGR_LAYER_TYPE_CURSOR)))) {
+ (el->layer_type == ICO_WINDOW_MGR_LAYER_TYPE_INPUT))) {
new_x = (float)(ICO_IVI_MAX_COORDINATE+1);
new_y = (float)(ICO_IVI_MAX_COORDINATE+1);
}
- else if (es->surface->buffer_ref.buffer) {
- buf_width = weston_surface_buffer_width(es->surface);
- buf_height = weston_surface_buffer_height(es->surface);
- if (es->width > buf_width) {
- new_x = (float)(es->x +
- (es->width - es->surface->geometry.width)/2);
+ else if (eu->surface->buffer_ref.buffer) {
+ buf_width = weston_surface_buffer_width(eu->surface);
+ buf_height = weston_surface_buffer_height(eu->surface);
+ if (eu->width > buf_width) {
+ new_x = (float)(eu->x +
+ (eu->width - eu->surface->geometry.width)/2);
}
else {
- new_x = (float)es->x;
+ new_x = (float)eu->x;
}
- if (es->height > buf_height) {
- new_y = (float) (es->y +
- (es->height - es->surface->geometry.height)/2);
+ if (eu->height > buf_height) {
+ new_y = (float) (eu->y +
+ (eu->height - eu->surface->geometry.height)/2);
}
else {
- new_y = (float)es->y;
+ new_y = (float)eu->y;
}
- new_x += es->node_tbl->disp_x + es->xadd;
- new_y += es->node_tbl->disp_y + es->yadd;
+ new_x += eu->node_tbl->disp_x + eu->xadd;
+ new_y += eu->node_tbl->disp_y + eu->yadd;
num_visible ++;
}
else {
- new_x = (float)(es->x + es->node_tbl->disp_x + es->xadd);
- new_y = (float)(es->y + es->node_tbl->disp_y + es->yadd);
+ new_x = (float)(eu->x + eu->node_tbl->disp_x + eu->xadd);
+ new_y = (float)(eu->y + eu->node_tbl->disp_y + eu->yadd);
}
- wl_list_insert(wlayer->surface_list.prev, &es->surface->layer_link);
- if ((new_x != es->surface->geometry.x) ||
- (new_y != es->surface->geometry.y)) {
- weston_surface_damage_below(es->surface);
- weston_surface_set_position(es->surface, (float)new_x, (float)new_y);
- weston_surface_damage(es->surface);
+ wl_list_insert(wlayer->surface_list.prev, &eu->surface->layer_link);
+ if ((eu->restrain_configure == 0) &&
+ ((new_x != eu->surface->geometry.x) ||
+ (new_y != eu->surface->geometry.y))) {
+ weston_surface_damage_below(eu->surface);
+ weston_surface_set_position(eu->surface, (float)new_x, (float)new_y);
+ weston_surface_damage(eu->surface);
}
#if 0 /* too many debug log */
uifw_trace("ico_window_mgr_restack_layer:%3d(%d).%08x(%08x:%d) "
"x/y=%d/%d w/h=%d/%d",
- el->layer, el->visible, es->surfaceid, (int)es->surface,
- es->visible, (int)es->surface->geometry.x,
- (int)es->surface->geometry.y, es->surface->geometry.width,
- es->surface->geometry.height);
+ el->layer, el->visible, eu->surfaceid, (int)eu->surface,
+ eu->visible, (int)eu->surface->geometry.x,
+ (int)eu->surface->geometry.y, eu->surface->geometry.width,
+ eu->surface->geometry.height);
#endif
}
}
@@ -1422,6 +1449,22 @@ win_mgr_set_active(struct uifw_win_surface *usurf, const int target)
/*--------------------------------------------------------------------------*/
/**
+ * @brief ico_window_mgr_ismykeyboard: check active keyboard
+ *
+ * @param[in] usurf UIFW surface
+ * @return check result
+ * @retval =1 usurf is active keyboard surface
+ * @retval =0 usurf is not active
+ */
+/*--------------------------------------------------------------------------*/
+WL_EXPORT int
+ico_window_mgr_ismykeyboard(struct uifw_win_surface *usurf)
+{
+ return (_ico_win_mgr->active_keyboard_usurf == usurf) ? 1 : 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief uifw_declare_manager: declare manager(ex.SystemController) client
*
* @param[in] client Weyland client
@@ -1500,6 +1543,13 @@ static void
uifw_set_window_layer(struct wl_client *client, struct wl_resource *resource,
uint32_t surfaceid, uint32_t layer)
{
+ if (layer == ICO_WINDOW_MGR_V_LAYER_INPUT) {
+ layer = _ico_ivi_input_layer;
+ }
+ else if (layer == ICO_WINDOW_MGR_V_LAYER_CURSOR) {
+ layer = _ico_ivi_cursor_layer;
+ }
+
uifw_trace("uifw_set_window_layer: Enter res=%08x surfaceid=%08x layer=%d",
(int)resource, surfaceid, layer);
@@ -1509,9 +1559,9 @@ uifw_set_window_layer(struct wl_client *client, struct wl_resource *resource,
uifw_trace("uifw_set_window_layer: Leave(No Surface(id=%08x))", surfaceid);
return;
}
+
if (usurf->win_layer->layer != layer) {
win_mgr_set_layer(usurf, layer);
-
win_mgr_change_surface(usurf->surface, -1, 1);
}
uifw_trace("uifw_set_window_layer: Leave");
@@ -1826,11 +1876,7 @@ uifw_set_visible(struct wl_client *client, struct wl_resource *resource,
raise = ICO_WINDOW_MGR_V_NOCHANGE;
}
- if ((restack == 1) && (usurf->surface) &&
- (usurf->surface->buffer_ref.buffer) && (usurf->surface->output)) {
- weston_surface_damage(usurf->surface);
- }
- else if(restack & 2) {
+ if (restack) {
ico_window_mgr_restack_layer(usurf, 0);
}
@@ -2137,6 +2183,13 @@ uifw_set_layer_visible(struct wl_client *client, struct wl_resource *resource,
struct uifw_win_layer *new_el;
struct uifw_win_surface *usurf;
+ if (layer == ICO_WINDOW_MGR_V_LAYER_INPUT) {
+ layer = _ico_ivi_input_layer;
+ }
+ else if (layer == ICO_WINDOW_MGR_V_LAYER_CURSOR) {
+ layer = _ico_ivi_cursor_layer;
+ }
+
uifw_trace("uifw_set_layer_visible: Enter(layer=%d, visilbe=%d)", layer, visible);
/* Search Layer */
@@ -2648,26 +2701,26 @@ win_mgr_change_surface(struct weston_surface *surface, const int to, const int m
return;
}
- /* if not configure surface, set surface size */
- if ((usurf->width <= 0) || (usurf->height <= 0)) {
- uifw_trace("win_mgr_change_surface: set surface x/y=%d/%d=>%d/%d w/h=%d/%d=>%d/%d",
- (int)es->geometry.x, (int)es->geometry.y, usurf->x, usurf->y,
- usurf->width, usurf->height, es->geometry.width, es->geometry.height);
+ /* set surface size */
+ uifw_debug("win_mgr_change_surface: set surface x/y=%d/%d=>%d/%d w/h=%d/%d=>%d/%d",
+ (int)es->geometry.x, (int)es->geometry.y, usurf->x, usurf->y,
+ usurf->width, usurf->height, es->geometry.width, es->geometry.height);
+ if ((usurf->width <= 0) || (usurf->height <= 0)) {
usurf->width = es->geometry.width;
usurf->height = es->geometry.height;
- win_mgr_set_scale(usurf);
- if (usurf->visible) {
- weston_surface_set_position(usurf->surface,
- (float)(usurf->node_tbl->disp_x +
- usurf->x + usurf->xadd),
- (float)(usurf->node_tbl->disp_y +
- usurf->y + usurf->yadd));
- ico_window_mgr_restack_layer(usurf, 0);
- }
- else {
- weston_surface_set_position(usurf->surface, (float)(ICO_IVI_MAX_COORDINATE+1),
- (float)(ICO_IVI_MAX_COORDINATE+1));
- }
+ }
+ win_mgr_set_scale(usurf);
+ if (usurf->visible) {
+ weston_surface_set_position(usurf->surface,
+ (float)(usurf->node_tbl->disp_x +
+ usurf->x + usurf->xadd),
+ (float)(usurf->node_tbl->disp_y +
+ usurf->y + usurf->yadd));
+ ico_window_mgr_restack_layer(usurf, 0);
+ }
+ else {
+ weston_surface_set_position(usurf->surface, (float)(ICO_IVI_MAX_COORDINATE+1),
+ (float)(ICO_IVI_MAX_COORDINATE+1));
}
/* send wayland event to client */
@@ -3293,7 +3346,7 @@ win_mgr_set_scale(struct uifw_win_surface *usurf)
if (usurf->client_height == 0) usurf->client_height = es->geometry.height;
scalex = (float)usurf->width / (float)usurf->client_width;
scaley = (float)usurf->height / (float)usurf->client_height;
- uifw_trace("win_mgr_set_scale: %08x X=%4.2f(%d/%d) Y=%4.2f(%d/%d)",
+ uifw_debug("win_mgr_set_scale: %08x X=%4.2f(%d/%d) Y=%4.2f(%d/%d)",
usurf->surfaceid, scalex, usurf->width, usurf->client_width,
scaley, usurf->height, usurf->client_height);
usurf->xadd = 0;
@@ -3375,23 +3428,57 @@ ico_window_mgr_get_uclient(const char *appid)
/**
* @brief ico_window_mgr_get_client_usurf: get client UIFW surface table
*
- * @param[in] appid application Id
- * @param[in] winname window name
+ * @param[in] target surface window name and application Id(winname@appid)
* @return UIFW surface table
* @retval !=NULL success(UIFW surface table address)
* @retval = NULL error(appid or winname not exist)
*/
/*--------------------------------------------------------------------------*/
WL_EXPORT struct uifw_win_surface *
-ico_window_mgr_get_client_usurf(const char *appid, const char *winname)
+ico_window_mgr_get_client_usurf(const char *target)
{
struct uifw_client *uclient;
struct uifw_win_surface *usurf;
+ int i, j;
+ char winname[ICO_IVI_WINNAME_LENGTH];
+ char appid[ICO_IVI_APPID_LENGTH];
+
+ /* get window name and application id */
+ j = 0;
+ for (i = 0; target[i]; i++) {
+ if (target[i] == '@') {
+ if (target[i+1] != '@') break;
+ i ++;
+ }
+ if (j < (ICO_IVI_WINNAME_LENGTH-1)) {
+ winname[j++] = target[i];
+ }
+ }
+ winname[j] = 0;
+ if (target[i] == '@') {
+ i ++;
+ }
+ else {
+ winname[0] = 0;
+ i = 0;
+ }
+ j = 0;
+ for ( ; target[i]; i++) {
+ if ((target[i] == '@') && (target[i+1] == '@')) i ++;
+ if (j < (ICO_IVI_APPID_LENGTH-1)) {
+ appid[j++] = target[i];
+ }
+ }
+ appid[j] = 0;
+#if 0 /* too many debug log */
+ uifw_debug("ico_window_mgr_get_client_usurf: target=<%s> appid=<%s> win=<%s>",
+ target, appid, winname);
+#endif
wl_list_for_each (uclient, &_ico_win_mgr->client_list, link) {
if (strcmp(uclient->appid, appid) == 0) {
wl_list_for_each (usurf, &uclient->surface_link, client_link) {
- if ((winname == NULL) || (*winname == 0) ||
+ if ((winname[0] == 0) ||
(strcmp(winname, usurf->winname) == 0)) {
return usurf;
}
diff --git a/src/ico_window_mgr.h b/src/ico_window_mgr.h
index 3add4ad..c4c31a6 100644
--- a/src/ico_window_mgr.h
+++ b/src/ico_window_mgr.h
@@ -195,12 +195,16 @@ struct uifw_win_surface {
void ico_window_mgr_set_visible(struct uifw_win_surface *usurf, const int visible);
/* get client applicationId */
char *ico_window_mgr_get_appid(struct wl_client* client);
+ /* get display coordinate */
+void ico_window_mgr_get_display_coordinate(int displayno, int *x, int *y);
/* change weston surface */
void ico_window_mgr_set_weston_surface(struct uifw_win_surface *usurf, int x, int y,
int width, int height);
/* surface change */
void ico_window_mgr_change_surface(struct uifw_win_surface *usurf,
const int to, const int manager);
+ /* check active keyboard surface */
+int ico_window_mgr_ismykeyboard(struct uifw_win_surface *usurf);
/* get UIFW client table */
struct uifw_client *ico_window_mgr_get_uclient(const char *appid);
/* get UIFW surface table */
@@ -209,8 +213,7 @@ struct uifw_win_surface *ico_window_mgr_get_usurf(const uint32_t surfaceid);
struct uifw_win_surface *ico_window_mgr_get_usurf_client(const uint32_t surfaceid,
struct wl_client *client);
/* get application surface */
-struct uifw_win_surface *ico_window_mgr_get_client_usurf(const char *appid,
- const char *winname);
+struct uifw_win_surface *ico_window_mgr_get_client_usurf(const char *target);
/* rebuild surface layer list */
void ico_window_mgr_restack_layer(struct uifw_win_surface *usurf, const int omit_touch);
/* set window animation hook */
diff --git a/tests/test-homescreen.c b/tests/test-homescreen.c
index 6d5da3f..d726e3d 100644
--- a/tests/test-homescreen.c
+++ b/tests/test-homescreen.c
@@ -1544,7 +1544,7 @@ input_send(struct display *display, char *buf)
print_log("HOMESCREEN: input_send(%s.%x,%d,%d,%x,%d)",
appid, surfaceid, type, no, code, value);
ico_input_mgr_control_send_input_event(display->ico_input_mgr,
- appid, surfaceid, type, no, code, value);
+ appid, surfaceid, type, no, 0, code, value);
}
else {
print_log("HOMESCREEN: input_send command[input_send {@app/serface} type no code "
diff --git a/tests/testdata/hs_mapsurf.dat b/tests/testdata/hs_mapsurf.dat
index d3d8f1b..eb17d1c 100644
--- a/tests/testdata/hs_mapsurf.dat
+++ b/tests/testdata/hs_mapsurf.dat
@@ -25,7 +25,6 @@ sleep 2
# unmap surface
unmap test-eflapp@1
unmap test-client
-sleep 2
#
sleep 2
kill test-client
diff --git a/tests/testdata/hs_sendinput.dat b/tests/testdata/hs_sendinput.dat
index eddbe8d..6662065 100644
--- a/tests/testdata/hs_sendinput.dat
+++ b/tests/testdata/hs_sendinput.dat
@@ -43,6 +43,7 @@ active test-client
input_send @ keyboard 0 1 1
input_send @ keyboard 0 1 0
sleep 0.2
+active test-eflapp@1
input_send @ keyboard 0 2 1
sleep 0.1
input_send @ keyboard 0 2 0
@@ -65,6 +66,7 @@ active test-client
input_send @ switch 0 11 1
input_send @ switch 0 11 0
sleep 0.1
+active test-eflapp@1
input_send @ switch 0 12 1
sleep 0.1
input_send @ switch 0 12 0
@@ -85,6 +87,7 @@ sleep 1
# 21. send pointer event to general pointer motion(appid)
#
sleep 1
+active test-eflapp@1
input_send @test-client pointer 0 ABS_Z 80 160
sleep 0.1
input_send @test-client pointer 0 ABS_X 270
@@ -107,18 +110,18 @@ sleep 1
#
# 22. send keyboard event(appid)
#
-active test-client
+active test-eflapp@1
input_send @test-client keyboard 0 1 1
input_send @test-client keyboard 0 1 0
sleep 0.2
+active test-client
input_send @test-client keyboard 0 2 1
sleep 0.1
-input_send @test-client keyboard 0 2 0
+input_send @test-client@test-client keyboard 0 2 0
sleep 1
#
# 23. send touch event(appid)
#
-active test-client
input_send @test-client touch 0 ABS_Z 250 450
input_send @test-client touch 0 BTN_TOUCH 1
sleep 0.1
@@ -129,7 +132,6 @@ sleep 1
#
# 24. switch event(appid)
#
-active test-client
input_send @test-client switch 0 11 1
input_send @test-client switch 0 11 0
sleep 0.1
@@ -140,7 +142,6 @@ sleep 1
#
# 25. haptic event(appid)
#
-active test-client
input_send @test-client haptic 0 ABS_Z 260 460
sleep 0.1
input_send @test-client haptic 0 ABS_Z 262 462
@@ -150,7 +151,7 @@ sleep 0.1
input_send @test-client haptic 0 BTN_LEFT 0
sleep 1
#
-# 31. send pointer event to general pointer motion(urface id)
+# 31. send pointer event to general pointer motion(surface id)
#
sleep 1
input_send test-client pointer 0 ABS_Z 80 160
@@ -179,6 +180,7 @@ active test-client
input_send test-client keyboard 0 1 1
input_send test-client keyboard 0 1 0
sleep 0.2
+active test-eflapp@1
input_send test-client keyboard 0 2 1
sleep 0.1
input_send test-client keyboard 0 2 0
@@ -186,7 +188,6 @@ sleep 1
#
# 33. send touch event(surface id)
#
-active test-client
input_send test-client touch 0 ABS_Z 250 450
input_send test-client touch 0 BTN_TOUCH 1
sleep 0.1
@@ -197,7 +198,6 @@ sleep 1
#
# 34. switch event(surface id)
#
-active test-client
input_send test-client switch 0 11 1
input_send test-client switch 0 11 0
sleep 0.1
@@ -208,7 +208,6 @@ sleep 1
#
# 35. haptic event(surface id)
#
-active test-client
input_send test-client haptic 0 ABS_Z 260 460
sleep 0.1
input_send test-client haptic 0 ABS_Z 262 462
@@ -218,7 +217,7 @@ sleep 0.1
input_send test-client haptic 0 BTN_LEFT 0
sleep 1
#
-sleep 60
+sleep 20
#
kill test-client
kill test-eflapp@1
diff --git a/tests/weston.ini b/tests/weston.ini
index 252c1f0..cf21610 100644
--- a/tests/weston.ini
+++ b/tests/weston.ini
@@ -2,40 +2,24 @@
modules=error_but_no_problem_for_test.so
# This is Error for Test(No Problem)
-#[input-method]
-#path=/no_input_method_err_but_no_problem.so
-
[shell]
num-workspaces=1
shell-exe=
-[output]
-#name=HDMI3
-#mode=1680x945
-#mode=1920x1080
-#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
-#transform=90
-
-#[output]
-#name=HDMI2
-#mode=1280x480
-#mode=57.12 1280 1328 1456 1632 480 481 484 500 -hsync +vsync
+#[input-method]
+#path=/bin/weekeyboard
#[output]
-#name=LVDS1
-#mode=1680x1050
+#name=HDMI1
#transform=90
#[output]
-#name=VGA1
-#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
-#mode=57.12 1280 1328 1456 1632 480 481 484 500 -hsync +vsync
+#name=HDMI3
#transform=90
#[output]
-#name=X1
-#mode=1024x768
-#transform=flipped-270
+#name=VGA1
+#mode=off
[ivi-plugin]
modules=ico_ivi_shell.so,ico_window_mgr.so,ico_window_animation.so,ico_input_mgr.so
@@ -66,8 +50,8 @@ fps=30
[ivi-debug]
# debug flags
# bit.0 0=hide on surface create(for with HomeScreen)/1=show on surface create
+# bit.1 0=not show if display not exist/1=show if display not exist
flag=0
# 0=no debug log write(1=err/2=warn/3=info/4=trace/5=debug)
log=5
-