Add wl_shell support for maximized views

This commit is contained in:
emersion 2017-11-09 20:06:05 +01:00
parent 758514fe5d
commit 26dadacb71
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
5 changed files with 36 additions and 10 deletions

View file

@ -171,7 +171,6 @@ static void shell_surface_destroy_popup_state(
}
}
static void shell_surface_protocol_resize(struct wl_client *client,
struct wl_resource *resource, struct wl_resource *seat_resource,
uint32_t serial, enum wl_shell_surface_resize edges) {
@ -287,9 +286,8 @@ static void shell_surface_protocol_set_fullscreen(struct wl_client *client,
output = wl_resource_get_user_data(output_resource);
}
if (surface->state == WLR_WL_SHELL_SURFACE_STATE_TOPLEVEL) {
return;
}
shell_surface_set_state(surface, WLR_WL_SHELL_SURFACE_STATE_FULLSCREEN,
NULL, NULL);
struct wlr_wl_shell_surface_set_fullscreen_event *event =
calloc(1, sizeof(struct wlr_wl_shell_surface_set_fullscreen_event));
@ -377,9 +375,8 @@ static void shell_surface_protocol_set_maximized(struct wl_client *client,
output = wl_resource_get_user_data(output_resource);
}
if (surface->state == WLR_WL_SHELL_SURFACE_STATE_TOPLEVEL) {
return;
}
shell_surface_set_state(surface, WLR_WL_SHELL_SURFACE_STATE_MAXIMIZED,
NULL, NULL);
struct wlr_wl_shell_surface_set_maximized_event *event =
calloc(1, sizeof(struct wlr_wl_shell_surface_set_maximized_event));