Re: [RFC] _NET_WORKAREA and Xinerama
- From: Sasha Vasko <sasha aftercode net>
- To: Havoc Pennington <hp redhat com>
- Cc: Rob Adams <robadams ucla edu>, wm-spec-list gnome org
- Subject: Re: [RFC] _NET_WORKAREA and Xinerama
- Date: Mon, 17 Mar 2003 10:37:30 -0600
Havoc Pennington wrote:
On Fri, Mar 14, 2003 at 09:27:57PM -0800, Rob Adams wrote:
I'm working on an implementation of this in metacity. The thing that
worries me right now is the "sqeeze play".
Two corner panels on opposite corners. Put a window between them. Then
grow the corner panels until they meet in the middle.
I'm thinking that perhaps when two struts get two close to each other,
the WM should merge them together. This would result in the window
"squirting" out when the struts are merged into one strut. Is this the
sort of behavior people had envisioned with regard to partial-width
struts?
I'd envision that the window squirts out as soon as a strut overlaps
it.
Consider this scenario: You open a new window, and that increases the
size of the panel, which should increase the size of the strut and
relocate windows to make space for newly sized panel. Then you close
this window and that reduces the size of the panel. Should you relocate
windows back where they were prior to increase in size of the panel ?
It might not be a good idea to sqeeze out windows upon the change in
strut size. In fact it may be a better approach to apply new strut size
only when windows are moved/resized, new window is getting placed or
window is maximized.
i.e. the constraint on the window top is that it may not cross a strut. so
say we have:
======================================================== screen top
strut A
---------- strut B
------- strut C
--------------
----------------------
| top of window |
| |
I'm not sure what the right algorithm is. It is especially scary in
light of constraints.c already being scary. ;-)
The thing is that here the width and position of the window affects
what the constraints are. If the window is just moved straight up,
then it's constrained by the lowermost strut it overlaps, strut
C. However, if you move it left a bit OR resize it narrower, it would
ignore strut C.
Very simple: compute a set of rectangles that are suitable for placing
window in them and then select one using best-fit criteria, such as:
1) if window is being relocated without user interaction - then select
rectangle to minimize distance between new and old window location
2) if window is relocated by user - then select rectangle that minimizes
distance between new position and user requested position.
Also since we are talking about extending struts protocol, maybe its
better to go all the way and make strut to be a rectangle, and not just
a portion on the side of the screen?
Sasha
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]