Code Review
/
src
/
agl-compositor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
layout: Inform client to resize for fullscreen roles
[src/agl-compositor.git]
/
src
/
shell.c
diff --git
a/src/shell.c
b/src/shell.c
index
048cbeb
..
bf14302
100644
(file)
--- a/
src/shell.c
+++ b/
src/shell.c
@@
-613,9
+613,9
@@
ivi_check_pending_desktop_surface_remote(struct ivi_surface *surface)
return false;
}
return false;
}
-
-bool
-
ivi_check_pending_surface(struct ivi_surface *surfac
e)
+void
+ivi_check_pending_surface_desktop(struct ivi_surface *surface,
+
enum ivi_surface_role *rol
e)
{
struct ivi_compositor *ivi = surface->ivi;
struct wl_list *role_pending_list;
{
struct ivi_compositor *ivi = surface->ivi;
struct wl_list *role_pending_list;
@@
-626,39
+626,45
@@
ivi_check_pending_surface(struct ivi_surface *surface)
const char *app_id =
weston_desktop_surface_get_app_id(surface->dsurface);
const char *app_id =
weston_desktop_surface_get_app_id(surface->dsurface);
- if (!app_id)
- return false;
+ if (!app_id) {
+ *role = IVI_SURFACE_ROLE_NONE;
+ return;
+ }
role_pending_list = &ivi->popup_pending_apps;
wl_list_for_each(p_popup, role_pending_list, link) {
if (!strcmp(app_id, p_popup->app_id)) {
role_pending_list = &ivi->popup_pending_apps;
wl_list_for_each(p_popup, role_pending_list, link) {
if (!strcmp(app_id, p_popup->app_id)) {
- return true;
+ *role = IVI_SURFACE_ROLE_POPUP;
+ return;
}
}
role_pending_list = &ivi->split_pending_apps;
wl_list_for_each(p_split, role_pending_list, link) {
if (!strcmp(app_id, p_split->app_id)) {
}
}
role_pending_list = &ivi->split_pending_apps;
wl_list_for_each(p_split, role_pending_list, link) {
if (!strcmp(app_id, p_split->app_id)) {
- return true;
+ *role = IVI_SURFACE_ROLE_SPLIT_V;
+ return;
}
}
role_pending_list = &ivi->fullscreen_pending_apps;
wl_list_for_each(p_fullscreen, role_pending_list, link) {
if (!strcmp(app_id, p_fullscreen->app_id)) {
}
}
role_pending_list = &ivi->fullscreen_pending_apps;
wl_list_for_each(p_fullscreen, role_pending_list, link) {
if (!strcmp(app_id, p_fullscreen->app_id)) {
- return true;
+ *role = IVI_SURFACE_ROLE_FULLSCREEN;
+ return;
}
}
role_pending_list = &ivi->remote_pending_apps;
wl_list_for_each(p_remote, role_pending_list, link) {
if (!strcmp(app_id, p_remote->app_id)) {
}
}
role_pending_list = &ivi->remote_pending_apps;
wl_list_for_each(p_remote, role_pending_list, link) {
if (!strcmp(app_id, p_remote->app_id)) {
- return true;
+ *role = IVI_SURFACE_ROLE_REMOTE;
+ return;
}
}
/* else, we are a regular desktop surface */
}
}
/* else, we are a regular desktop surface */
-
return false
;
+
*role = IVI_SURFACE_ROLE_DESKTOP
;
}
}
@@
-876,9
+882,13
@@
create_black_surface_view(struct ivi_output *output)
return;
surface = weston_surface_create(wc);
return;
surface = weston_surface_create(wc);
+ if (!surface)
+ return;
view = weston_view_create(surface);
view = weston_view_create(surface);
-
- assert(view || surface);
+ if (!view) {
+ weston_surface_destroy(surface);
+ return;
+ }
weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1);
weston_surface_set_size(surface, woutput->width, woutput->height);
weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1);
weston_surface_set_size(surface, woutput->width, woutput->height);