Review: FULLSCREEN_MONITORS Hint



Hello,

My colleague David Trowbridge has been communicating on the wm-spec list about a FULLSCREEN_MONITORS hint, which would allow a fullscreen window to stretch over multiple monitors. We here on the VMware Linux UI team need such a hint to provide a more reliable multi-monitor experience in our Linux desktop products.

The basic idea: windows can specify a list of monitor indexes. If they do, they will be stretched over the monitors when fullscreened. Implementing this functionality is straightforward; we have preliminary patches for Metacity, Enlightenment, Fluxbox, and fvwm. Philip Langdale will probably implement for Sawfish. A kwin developer has also expressed willingness to help.

See what we propose adding below, and diff attached. I'm pretty new to all this, so comment/correct as necessary. One issue: the size of XClientMessageEvent.data is limited to 20 bytes. It seems reasonable to me that systems will have no more than 255 monitors, and that clients of FULLSCREEN_MONITORS will not specify more than 18 monitors to use while in fullscreen. Let me know if this isn't safe, or if there's a better way to reliably specify some subset of a system's monitors.

Thanks very much!


grant


    <sect2>
		<title>_NET_WM_FULLSCREEN_MONITORS</title>
		<programlisting><![CDATA[
_NET_WM_FULLSCREEN_MONITORS, CARDINAL[]/32
]]></programlisting>
      <para>
A read-only list of monitor indeces indicating which monitors the window should
stretch over when fullscreened. The window must cover the union of all
monitors indicated in the list.
      </para>
      <para>
An empty list indicates that the Window Manager should obey normal fullscreen
conventions; that is, the window should be stretched over the monitor
it was in when it entered fullscreen.
      </para>
      <para>
When placing children of the window (i.e. popup dialogs), the Window Manager
centers them on the monitor containing the mouse cursor, provided
this is a monitor listed in _NET_WM_FULLSCREEN_MONITORS. If not, children
are placed on the first monitor indicated in the list.
      </para>
      <para>
A Client wishing to change this list MUST send a _NET_WM_FULLSCREEN_MONITORS
client message to the root window. The Window Manager MUST
keep this list updated to reflect the current state of the window.
      </para>
<programlisting><![CDATA[
  window  = the respective client window
  message_type = _NET_WM_FULLSCREEN_MONITORS
  format = 32
  data.b[0] = number of monitors (n) in the list
  data.b[1] = first monitor in the list
  data.b[2] = second monitor in the list
  ...
  data.b[n+1] = source indication
  other data.b[] elements = 0
]]></programlisting>
      <para>
See <xref linkend="sourceindication"/> for details on the source indication.
      </para>
   	</sect2>
--- wm-spec-old.xml	2007-10-19 13:52:44.773627000 -0700
+++ wm-spec-1.4.xml	2007-11-21 17:23:49.624827000 -0800
@@ -1629,6 +1629,47 @@
 window.
 		</para>
 	</sect2>
+    <sect2>
+		<title>_NET_WM_FULLSCREEN_MONITORS</title>
+		<programlisting><![CDATA[
+_NET_WM_FULLSCREEN_MONITORS, CARDINAL[]/32
+]]></programlisting>
+      <para>
+A read-only list of monitor indeces indicating which monitors the window should
+stretch over when fullscreened. The window must cover the union of all
+monitors indicated in the list.
+      </para>
+      <para>
+An empty list indicates that the Window Manager should obey normal fullscreen
+conventions; that is, the window should be stretched over the monitor
+it was in when it entered fullscreen.
+      </para>
+      <para>
+When placing children of the window (i.e. popup dialogs), the Window Manager
+centers them on the monitor containing the mouse cursor, provided
+this is a monitor listed in _NET_WM_FULLSCREEN_MONITORS. If not, children
+are placed on the first monitor indicated in the list.
+      </para>
+      <para>
+A Client wishing to change this list MUST send a _NET_WM_FULLSCREEN_MONITORS
+client message to the root window. The Window Manager MUST
+keep this list updated to reflect the current state of the window.
+      </para>
+<programlisting><![CDATA[
+  window  = the respective client window
+  message_type = _NET_WM_FULLSCREEN_MONITORS
+  format = 32
+  data.b[0] = number of monitors (n) in the list
+  data.b[1] = first monitor in the list
+  data.b[2] = second monitor in the list
+  ...
+  data.b[n+1] = source indication
+  other data.b[] elements = 0
+]]></programlisting>
+      <para>
+See <xref linkend="sourceindication"/> for details on the source indication.
+      </para>
+   	</sect2>
 </sect1>
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]