On Sat, 20 Sep 2014 at 22:56:24 -0500, Doug Torrance wrote:
> If a user moves a window which is currently maximized, the current behavior is
> to keep the window geometry and maximized status unchanged.  This can lead to
> peculiar behavior.  For example, suppose a user maximizes a window to the
> right half of the screen (either through the window menu, keyboard shortcut, 
> or
> new snapping feature), then moves it, and then attempts maximize it to the
> right half of the screen again.  Instead of the expected result, the window is
> unmaximized and returned to its original geometry.
> 
> This patch changes the behavior by unmaximizing any maximized window which is
> moved.  This is consistent with other desktop environments, e.g., GNOME, 
> Unity,
> and Windows.

I think it's even more peculiar to start moving a window and it suddenly
changing its size.

I just tested it to check the WTH effect, and it's big. I started to
move a right-half maximized window and it changed to another size., it's
a big surprise. Not at all what one expects when moving a window.

When moving a window the user expects it to _move_, not change
its size.

The peculiar behavior you described is of second order compared to
this. And the surprise effect is much smaller since the user is 
expecting the window size to change anyway.

Perhaps you can change this behavior by clearing the "memory"
of its past geometry when moving a window, that's is what
causes the window to return to its original geometry.


> ---
>  src/moveres.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/src/moveres.c b/src/moveres.c
> index 6899a86..e05d3be 100644
> --- a/src/moveres.c
> +++ b/src/moveres.c
> @@ -1723,6 +1723,20 @@ int wMouseMoveWindow(WWindow * wwin, XEvent * ev)
>                       } else if (abs(ev->xmotion.x_root - 
> event.xmotion.x_root) >= MOVE_THRESHOLD
>                                  || abs(ev->xmotion.y_root - 
> event.xmotion.y_root) >= MOVE_THRESHOLD) {
>  
> +                             if (wwin->flags.maximized) {
> +                                     float titlebar_ratio;
> +                                     int new_x, new_y;
> +
> +                                     titlebar_ratio = (moveData.mouseX - 
> wwin->frame_x) /
> +                                             (float)wwin->frame->core->width;
> +                                     new_y = wwin->frame_y;
> +                                     wUnmaximizeWindow(wwin);
> +                                     new_x = moveData.mouseX - 
> titlebar_ratio * wwin->frame->core->width;
> +                                     wWindowMove(wwin, new_x, new_y);
> +                                     moveData.realX = moveData.calcX = 
> wwin->frame_x;
> +                                     moveData.realY = moveData.calcY = 
> wwin->frame_y;
> +                             }
> +
>                               XChangeActivePointerGrab(dpy, ButtonMotionMask
>                                                        | ButtonReleaseMask | 
> ButtonPressMask,
>                                                        
> wPreferences.cursor[WCUR_MOVE], CurrentTime);
> -- 
> 1.9.1
> 
> 
> -- 
> To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to