diff options
author | emersion <contact@emersion.fr> | 2017-09-27 15:03:35 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-09-27 15:03:35 +0200 |
commit | e001e400221115b0fe41fb48df48e85a2ec4f6ba (patch) | |
tree | 831873093cf6da5620047bdc3358bfbbc5573a0c | |
parent | acf58e04de5652ed13ec46458a39a4dd97ba3b78 (diff) |
Set view->surface
-rw-r--r-- | examples/compositor.c | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_wl_shell.h | 4 | ||||
-rw-r--r-- | rootston/wl_shell.c | 2 | ||||
-rw-r--r-- | types/wlr_wl_shell.c | 16 |
4 files changed, 12 insertions, 12 deletions
diff --git a/examples/compositor.c b/examples/compositor.c index 6f28b193..14831820 100644 --- a/examples/compositor.c +++ b/examples/compositor.c @@ -290,7 +290,7 @@ static void handle_output_frame(struct output_state *output, struct wlr_wl_shell_surface *wl_shell_surface; wl_list_for_each(wl_shell_surface, &sample->wl_shell->surfaces, link) { output_frame_handle_surface(sample, wlr_output, ts, - wl_shell_surface->surface, 200, 200); + wl_shell_surface->resource, 200, 200); } struct wlr_xdg_surface_v6 *xdg_surface; struct wlr_xdg_client_v6 *xdg_client; diff --git a/include/wlr/types/wlr_wl_shell.h b/include/wlr/types/wlr_wl_shell.h index 614d785b..d5b8a982 100644 --- a/include/wlr/types/wlr_wl_shell.h +++ b/include/wlr/types/wlr_wl_shell.h @@ -19,8 +19,8 @@ struct wlr_wl_shell { struct wlr_wl_shell_surface { struct wlr_wl_shell *shell; struct wl_client *client; - struct wl_resource *surface; - struct wlr_texture *wlr_texture; + struct wl_resource *resource; + struct wlr_surface *surface; struct wl_list link; uint32_t ping_serial; diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c index 0929a999..67c8f609 100644 --- a/rootston/wl_shell.c +++ b/rootston/wl_shell.c @@ -27,7 +27,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) { view->x = view->y = 200; view->wl_shell_surface = surface; view->roots_wl_shell_surface = roots_surface; - //view->wlr_surface = surface->surface; + view->wlr_surface = surface->surface; //view->get_input_bounds = get_input_bounds; //view->activate = activate; view->desktop = desktop; diff --git a/types/wlr_wl_shell.c b/types/wlr_wl_shell.c index 42a906c9..b2a4dc28 100644 --- a/types/wlr_wl_shell.c +++ b/types/wlr_wl_shell.c @@ -96,9 +96,9 @@ static int wlr_wl_shell_surface_ping_timeout(void *user_data) { static void wl_shell_get_shell_surface(struct wl_client *client, struct wl_resource *resource, uint32_t id, - struct wl_resource *surface) { - struct wlr_texture *wlr_texture = wl_resource_get_user_data(surface); - struct wlr_wl_shell *wlr_wl_shell = wl_resource_get_user_data(resource); + struct wl_resource *surface_resource) { + struct wlr_surface *surface = wl_resource_get_user_data(surface_resource); + struct wlr_wl_shell *wl_shell = wl_resource_get_user_data(resource); struct wlr_wl_shell_surface *state = calloc(1, sizeof(struct wlr_wl_shell_surface)); if (state == NULL) { @@ -106,9 +106,9 @@ static void wl_shell_get_shell_surface(struct wl_client *client, return; } - state->shell = wlr_wl_shell; + state->shell = wl_shell; state->client = client; - state->wlr_texture = wlr_texture; + state->resource = surface_resource; state->surface = surface; struct wl_resource *shell_surface_resource = wl_resource_create(client, @@ -127,8 +127,8 @@ static void wl_shell_get_shell_surface(struct wl_client *client, wl_client_post_no_memory(client); } - wl_list_insert(&wlr_wl_shell->surfaces, &state->link); - wl_signal_emit(&wlr_wl_shell->events.new_surface, state); + wl_list_insert(&wl_shell->surfaces, &state->link); + wl_signal_emit(&wl_shell->events.new_surface, state); } static struct wl_shell_interface wl_shell_impl = { @@ -200,5 +200,5 @@ void wlr_wl_shell_surface_ping(struct wlr_wl_shell_surface *surface) { wl_display_next_serial(wl_client_get_display(surface->client)); wl_event_source_timer_update(surface->ping_timer, surface->shell->ping_timeout); - wl_shell_surface_send_ping(surface->surface, surface->ping_serial); + wl_shell_surface_send_ping(surface->resource, surface->ping_serial); } |