Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
xdg-shell: fix notes for wlr_xdg_toplevel.requested
Browse files Browse the repository at this point in the history
The requested properties can be read by compositors on any relevant
event (set_maximized, set_fullscreen etc), not just surface map.
Reading `minimized` only makes sense on surface map, as the compositor
can't handle set_minimized events before that.
  • Loading branch information
Kirill Primak committed Oct 1, 2021
1 parent 20d9448 commit a5770fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/wlr/types/wlr_xdg_shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit a5770fd

Please sign in to comment.