summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>2014-03-26 15:16:19 +0900
committerMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>2014-03-26 16:01:32 +0900
commit7a6f8485b86d7d9a09b9d0bb21af529f3b3843f9 (patch)
tree2f555dd535a1456a6e7ddc8164bfa66cd460b5f5 /src
parent4fbe20568de0e07a6bd43f40de3683b51dd3e1da (diff)
downloadico-uxf-weston-plugin-7a6f8485b86d7d9a09b9d0bb21af529f3b3843f9.tar.gz
ico-uxf-weston-plugin-7a6f8485b86d7d9a09b9d0bb21af529f3b3843f9.tar.bz2
ico-uxf-weston-plugin-7a6f8485b86d7d9a09b9d0bb21af529f3b3843f9.zip
Add the tool ico_pseudo_input_device which generates those pseudo devices for a system without a mouse,a touch panel, and a keyboard.submit/tizen/20140326.084841accepted/tizen/ivi/panda/20140326.234219
bug fix: Weston crashes at the time of deletion of surface. Add surface operation interface for a privilege program. Add interface which does not update a thumbnail. bug fix: TIVI-2946 - Incorrect weston.ini with DP output after manually inst all ico-uxf-homescreen. Change-Id: Idd2a1da846b34853a3f05463c98dc5979027caf2 Signed-off-by: Masayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am8
-rw-r--r--src/ico_plugin_loader.c6
-rw-r--r--src/ico_plugin_version.h2
-rw-r--r--src/ico_window_animation.c28
-rw-r--r--src/ico_window_mgr.c253
-rw-r--r--src/ico_window_mgr_private.h82
6 files changed, 302 insertions, 77 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 35ff2b8..48eaf76 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,8 +8,6 @@ pkginclude_HEADERS = \
libico_uxf_weston_plugin_la_LIBADD = -ldrm_intel -lrt -lm
libico_uxf_weston_plugin_la_LDFLAGS = -version-info 0:9:0
libico_uxf_weston_plugin_la_SOURCES = \
- ivi-application-protocol.c \
- ivi-controller-protocol.c \
ico_window_mgr-protocol.c \
ico_input_mgr-protocol.c
@@ -81,12 +79,6 @@ ico_input_mgr_la_SOURCES = \
# Wayland protocol(Build by wayland-scanner)
BUILT_SOURCES = \
- ivi-application-protocol.c \
- ivi-application-server-protocol.h \
- ivi-application-client-protocol.h \
- ivi-controller-protocol.c \
- ivi-controller-server-protocol.h \
- ivi-controller-client-protocol.h \
ico_window_mgr-protocol.c \
ico_window_mgr-server-protocol.h \
ico_window_mgr-client-protocol.h \
diff --git a/src/ico_plugin_loader.c b/src/ico_plugin_loader.c
index e826ee9..36fd545 100644
--- a/src/ico_plugin_loader.c
+++ b/src/ico_plugin_loader.c
@@ -173,12 +173,12 @@ module_init(struct weston_compositor *ec, int *argc, char *argv[])
if (modules == NULL) {
uifw_error("ico_plugin_loader: Leave(No Plugin in config)");
- if (moddir) free(moddir);
+ free(moddir);
return -1;
}
p = getenv("WESTON_IVI_PLUGIN_DIR");
if (p) {
- if (moddir) free(moddir);
+ free(moddir);
moddir = strdup(p);
}
@@ -200,7 +200,7 @@ module_init(struct weston_compositor *ec, int *argc, char *argv[])
p++;
}
}
- if (moddir) free(moddir);
+ free(moddir);
free(modules);
uifw_info("ico_plugin_loader: Leave(module_init)");
diff --git a/src/ico_plugin_version.h b/src/ico_plugin_version.h
index 63de2ff..fb5c623 100644
--- a/src/ico_plugin_version.h
+++ b/src/ico_plugin_version.h
@@ -1 +1 @@
-#define ICO_PLUIGN_VERSION "0.9.21 (Mar-11-2014)"
+#define ICO_PLUIGN_VERSION "0.9.21 (Mar-26-2014)"
diff --git a/src/ico_window_animation.c b/src/ico_window_animation.c
index ae7e3b3..0489486 100644
--- a/src/ico_window_animation.c
+++ b/src/ico_window_animation.c
@@ -320,6 +320,20 @@ ico_window_animation(const int op, void *data)
usurf->animation.anima = 0;
wl_list_remove(&usurf->animation.animation.link);
ret = ICO_WINDOW_MGR_ANIMATION_RET_NOANIMA;
+ if (usurf->org_animation.saved) {
+ usurf->animation.type = usurf->org_animation.type;
+ usurf->animation.anima = usurf->org_animation.anima;
+ usurf->animation.next_anima = usurf->org_animation.next_anima;
+ usurf->animation.hide_anima = usurf->org_animation.hide_anima;
+ usurf->animation.hide_time = usurf->org_animation.hide_time;
+ usurf->animation.show_anima = usurf->org_animation.show_anima;
+ usurf->animation.show_time = usurf->org_animation.show_time;
+ usurf->animation.move_anima = usurf->org_animation.move_anima;
+ usurf->animation.move_time = usurf->org_animation.move_time;
+ usurf->animation.resize_anima = usurf->org_animation.resize_anima;
+ usurf->animation.resize_time = usurf->org_animation.resize_time;
+ usurf->org_animation.saved = 0;
+ }
}
usurf->animation.type = op;
#if PERFORMANCE_EVALUATIONS > 0
@@ -435,6 +449,20 @@ animation_end(struct uifw_win_surface *usurf, const int disp)
struct weston_view *ev;
usurf->animation.state = ICO_WINDOW_MGR_ANIMATION_STATE_NONE;
+ if (usurf->org_animation.saved) {
+ usurf->animation.type = usurf->org_animation.type;
+ usurf->animation.anima = usurf->org_animation.anima;
+ usurf->animation.next_anima = usurf->org_animation.next_anima;
+ usurf->animation.hide_anima = usurf->org_animation.hide_anima;
+ usurf->animation.hide_time = usurf->org_animation.hide_time;
+ usurf->animation.show_anima = usurf->org_animation.show_anima;
+ usurf->animation.show_time = usurf->org_animation.show_time;
+ usurf->animation.move_anima = usurf->org_animation.move_anima;
+ usurf->animation.move_time = usurf->org_animation.move_time;
+ usurf->animation.resize_anima = usurf->org_animation.resize_anima;
+ usurf->animation.resize_time = usurf->org_animation.resize_time;
+ usurf->org_animation.saved = 0;
+ }
animadata = (struct animation_data *)usurf->animation.animadata;
if (animation_count > 0) {
diff --git a/src/ico_window_mgr.c b/src/ico_window_mgr.c
index 2b52cb8..ffeac62 100644
--- a/src/ico_window_mgr.c
+++ b/src/ico_window_mgr.c
@@ -174,6 +174,10 @@ static void uifw_map_surface(struct wl_client *client, struct wl_resource *resou
/* unmap surface */
static void uifw_unmap_surface(struct wl_client *client, struct wl_resource *resource,
uint32_t surfaceid);
+ /* direct layout surface */
+static void uifw_layout_surface(struct wl_client *client, struct wl_resource *resource,
+ uint32_t surfaceid, uint32_t layerid, int x, int y,
+ int width, int height, int visible);
/* bind manager */
static void bind_ico_win_mgr(struct wl_client *client,
void *data, uint32_t version, uint32_t id);
@@ -218,7 +222,8 @@ static void (*win_mgr_hook_inputregion)(int set, struct uifw_win_surface *usurf,
static const struct ico_window_mgr_interface ico_window_mgr_implementation = {
uifw_set_animation,
uifw_map_surface,
- uifw_unmap_surface
+ uifw_unmap_surface,
+ uifw_layout_surface
};
@@ -585,8 +590,26 @@ WL_EXPORT struct uifw_win_surface *
ico_window_mgr_get_usurf_client(const uint32_t surfaceid, struct wl_client *client)
{
struct uifw_win_surface *usurf;
+ struct uifw_client *uclient;
usurf = ico_window_mgr_get_usurf(surfaceid);
+
+ if (! usurf) {
+ uclient = ico_window_mgr_find_uclient(client);
+ if (! uclient) {
+ /* client dose not exist, error */
+ uifw_trace("ico_window_mgr_get_usurf_client: client=%08x dose not exist",
+ (int)client);
+ return NULL;
+ }
+ if (&uclient->surface_link == uclient->surface_link.next) {
+ /* client has no surface */
+ uifw_trace("ico_window_mgr_get_usurf_client: client=%08x has no surface",
+ (int)client);
+ return NULL;
+ }
+ usurf = (struct uifw_win_surface *)uclient->surface_link.next;
+ }
return usurf;
}
@@ -761,13 +784,19 @@ static void
win_mgr_destroy_client(struct wl_listener *listener, void *data)
{
struct uifw_client *uclient;
+ struct uifw_win_surface *usurf;
+ struct uifw_win_surface *usurf_tmp;
uclient = container_of(listener, struct uifw_client, destroy_listener);
uifw_trace("win_mgr_destroy_client: Enter(uclient=%08x)", (int)uclient);
if (uclient) {
- /* Client exist, Destory client management table */
+ /* Client exist, Destory client surfaces */
+ wl_list_for_each_safe (usurf, usurf_tmp, &uclient->surface_link, client_link) {
+ win_mgr_destroy_surface(usurf->surface);
+ }
+ /* Destory client management table */
wl_list_remove(&uclient->link);
free(uclient);
}
@@ -1029,7 +1058,8 @@ win_mgr_send_event(int event, uint32_t surfaceid, uint32_t arg1)
ico_window_mgr_send_window_active(mgr->resource, surfaceid, arg1);
break;
case ICO_WINDOW_MGR_DESTROY_SURFACE: /* surface destroy event */
- uifw_trace("win_mgr_send_event: Send DESTROY_SURFACE(surf=%08x)", surfaceid);
+ uifw_trace("win_mgr_send_event: Send DESTROY_SURFACE(surf=%08x) mgr=%08x",
+ surfaceid, (int)mgr);
ico_window_mgr_send_destroy_surface(mgr->resource, surfaceid);
break;
default:
@@ -1525,53 +1555,93 @@ uifw_set_animation(struct wl_client *client, struct wl_resource *resource,
if ((*animation != 0) && (*animation != ' ')) {
animaid = ico_get_animation_name(animation);
uifw_trace("uifw_set_animation: Leave(OK) type=%d", animaid);
+ if (type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) {
+ if (! usurf->org_animation.saved) {
+ usurf->org_animation.type = usurf->animation.type;
+ usurf->org_animation.anima = usurf->animation.anima;
+ usurf->org_animation.next_anima = usurf->animation.next_anima;
+ usurf->org_animation.hide_anima = usurf->animation.hide_anima;
+ usurf->org_animation.hide_time = usurf->animation.hide_time;
+ usurf->org_animation.show_anima = usurf->animation.show_anima;
+ usurf->org_animation.show_time = usurf->animation.show_time;
+ usurf->org_animation.move_anima = usurf->animation.move_anima;
+ usurf->org_animation.move_time = usurf->animation.move_time;
+ usurf->org_animation.resize_anima = usurf->animation.resize_anima;
+ usurf->org_animation.resize_time = usurf->animation.resize_time;
+ usurf->org_animation.saved = 1;
+ }
+ }
if (type & ICO_WINDOW_MGR_ANIMATION_TYPE_HIDE) {
if ((usurf->animation.type == ICO_WINDOW_MGR_ANIMATION_OPHIDE) ||
(usurf->animation.type == ICO_WINDOW_MGR_ANIMATION_OPHIDEPOS)) {
usurf->animation.next_anima = animaid;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.next_anima = animaid;
}
else {
usurf->animation.hide_anima = animaid;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.hide_anima = animaid;
}
}
if (type & ICO_WINDOW_MGR_ANIMATION_TYPE_SHOW) {
if ((usurf->animation.type == ICO_WINDOW_MGR_ANIMATION_OPSHOW) ||
(usurf->animation.type == ICO_WINDOW_MGR_ANIMATION_OPSHOWPOS)) {
usurf->animation.next_anima = animaid;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.next_anima = animaid;
}
else {
usurf->animation.show_anima = animaid;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.show_anima = animaid;
}
}
if (type & ICO_WINDOW_MGR_ANIMATION_TYPE_MOVE) {
if (usurf->animation.type == ICO_WINDOW_MGR_ANIMATION_OPMOVE) {
usurf->animation.next_anima = animaid;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.next_anima = animaid;
}
else {
usurf->animation.move_anima = animaid;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.move_anima = animaid;
}
}
if (type & ICO_WINDOW_MGR_ANIMATION_TYPE_RESIZE) {
if (usurf->animation.type == ICO_WINDOW_MGR_ANIMATION_OPRESIZE) {
usurf->animation.next_anima = animaid;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.next_anima = animaid;
}
else {
usurf->animation.resize_anima = animaid;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.resize_anima = animaid;
}
}
}
if ((time > 0) && (time < 10000)) {
if (type & ICO_WINDOW_MGR_ANIMATION_TYPE_HIDE) {
usurf->animation.hide_time = time;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.hide_time = time;
}
if (type & ICO_WINDOW_MGR_ANIMATION_TYPE_SHOW) {
usurf->animation.show_time = time;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.show_time = time;
}
if (type & ICO_WINDOW_MGR_ANIMATION_TYPE_MOVE) {
usurf->animation.move_time = time;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.move_time = time;
}
if (type & ICO_WINDOW_MGR_ANIMATION_TYPE_RESIZE) {
usurf->animation.resize_time = time;
+ if ((type & ICO_WINDOW_MGR_ANIMATION_TYPE_ONESHOT) == 0)
+ usurf->org_animation.resize_time = time;
}
}
}
@@ -1615,8 +1685,10 @@ win_mgr_check_mapsurface(struct weston_animation *animation,
uifw_detail("win_mgr_check_mapsurface: sm=%08x surf=%08x",
(int)sm, sm->usurf->surfaceid);
#endif
- win_mgr_change_mapsurface(sm, 0, curtime);
- if (sm->eventque) {
+ if ((sm->interval >= 0) || (sm->eventque == 0)) {
+ win_mgr_change_mapsurface(sm, 0, curtime);
+ }
+ if ((sm->interval >= 0) && (sm->eventque != 0)) {
if (sm->interval < wait) {
wait = sm->interval;
}
@@ -1666,7 +1738,7 @@ win_mgr_change_mapsurface(struct uifw_surface_map *sm, int event, uint32_t curti
int width;
int height;
uint32_t format;
- uint32_t dtime;
+ int dtime;
#if 0 /* too many log */
uifw_detail("win_mgr_change_mapsurface: surf=%08x event=%d", sm->usurf->surfaceid, event);
@@ -1755,17 +1827,28 @@ win_mgr_change_mapsurface(struct uifw_surface_map *sm, int event, uint32_t curti
uifw_perf("SWAP_BUFFER appid=%s surface=%08x CONTENTS",
sm->usurf->uclient->appid, sm->usurf->surfaceid);
#endif /*PERFORMANCE_EVALUATIONS*/
- dtime = curtime - sm->lasttime;
- if ((sm->interval > 0) && (dtime < sm->interval)) {
+ if (sm->interval < 0) {
sm->eventque = 1;
event = 0;
}
+ else if (sm->interval > 0) {
+ dtime = (int)(curtime - sm->lasttime);
+ if (dtime < sm->interval) {
+ sm->eventque = 1;
+ event = 0;
+ }
+ }
}
else if (sm->eventque) {
- dtime = curtime - sm->lasttime;
- if ((sm->interval > 0) && (dtime < sm->interval)) {
+ if (sm->interval < 0) {
event = 0;
}
+ else if (sm->interval > 0) {
+ dtime = (int)(curtime - sm->lasttime);
+ if (dtime < sm->interval) {
+ event = 0;
+ }
+ }
}
else {
event =0;
@@ -1814,19 +1897,15 @@ win_mgr_change_mapsurface(struct uifw_surface_map *sm, int event, uint32_t curti
event = ICO_WINDOW_MGR_MAP_SURFACE_EVENT_RESIZE;
}
else {
- dtime = curtime - sm->lasttime;
- if ((sm->interval > 0) && (dtime < sm->interval)) {
+ if (sm->interval < 0) {
sm->eventque = 1;
event = 0;
- uifw_detail("win_mgr_change_mapsurface: PIX %08x new queue",
- sm->usurf->surfaceid);
}
- else if (sm->eventque) {
- dtime = curtime - sm->lasttime;
- if ((sm->interval > 0) && (dtime < sm->interval)) {
+ else if (sm->interval > 0) {
+ dtime = (int)(curtime - sm->lasttime);
+ if (dtime < sm->interval) {
+ sm->eventque = 1;
event = 0;
- uifw_detail("win_mgr_change_mapsurface: PIX %08x queued",
- sm->usurf->surfaceid);
}
}
}
@@ -1866,8 +1945,8 @@ win_mgr_change_mapsurface(struct uifw_surface_map *sm, int event, uint32_t curti
event = ICO_WINDOW_MGR_MAP_SURFACE_EVENT_ERROR;
}
else {
- uifw_warn("win_mgr_change_mapsurface: surface.%08x image read(%s) OK",
- sm->usurf->surfaceid, sm->filepath);
+ uifw_trace("win_mgr_change_mapsurface: surface.%08x image read(%s) OK",
+ sm->usurf->surfaceid, sm->filepath);
}
}
ico_window_mgr_send_map_surface(sm->uclient->mgr->resource, event,
@@ -1891,6 +1970,7 @@ win_mgr_change_mapsurface(struct uifw_surface_map *sm, int event, uint32_t curti
* @param[in] resource resource of request
* @param[in] surfaceid surface id
* @param[in] framerate frame rate of surface update(frame/sec)
+ * if over 999, no change
* @param[in] filepath surface image file path(if NULL, not create file)
* @return none
*/
@@ -1975,13 +2055,13 @@ uifw_map_surface(struct wl_client *client, struct wl_resource *resource,
}
/* maximum framerate */
- if (maptype == ICO_WINDOW_MGR_MAP_TYPE_EGL) {
- if ((framerate <= 0) || (framerate > 15))
- framerate = 15;
- }
- else {
- if ((framerate <= 0) || (framerate > 5))
- framerate = 5;
+ if (framerate >= 0) {
+ if (maptype == ICO_WINDOW_MGR_MAP_TYPE_EGL) {
+ if (framerate > 30) framerate = 30;
+ }
+ else {
+ if ((framerate <= 0) || (framerate > 5)) framerate = 5;
+ }
}
/* check same surface */
@@ -2015,7 +2095,8 @@ uifw_map_surface(struct wl_client *client, struct wl_resource *resource,
sm->uclient = uclient;
sm->type = maptype;
sm->framerate = framerate;
- sm->interval = (1000 / sm->framerate) - 1;
+ if (framerate < 0) sm->interval = -1;
+ else sm->interval = (1000 / sm->framerate) - 1;
wl_list_insert(_ico_win_mgr->map_list.next, &sm->map_link);
wl_list_insert(usurf->surf_map.prev, &sm->surf_link);
}
@@ -2025,7 +2106,8 @@ uifw_map_surface(struct wl_client *client, struct wl_resource *resource,
sm->framerate, framerate);
if (sm->framerate != framerate) {
sm->framerate = framerate;
- sm->interval = (1000 / sm->framerate) - 1;
+ if (framerate < 0) sm->interval = -1;
+ else sm->interval = (1000 / sm->framerate) - 1;
win_mgr_change_mapsurface(sm, 0, weston_compositor_get_time());
}
return;
@@ -2153,6 +2235,104 @@ uifw_unmap_surface(struct wl_client *client, struct wl_resource *resource,
/*--------------------------------------------------------------------------*/
/**
+ * @brief uifw_layout_surface: direct layout surface
+ *
+ * @param[in] client Weyland client
+ * @param[in] resource resource of request
+ * @param[in] surfaceid surface id
+ * @param[in] layerid layer id
+ * @param[in] x X
+ * @param[in] y Y
+ * @param[in] width width
+ * @param[in] height height
+ * @param[in] visible visiblity
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+static void
+uifw_layout_surface(struct wl_client *client, struct wl_resource *resource,
+ uint32_t surfaceid, uint32_t layerid, int x, int y,
+ int width, int height, int visible)
+{
+ struct uifw_win_surface *usurf;
+ struct weston_layout_layer *layout_layer;
+ int32_t position[2];
+ uint32_t dimension[2];
+
+ uifw_trace("uifw_layout_surface: Enter(surf=%08x,layer=%d,x/y=%d/%d,w/h=%d,%d,vis=%d)",
+ surfaceid, layerid, x, y, width, height, visible);
+
+ usurf = ico_window_mgr_get_usurf_client(surfaceid, client);
+ if (! usurf) {
+ /* surface dose not exist, error */
+ uifw_trace("uifw_layout_surface: Leave(surface=%08x dose not exist)", surfaceid);
+ return;
+ }
+ if (layerid) {
+ layout_layer = weston_layout_getLayerFromId(layerid);
+ if (! layout_layer) {
+ /* layer dose not exist */
+ uifw_trace("uifw_layout_surface: Leave(layer=%d dose not exist)", layerid);
+ return;
+ }
+ if (weston_layout_layerAddSurface(layout_layer, usurf->ivisurf) == 0) {
+ if (weston_layout_layerSetVisibility(layout_layer, 1) != 0) {
+ uifw_warn("uifw_layout_surface: layer(%d) visible Error", layerid);
+ }
+ }
+ else {
+ uifw_warn("uifw_layout_surface: can not add surface(%08x) to layer(%d)",
+ usurf->surfaceid, layerid);
+ }
+ }
+
+ if ((x >= 0) && (y >= 0) && (width > 0) && (height > 0)) {
+ if (weston_layout_surfaceSetSourceRectangle(usurf->ivisurf,
+ 0, 0, width, height) != 0) {
+ uifw_warn("uifw_layout_surface: surface(%08x) can not set source",
+ usurf->surfaceid);
+ }
+ if (weston_layout_surfaceSetDestinationRectangle(usurf->ivisurf,
+ x, y, width, height) != 0) {
+ uifw_warn("uifw_layout_surface: surface(%08x) can not set destination",
+ usurf->surfaceid);
+ }
+ }
+ else if ((x >= 0) && (y >= 0)) {
+ position[0] = x;
+ position[1] = y;
+ if (weston_layout_surfaceSetPosition(usurf->ivisurf, position) != 0) {
+ uifw_warn("uifw_layout_surface: surface(%08x) can not set source position",
+ usurf->surfaceid);
+ }
+ }
+ else if ((width > 0) && (height > 0)) {
+ if (weston_layout_surfaceSetSourceRectangle(usurf->ivisurf,
+ 0, 0, width, height) != 0) {
+ uifw_warn("uifw_layout_surface: surface(%08x) can not set source",
+ usurf->surfaceid);
+ }
+ dimension[0] = width;
+ dimension[1] = height;
+ if (weston_layout_surfaceSetDimension(usurf->ivisurf, dimension) != 0) {
+ uifw_warn("uifw_layout_surface: surface(%08x) can not set destination size",
+ usurf->surfaceid);
+ }
+ }
+ if (visible >= 0) {
+ if (weston_layout_surfaceSetVisibility(usurf->ivisurf, visible) != 0) {
+ uifw_warn("uifw_layout_surface: surface(%08x) can not set visibility",
+ usurf->surfaceid);
+ }
+ }
+ if (weston_layout_commitChanges() != 0) {
+ uifw_warn("uifw_layout_surface: surface(%08x) commit Error", usurf->surfaceid);
+ }
+ uifw_trace("uifw_layout_surface: Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief win_mgr_destroy_surface: surface destroy
*
* @param[in] surface Weston surface
@@ -2174,6 +2354,12 @@ win_mgr_destroy_surface(struct weston_surface *surface)
}
uifw_trace("win_mgr_destroy_surface: Enter(%08x) %08x", (int)surface, usurf->surfaceid);
+ /* remove notification listener */
+ if (weston_layout_surfaceRemoveNotification(usurf->ivisurf) != 0) {
+ uifw_warn("win_mgr_destroy_surface: weston_layout_surfaceRemoveNotification(%08x)"
+ " Error", usurf->surfaceid);
+ }
+
/* destory input region */
if (win_mgr_hook_destory) {
(*win_mgr_hook_destory)(usurf);
@@ -2312,7 +2498,7 @@ win_mgr_takeSurfaceScreenshot(const char *filename, struct uifw_win_surface *usu
if (fd < 0) {
uifw_warn("win_mgr_takeSurfaceScreenshot: Leave(file<%s> open Error<%d>)",
filename, errno);
- if (wkbuf) free(wkbuf);
+ free(wkbuf);
return -1;
}
@@ -2325,7 +2511,7 @@ win_mgr_takeSurfaceScreenshot(const char *filename, struct uifw_win_surface *usu
0, 0, width, height) != 0) {
close(fd);
uifw_warn("win_mgr_takeSurfaceScreenshot: Leave(read_surface_pixels Error)");
- if (wkbuf) free(wkbuf);
+ free(wkbuf);
return -1;
}
uifw_detail("win_mgr_takeSurfaceScreenshot: end read_surface_pixels");
@@ -2363,7 +2549,6 @@ win_mgr_takeSurfaceScreenshot(const char *filename, struct uifw_win_surface *usu
uifw_warn("win_mgr_takeSurfaceScreenshot: Leave(file<%s> write Error<%d>)",
filename, errno);
close(fd);
- if (wkbuf) free(wkbuf);
return -1;
}
}
@@ -2736,7 +2921,7 @@ module_init(struct weston_compositor *ec, int *argc, char *argv[])
_ico_node_table[i].disp_x, _ico_node_table[i].disp_y,
_ico_node_table[i].disp_width, _ico_node_table[i].disp_height);
}
- if (displayno) free(displayno);
+ free(displayno);
/* my node Id ... this version fixed 0 */
nodeId = ico_ivi_get_mynode();
diff --git a/src/ico_window_mgr_private.h b/src/ico_window_mgr_private.h
index 99f3b65..6e3aeff 100644
--- a/src/ico_window_mgr_private.h
+++ b/src/ico_window_mgr_private.h
@@ -78,8 +78,8 @@ struct uifw_surface_map {
uint16_t width; /* width */
uint16_t height; /* height */
uint16_t stride; /* stride */
- uint16_t framerate; /* update frame rate (frame/sec) */
- uint16_t interval; /* interval time (ms) */
+ int16_t framerate; /* update frame rate (frame/sec) */
+ int16_t interval; /* interval time (ms) */
uint32_t lasttime; /* last event time (ms) */
char initflag; /* map event send flag(0=no/1=yes) */
char eventque; /* send event queue flag */
@@ -88,6 +88,51 @@ struct uifw_surface_map {
struct wl_list surf_link; /* surface map list from UIFW surface */
};
+/* Animation information */
+struct uifw_win_surface_animation { /* wndow animation */
+ struct weston_animation animation; /* weston animation control */
+ uint16_t type; /* current animation type */
+ uint16_t anima; /* curremt animation Id */
+ uint16_t next_anima; /* next animation Id */
+ uint16_t hide_anima; /* animation Id for hide */
+ uint16_t hide_time; /* animation time(ms) for hide */
+ uint16_t show_anima; /* animation Id for show */
+ uint16_t show_time; /* animation time(ms) for show */
+ uint16_t move_anima; /* animation Id for move */
+ uint16_t move_time; /* animation time(ms) for move */
+ uint16_t resize_anima; /* animation Id for resize */
+ uint16_t resize_time; /* animation time(ms) for resize */
+ uint16_t time; /* current animation time(ms) */
+ uint16_t pos_x; /* start/end X-coordinate */
+ uint16_t pos_y; /* start/end Y-coordinate */
+ uint16_t pos_width; /* start/end width */
+ uint16_t pos_height; /* start/end height */
+ float alpha; /* original alpha */
+ short current; /* animation current percentage */
+ char state; /* animation state */
+ char visible; /* need hide(1)/show(2) at end of animation*/
+ char restrain_configure; /* restrain surface resize */
+ char ahalf; /* after half */
+ char no_configure; /* no send configure to client */
+ char res; /* (unused) */
+ uint32_t starttime; /* start time(ms) */
+ void *animadata; /* animation data */
+};
+struct uifw_win_surface_anima_save { /* wndow animation save */
+ uint16_t saved; /* flag for original saved */
+ uint16_t type; /* current animation type */
+ uint16_t anima; /* curremt animation Id */
+ uint16_t next_anima; /* next animation Id */
+ uint16_t hide_anima; /* animation Id for hide */
+ uint16_t hide_time; /* animation time(ms) for hide */
+ uint16_t show_anima; /* animation Id for show */
+ uint16_t show_time; /* animation time(ms) for show */
+ uint16_t move_anima; /* animation Id for move */
+ uint16_t move_time; /* animation time(ms) for move */
+ uint16_t resize_anima; /* animation Id for resize */
+ uint16_t resize_time; /* animation time(ms) for resize */
+};
+
/* UIFW surface */
struct shell_surface;
struct weston_layout_surface;
@@ -110,35 +155,10 @@ struct uifw_win_surface {
char visible; /* visibility */
char restrain_configure; /* restrant configure event */
char res[1]; /* (unused) */
- struct _uifw_win_surface_animation { /* wndow animation */
- struct weston_animation animation; /* weston animation control */
- uint16_t type; /* current animation type */
- uint16_t anima; /* curremt animation Id */
- uint16_t next_anima; /* next animation Id */
- uint16_t hide_anima; /* animation Id for hide */
- uint16_t hide_time; /* animation time(ms) for hide */
- uint16_t show_anima; /* animation Id for show */
- uint16_t show_time; /* animation time(ms) for show */
- uint16_t move_anima; /* animation Id for move */
- uint16_t move_time; /* animation time(ms) for move */
- uint16_t resize_anima; /* animation Id for resize */
- uint16_t resize_time; /* animation time(ms) for resize */
- uint16_t time; /* current animation time(ms) */
- uint16_t pos_x; /* start/end X-coordinate */
- uint16_t pos_y; /* start/end Y-coordinate */
- uint16_t pos_width; /* start/end width */
- uint16_t pos_height; /* start/end height */
- float alpha; /* original alpha */
- short current; /* animation current percentage */
- char state; /* animation state */
- char visible; /* need hide(1)/show(2) at end of animation*/
- char restrain_configure; /* restrain surface resize */
- char ahalf; /* after half */
- char no_configure; /* no send configure to client */
- char res; /* (unused) */
- uint32_t starttime; /* start time(ms) */
- void *animadata; /* animation data */
- } animation;
+ struct uifw_win_surface_animation
+ animation; /* window animation information */
+ struct uifw_win_surface_anima_save
+ org_animation; /* save original wndow animation */
struct wl_list client_link; /* surface list of same client */
struct wl_list surf_map; /* surface map list */
struct wl_list input_region; /* surface input region list */