[PATCH wayland 1/2 v2] protocol: Add resize from center flag.

Bill Spitzak spitzak at gmail.com
Mon Nov 19 10:36:48 PST 2012


Scott Moreau wrote:

> Because resize-from-center depends on knowing what edge was actually 
> clicked on, setting both left and right bits simultaneously means that 
> both left and right cases will be hit, and whichever sets the offset 
> last, wins.

You should be able to tell "which" edge by what side of the original 
center the mouse is on. So if the user grabs the top-right corner and 
then moves the mouse so that it is to the lower-left of the center, they 
are now dragging the bottom-left corner. The few things I have that do 
resize-from-center (drawing programs are all I can find) work exactly 
this way. I think also if the user then lets the shift key go, they 
expect to now be in resize-lower-left mode, though all the programs I 
tried just go into resize-from-center mode but you cannot get out of it 
without letting the mouse go.

It sounds to me like the "receiver" of the resize is expected to 
interpret shift-up in your scheme. Since the very first thing it has to 
do is check this key (as the user may have pressed or released it 
between when the event was sent and it started working on it), there is 
now no reason to communicate "center" at all.


More information about the wayland-devel mailing list