tTake surface position into account on resize - spkp - Stacking wayland compositor
 (HTM) git clone git://git.z3bra.org/spkp.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 5a70d3af8c86f86ce61bf586772662ac6eb670b2
 (DIR) parent 3ecd4672a4ecac4dd091aa8817bf380b66344d2f
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Tue, 10 Nov 2020 13:05:50 +0100
       
       Take surface position into account on resize
       
       Diffstat:
         M compositor.c                        |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/compositor.c b/compositor.c
       t@@ -505,8 +505,8 @@ cb_motion(struct state *server, uint32_t time)
                        break;
                case RESIZE:
                        wlr_xdg_surface_get_geometry(w->toplevel, &geom);
       -                geom.width = server->cursor->x - w->x;
       -                geom.height = server->cursor->y - w->y;
       +                geom.width = server->cursor->x - geom.x - w->x;
       +                geom.height = server->cursor->y - geom.y - w->y;
                        wlr_xdg_toplevel_set_size(w->toplevel, geom.width, geom.height);
                        return; /* NOTREACHED */;
                        break;