diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index 2ca7e203f9..b0693750c9 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -114,6 +114,9 @@ struct wlr_xdg_toplevel_configure { }; struct wlr_xdg_toplevel_requested { + // Note that the client has no means to unset minimization + // of a surface, so `minimized` can only be set to `true` and + // is supposed to be read on surface map. bool maximized, minimized, fullscreen; struct wlr_output *fullscreen_output; struct wl_listener fullscreen_output_destroy; @@ -133,8 +136,7 @@ struct wlr_xdg_toplevel { struct wlr_xdg_toplevel_configure scheduled; // Properties that the client has requested. Intended to be checked - // by the compositor on surface map and handled accordingly - // (e.g. a client might want to start already in a fullscreen state). + // by the compositor and handled accordingly. struct wlr_xdg_toplevel_requested requested; char *title; @@ -240,12 +242,6 @@ struct wlr_xdg_toplevel_resize_event { uint32_t edges; }; -struct wlr_xdg_toplevel_set_fullscreen_event { - struct wlr_xdg_surface *surface; - bool fullscreen; - struct wlr_output *output; -}; - struct wlr_xdg_toplevel_show_window_menu_event { struct wlr_xdg_surface *surface; struct wlr_seat_client *seat; diff --git a/types/xdg_shell/wlr_xdg_toplevel.c b/types/xdg_shell/wlr_xdg_toplevel.c index b5a7239b0e..0a31294d01 100644 --- a/types/xdg_shell/wlr_xdg_toplevel.c +++ b/types/xdg_shell/wlr_xdg_toplevel.c @@ -378,13 +378,7 @@ static void xdg_toplevel_handle_set_fullscreen(struct wl_client *client, store_fullscreen_requested(surface, true, output); - struct wlr_xdg_toplevel_set_fullscreen_event event = { - .surface = surface, - .fullscreen = true, - .output = output, - }; - - wlr_signal_emit_safe(&surface->toplevel->events.request_fullscreen, &event); + wlr_signal_emit_safe(&surface->toplevel->events.request_fullscreen, surface); wlr_xdg_surface_schedule_configure(surface); } @@ -395,13 +389,7 @@ static void xdg_toplevel_handle_unset_fullscreen(struct wl_client *client, store_fullscreen_requested(surface, false, NULL); - struct wlr_xdg_toplevel_set_fullscreen_event event = { - .surface = surface, - .fullscreen = false, - .output = NULL, - }; - - wlr_signal_emit_safe(&surface->toplevel->events.request_fullscreen, &event); + wlr_signal_emit_safe(&surface->toplevel->events.request_fullscreen, surface); wlr_xdg_surface_schedule_configure(surface); }