<br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 1:39 PM, Kristian Høgsberg <span dir="ltr"><<a href="mailto:hoegsberg@gmail.com" target="_blank">hoegsberg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, Nov 19, 2012 at 12:10:09PM -0700, Scott Moreau wrote:<br>
> On Mon, Nov 19, 2012 at 11:36 AM, Bill Spitzak <<a href="mailto:spitzak@gmail.com">spitzak@gmail.com</a>> wrote:<br>
><br>
> > Scott Moreau wrote:<br>
> ><br>
> >  Because resize-from-center depends on knowing what edge was actually<br>
> >> clicked on, setting both left and right bits simultaneously means that both<br>
> >> left and right cases will be hit, and whichever sets the offset last, wins.<br>
> >><br>
> ><br>
> > You should be able to tell "which" edge by what side of the original<br>
> > center the mouse is on. So if the user grabs the top-right corner and then<br>
> > moves the mouse so that it is to the lower-left of the center, they are now<br>
> > dragging the bottom-left corner. The few things I have that do<br>
> > resize-from-center (drawing programs are all I can find) work exactly this<br>
> > way.<br>
><br>
><br>
> My point is that we're not confined to a single byte of data to store edge<br>
> flags. We have plenty of room to store additional flags. I agree that it<br>
> would be a nice way to structure the data, I don't think it warrants the<br>
> additional code required to support it. By dedicating a single bit to<br>
> 'resize opposing edges', you're avoiding all the code that would have to be<br>
> in place to detect the grabbed edge, regardless if you store it in a<br>
> different edge mask or compute the pointer position against the original<br>
> center, later.<br>
<br>
</div>Ah, right I see the problem now.  How about we leave it entirely to<br>
the compositor to implement resize from center behavior when shift is<br>
clicked?  No changes to the protocol, just make the compositor do<br>
resize from center when shift is held down.</blockquote><div><br>The reason is because in order for this to work, it requires client support. The client must know when resize-from-center is happening on the compositor side, to calculate the x/y offsets accordingly.<br>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">  Metacity has a similar<br>
move/resize behavior where it restricts the position/sizes to only<br>
those that align with other edges when shift is held down.  This works<br>
regardless whether the resize was started from clicking the frame,<br>
alt-left/middleclick or a _NET_WM_MOVERESIZE message.<br>
<span class="HOEnZb"><font color="#888888"><br>
Kristian<br>
</font></span></blockquote></div><br><br>Scott<br>