Only draw resizing text if there has been more than one resize event

This commit is contained in:
Kovid Goyal
2023-07-22 11:40:56 +05:30
parent e50ab57b8d
commit 601e502d2e

View File

@@ -735,7 +735,7 @@ prepare_to_render_os_window(OSWindow *os_window, monotonic_t now, unsigned int *
static void
draw_resizing_text(OSWindow *w) {
if (monotonic() - w->created_at > ms_to_monotonic_t(1000)) {
if (monotonic() - w->created_at > ms_to_monotonic_t(1000) && w->live_resize.num_of_resize_events > 1) {
char text[32] = {0};
unsigned int width = w->live_resize.width, height = w->live_resize.height;
snprintf(text, sizeof(text), "%u x %u cells", width / w->fonts_data->cell_width, height / w->fonts_data->cell_height);