diff --git a/protocol/xdg-shell.xml b/protocol/xdg-shell.xml index e1249b06e..4e5cff8df 100644 --- a/protocol/xdg-shell.xml +++ b/protocol/xdg-shell.xml @@ -223,9 +223,6 @@ area might adjust its content position to leave the viewable content unmoved). Valid edge values are from resize_edge enum. - The maximized parameter informs if the surface is in a maximized - state. Same for the fullscreen parameter. - The client is free to dismiss all but the last configure event it received. @@ -236,8 +233,6 @@ - - @@ -255,16 +250,43 @@ + + + Event sent from the compositor to the client requesting that the client + goes to a fullscreen state. It's the client job to call set_fullscreen + and really trigger the fullscreen state. + + + + + + Event sent from the compositor to the client requesting that the client + leaves the fullscreen state. It's the client job to call + unset_fullscreen and really leave the fullscreen state. + + + Set the surface as fullscreen. - The compositor must reply to this request with a configure event - with the dimensions for the output on which the surface will be - made fullscreen. + After this request, the compositor should send a configure event + informing the output size. - Once the fullscreen state is set, a "fullscreen_set" event will - be sent to the client. + This request informs the compositor that the next attached buffer + committed will be in a fullscreen state. The buffer size should be the + same size as the size informed in the configure event, if the client + doesn't want to leave any empty area. + + In other words: the next attached buffer after set_maximized is the new + maximized buffer. And the surface will be positioned at the maximized + position on commit. + + A simple way to synchronize and wait for the correct configure event is + to use a wl_display.sync request right after the set_fullscreen + request. When the sync callback returns, the last configure event + received just before it will be the correct one, and should contain the + right size for the surface to maximize. Setting one state won't unset another state. Use xdg_surface.unset_fullscreen for unsetting it. @@ -274,19 +296,48 @@ Unset the surface fullscreen state. + + Same negotiation as set_fullscreen must be used. + + + Event sent from the compositor to the client requesting that the client + goes to a maximized state. It's the client job to call set_maximized + and really trigger the maximized state. + + + + + + Event sent from the compositor to the client requesting that the client + leaves the maximized state. It's the client job to call unset_maximized + and really leave the maximized state. + + + Set the surface as maximized. - The compositor must reply to this request with a configure event - with the dimensions for the output on which the surface will be - made maximized. + After this request, the compositor will send a configure event + informing the output size minus panel and other MW decorations. - Once the maximized state is set, a "maximized_set" event will be - sent to the client. + This request informs the compositor that the next attached buffer + committed will be in a maximized state. The buffer size should be the + same size as the size informed in the configure event, if the client + doesn't want to leave any empty area. + + In other words: the next attached buffer after set_maximized is the new + maximized buffer. And the surface will be positioned at the maximized + position on commit. + + A simple way to synchronize and wait for the correct configure event is + to use a wl_display.sync request right after the set_maximized request. + When the sync callback returns, the last configure event received just + before it will be the correct one, and should contain the right size + for the surface to maximize. Setting one state won't unset another state. Use xdg_surface.unset_maximized for unsetting it. @@ -296,6 +347,8 @@ Unset the surface maximized state. + + Same negotiation as set_maximized must be used. diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 832c700b2..7452c42bf 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -1161,9 +1161,7 @@ meta_wayland_surface_configure_notify (MetaWaylandSurface *surface, { if (surface->xdg_surface.resource) xdg_surface_send_configure (surface->xdg_surface.resource, - edges, new_width, new_height, - meta_window_get_maximized (surface->window), - meta_window_is_fullscreen (surface->window)); + edges, new_width, new_height); } void