diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-16 14:29:14 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-16 14:29:14 +0300 |
| commit | 65a5a2f6ffc6f67ffa3d5ee62b3c8979b4c35b7a (patch) | |
| tree | 8121b7df3506aa955165328522274f8e2b368e21 /src/common/surface.c | |
| parent | 4b1559a81fe904d66c23d59946ab8b5a2cb3614f (diff) | |
During a macOS live resize, the refresh callback ran with the new size
while its WINDOW event stayed queued until the drag ended. wsap_term
sizes its grid from WINDOW events, so the grid kept its old size until
the mouse was released. Every intermediate size then replayed in a
burst, since queued resizes were never folded.
A WINDOW event now reports the surface's current geometry, so resizes
queued while the application was away fold into one, and a size it
already has reports nothing. The refresh callback documents that
yasl_surface_get_info is current inside it and that one WINDOW event
follows once the system's loop returns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src/common/surface.c')
| -rw-r--r-- | src/common/surface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/surface.c b/src/common/surface.c index 683bbaa..1dc30d1 100644 --- a/src/common/surface.c +++ b/src/common/surface.c @@ -814,8 +814,12 @@ static bool convert_event(const struct yasl_private_event *p, yasl_event *e) return p->surface && window_event(p->surface, p->surface->reported_size, p->surface->reported_scale_120, p->state.flags, e); case YASL_PRIVATE_EVENT_WINDOW_RESIZE: - return p->surface && window_event(p->surface, p->resize.geometry.size, - p->resize.geometry.scale_120, p->surface->reported_state, e); + /* The current geometry, not the queued one: resizes made while the + * application was away, as during a macOS live resize, fold into one + * event, and an application that applied yasl_surface_get_info in its + * refresh callback never steps back through older sizes. */ + return p->surface && window_event(p->surface, p->surface->size, p->surface->scale_120, + p->surface->reported_state, e); case YASL_PRIVATE_EVENT_KEY: e->type = YASL_EVENT_KEY; e->action = (unsigned)p->key.action; |
