opt: reduce cursor resize request

This commit is contained in:
DreamMaoMao
2025-12-19 23:08:19 +08:00
parent a67083bdb4
commit df0e18481b
2 changed files with 6 additions and 2 deletions

View File

@@ -4035,7 +4035,11 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx,
.y = grabc->geom.y,
.width = (int)round(cursor->x) - grabc->geom.x,
.height = (int)round(cursor->y) - grabc->geom.y};
resize(grabc, grabc->float_geom, 1);
if (last_apply_drap_time == 0 ||
time - last_apply_drap_time > drag_refresh_interval) {
resize(grabc, grabc->float_geom, 1);
last_apply_drap_time = time;
}
return;
} else {
resize_tile_client(grabc, true, 0, 0, time);