move comment where it's more relevant

This commit is contained in:
Devin J. Pohly 2020-04-26 21:42:45 -05:00
parent aef34a5e7e
commit ce5d116efd

10
dwl.c
View file

@ -692,11 +692,6 @@ motionnotify(uint32_t time)
grabc->w, grabc->h, 1); grabc->w, grabc->h, 1);
return; return;
} else if (cursor_mode == CurResize) { } else if (cursor_mode == CurResize) {
/*
* Note that I took some shortcuts here. In a more fleshed-out
* compositor, you'd wait for the client to prepare a buffer at
* the new size, then commit any movement that was prepared.
*/
resize(grabc, grabc->x, grabc->y, resize(grabc, grabc->x, grabc->y,
cursor->x - grabc->x, cursor->y - grabc->y, 1); cursor->x - grabc->x, cursor->y - grabc->y, 1);
return; return;
@ -932,6 +927,11 @@ rendermon(struct wl_listener *listener, void *data)
void void
resize(Client *c, int x, int y, int w, int h, int interact) resize(Client *c, int x, int y, int w, int h, int interact)
{ {
/*
* Note that I took some shortcuts here. In a more fleshed-out
* compositor, you'd wait for the client to prepare a buffer at
* the new size, then commit any movement that was prepared.
*/
struct wlr_box *bbox = interact ? &sgeom : &c->mon->w; struct wlr_box *bbox = interact ? &sgeom : &c->mon->w;
c->x = x; c->x = x;
c->y = y; c->y = y;