Skip to content

Commit eb06075

Browse files
committed
opt: change drag resize request limit to 120hz for floating window
1 parent bcee63f commit eb06075

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/config/preset.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ int32_t drag_warp_cursor = 1;
108108
int32_t xwayland_persistence = 1; /* xwayland persistence */
109109
int32_t syncobj_enable = 0;
110110
int32_t allow_lock_transparent = 0;
111-
double drag_refresh_interval = 16.0;
111+
double drag_tile_refresh_interval = 16.0;
112+
double drag_floating_refresh_interval = 8.0;
112113
int32_t allow_tearing = TEARING_DISABLED;
113114
int32_t allow_shortcuts_inhibit = SHORTCUTS_INHIBIT_ENABLE;
114115

src/layout/arrange.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void resize_tile_master_horizontal(Client *grabc, bool isdrag, int32_t offsetx,
210210
}
211211

212212
if (last_apply_drap_time == 0 ||
213-
time - last_apply_drap_time > drag_refresh_interval) {
213+
time - last_apply_drap_time > drag_tile_refresh_interval) {
214214
arrange(grabc->mon, false, false);
215215
last_apply_drap_time = time;
216216
}
@@ -367,7 +367,7 @@ void resize_tile_master_vertical(Client *grabc, bool isdrag, int32_t offsetx,
367367
}
368368

369369
if (last_apply_drap_time == 0 ||
370-
time - last_apply_drap_time > drag_refresh_interval) {
370+
time - last_apply_drap_time > drag_tile_refresh_interval) {
371371
arrange(grabc->mon, false, false);
372372
last_apply_drap_time = time;
373373
}
@@ -548,7 +548,7 @@ void resize_tile_scroller(Client *grabc, bool isdrag, int32_t offsetx,
548548
}
549549

550550
if (last_apply_drap_time == 0 ||
551-
time - last_apply_drap_time > drag_refresh_interval) {
551+
time - last_apply_drap_time > drag_tile_refresh_interval) {
552552
arrange(grabc->mon, false, false);
553553
last_apply_drap_time = time;
554554
}

src/mango.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4143,7 +4143,7 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx,
41434143
if (grabc->isfloating) {
41444144
grabc->iscustomsize = 1;
41454145
if (last_apply_drap_time == 0 ||
4146-
time - last_apply_drap_time > drag_refresh_interval) {
4146+
time - last_apply_drap_time > drag_floating_refresh_interval) {
41474147
resize_floating_window(grabc);
41484148
last_apply_drap_time = time;
41494149
}

0 commit comments

Comments
 (0)