[PATCH] protocol: add state set functions for maximized and fullscreen.
antognolli at gmail.com
antognolli at gmail.com
Mon Jun 24 14:07:05 PDT 2013
From: Rafael Antognolli <rafael.antognolli at intel.com>
These functions only differ from the previous one because they request
that the given state is set, without changing the surface type, thus
removing any previously state that was set on it.
Both states can be used at the same time, and the states can be set or
unset independently.
---
protocol/wayland.xml | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 3d4ec9b..30086f1 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -853,6 +853,100 @@
<arg name="class_" type="string"/>
</request>
+ <request name="state_set_maximized">
+ <description summary="set the surface maximized state">
+ Set the surface state as maximized.
+
+ If an output parameter is given then the surface will be
+ maximized on that output. If the client does not specify the
+ output then the compositor will apply its policy - usually
+ choosing the output on which the surface has the biggest surface
+ area.
+
+ The compositor will reply with a configure event telling
+ the expected new surface size. The operation is completed
+ on the next buffer attach to this surface.
+
+ A maximized surface typically fills the entire output it is
+ bound to, except for desktop element such as panels. This is
+ the main difference between a maximized shell surface and a
+ fullscreen shell surface.
+
+ The details depend on the compositor implementation.
+
+ This state can be set while other surface states are still set,
+ and it won't unset them.
+ </description>
+ <arg name="output" type="object" interface="wl_output" allow-null="true"/>
+ </request>
+
+ <request name="state_unset_maximized">
+ <description summary="unset the surface maximized state">
+ Unset the surface as maximized.
+
+ The surface will be mapped to the corresponding state that has
+ more precedence (e.g. if fullscreen is still set, the surface
+ will be mapped as fullscreen, otherwise as a simple toplevel
+ surface).
+ </description>
+ </request>
+
+ <request name="state_set_fullscreen">
+ <description summary="set the surface fullscreen state">
+ Set the surface state as fullscreen.
+
+ If an output parameter is given then the surface will be made
+ fullscreen on that output. If the client does not specify the
+ output then the compositor will apply its policy - usually
+ choosing the output on which the surface has the biggest surface
+ area.
+
+ The client may specify a method to resolve a size conflict
+ between the output size and the surface size - this is provided
+ through the method parameter.
+
+ The framerate parameter is used only when the method is set
+ to "driver", to indicate the preferred framerate. A value of 0
+ indicates that the app does not care about framerate. The
+ framerate is specified in mHz, that is framerate of 60000 is 60Hz.
+
+ A method of "scale" or "driver" implies a scaling operation of
+ the surface, either via a direct scaling operation or a change of
+ the output mode. This will override any kind of output scaling, so
+ that mapping a surface with a buffer size equal to the mode can
+ fill the screen independent of buffer_scale.
+
+ A method of "fill" means we don't scale up the buffer, however
+ any output scale is applied. This means that you may run into
+ an edge case where the application maps a buffer with the same
+ size of the output mode but buffer_scale 1 (thus making a
+ surface larger than the output). In this case it is allowed to
+ downscale the results to fit the screen.
+
+ 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.
+
+ This state can be set while other surface states are still set,
+ and it won't unset them. It has precedence over maximized, and
+ the surface will be kept fullscreen until unset.
+ </description>
+ <arg name="method" type="uint"/>
+ <arg name="framerate" type="uint"/>
+ <arg name="output" type="object" interface="wl_output" allow-null="true"/>
+ </request>
+
+ <request name="state_unset_fullscreen">
+ <description summary="unset the surface fullscreen state">
+ Unset the surface as maximized.
+
+ The surface will be mapped to the corresponding state that has
+ more precedence (e.g. if maximized is still set, the surface
+ will be mapped as maximized, otherwise as a simple toplevel
+ surface).
+ </description>
+ </request>
+
<event name="ping">
<description summary="ping client">
Ping a client to check if it is receiving events and sending
--
1.7.11.7
More information about the wayland-devel
mailing list