struts, workareas and xinerama



_NET_WORKAREA is terribly flawed on Xinerama setups.  It works well
enough if you have two monitors beside eachother of equal resolution,
but falls apart otherwise.

Let's consider a somewhat bad-case example (this only works in fixed
size fonts):
1111111
1111111
11111112222
11111112222
11111112222
      2222

There's no way to give a work area for icons that will let it span
both screens, and won't end up with icons out in nowhereland.  Sure,
applications can be Xinerama aware and work with this, but the
workarea should be capable of working with multiple monitors - and let
the WM specify how to use them in different ways it sees fit.

My proposal is to add another level of array to the _NET_WORKAREA hint.

_NET_WORKAREA, x, y, width, height CARDINAL[][][4]/32

So that it is an array of desktops, with x,y,width,height, which can
appear any number of times.  I'm not sure what's a good way of wording
that.

So, for the example with 2 similar desktops, it could be:
[0, 0, 7, 5,  0, 0, 7, 5,   7, 2, 4, 4,  7, 2, 4, 4]

Meaning first desktop-first monitor is 0, 0, 7x5
 second desktop-first monitor is 0, 0, 7x5
 first desktop-second monitor is 7, 2, 4x4
 second desktop-second monitor is 7, 2, 4x4

This has the property of being backwards compatible with previous
versions of the specification.  An application can read only the first
n (number of desktops) dimensions and ignore the remainder, and it
will not end up putting icons in nowhereland.

Secondly, I am in need of some clarification in terms of struts with
Xinerama. In the above example, say an application set a strut on the
"right side" with a length of the 1st monitor.  Where exactly does
this strut reside? It could reside entirely on the first monitor, it
could reside on the second monitor (and the nowhereland above it) or
it could be split between the two monitors.

I expect there is no answer to this question, which is frustrating
because this is a real-life setup that one of my users has talked
about recently.  Perhaps _NET_WM_STRUT_PARTIAL is just not enough, and
needs to be able to specify the monitor as well as start/length.

This could also be done by adding a "monitor" index to the end of the
hint, which would be the index of the monitor as provided by
xsi_screen_number in the XineramaScreenInfo structure.

I would be willing to write up a draft of these changes if people like
them, or any other better ideas people have for making workareas and
struts work with Xinerama setups.



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