X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fshell.c;h=c29d89eabf2416548536d961735f1be1bd8b25bf;hb=7ec377fb843d18ac29cd756b5833d94185706602;hp=9b1735312f0d46e4260f463d38866b9e83094967;hpb=6d2720303d8441525ba2e37c9d87daef568f8cdc;p=src%2Fagl-compositor.git diff --git a/src/shell.c b/src/shell.c index 9b17353..c29d89e 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1,5 +1,5 @@ /* - * Copyright © 2019, 2022 Collabora, Ltd. + * Copyright © 2019, 2022, 2024 Collabora, Ltd. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -803,9 +803,9 @@ ivi_shell_advertise_xdg_surfaces(struct ivi_compositor *ivi, struct wl_resource static struct wl_client * client_launch(struct weston_compositor *compositor, - struct weston_process *proc, + struct wet_process *proc, const char *path, - weston_process_cleanup_func_t cleanup) + wet_process_cleanup_func_t cleanup) { struct wl_client *client = NULL; struct custom_env child_env; @@ -910,14 +910,14 @@ client_launch(struct weston_compositor *compositor, } struct process_info { - struct weston_process proc; + struct wet_process proc; char *path; }; int sigchld_handler(int signal_number, void *data) { - struct weston_process *p; + struct wet_process *p; struct ivi_compositor *ivi = data; int status; pid_t pid; @@ -935,7 +935,7 @@ sigchld_handler(int signal_number, void *data) wl_list_remove(&p->link); wl_list_init(&p->link); - p->cleanup(p, status); + p->cleanup(p, status, NULL); } if (pid < 0 && errno != ECHILD) @@ -946,7 +946,7 @@ sigchld_handler(int signal_number, void *data) static void -process_handle_sigchld(struct weston_process *process, int status) +process_handle_sigchld(struct wet_process *process, int status, void *data) { struct process_info *pinfo = container_of(process, struct process_info, proc); @@ -1103,6 +1103,7 @@ void remove_black_curtain(struct ivi_output *output) { struct weston_view *view; + struct weston_surface *wsurface; if ((!output && !output->fullscreen_view.fs && @@ -1113,17 +1114,13 @@ remove_black_curtain(struct ivi_output *output) } view = output->fullscreen_view.fs->view; + wsurface = view->surface; assert(view->is_mapped == true || view->surface->is_mapped == true); - view->is_mapped = false; - view->surface->is_mapped = false; - - weston_layer_entry_remove(&view->layer_link); - weston_view_update_transform(view); - - weston_view_damage_below(view); + weston_surface_unmap(wsurface); + weston_view_move_to_layer(view, NULL); weston_log("Removed black curtain from output %s\n", output->output->name); } @@ -1131,6 +1128,7 @@ void insert_black_curtain(struct ivi_output *output) { struct weston_view *view; + struct weston_surface *wsurface; if ((!output && !output->fullscreen_view.fs && @@ -1141,19 +1139,12 @@ insert_black_curtain(struct ivi_output *output) } view = output->fullscreen_view.fs->view; + wsurface = view->surface; if (view->is_mapped || view->surface->is_mapped) return; - weston_layer_entry_remove(&view->layer_link); - weston_layer_entry_insert(&output->ivi->fullscreen.view_list, - &view->layer_link); - - view->is_mapped = true; - view->surface->is_mapped = true; - - weston_view_update_transform(view); - weston_view_damage_below(view); - + weston_surface_map(wsurface); + weston_view_move_to_layer(view, &output->ivi->fullscreen.view_list); weston_log("Added black curtain to output %s\n", output->output->name); } @@ -1866,6 +1857,7 @@ _ivi_set_shell_surface_split(struct ivi_surface *surface, struct ivi_output *iou struct weston_view *ev = surface->view; struct weston_geometry geom = {}; struct ivi_output *output = NULL; + struct weston_coord_global pos; int new_width, new_height; int x, y; @@ -1970,7 +1962,10 @@ _ivi_set_shell_surface_split(struct ivi_surface *surface, struct ivi_output *iou ivi_shell_activate_surface(surface, ivi_seat, WESTON_ACTIVATE_FLAG_NONE); } - weston_view_set_position(surface->view, x, y); + pos.c.x = x; + pos.c.y = y; + + weston_view_set_position(surface->view, pos); weston_desktop_surface_set_size(surface->dsurface, new_width, new_height); weston_desktop_surface_set_orientation(surface->dsurface, orientation); surface->orientation = orientation;