diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 22:43:23 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 22:43:23 +0300 |
| commit | d26bd78644544151b42600c5358d0fecc84b14f1 (patch) | |
| tree | e394f96305674068a21619940c6b717d8eb3d628 /src/common/backend.c | |
| parent | 94c5e361fbb229b0cd6853e2102a7d95f1f358b3 (diff) | |
feat: implement modern Approach A app runner, unified events, notepad, and game examples
Diffstat (limited to 'src/common/backend.c')
| -rw-r--r-- | src/common/backend.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/backend.c b/src/common/backend.c index 23275d6..e690697 100644 --- a/src/common/backend.c +++ b/src/common/backend.c @@ -1,5 +1,6 @@ #include "backend.h" #include "loop.h" +#include "common/app_internal.h" #include <errno.h> #include <stdlib.h> @@ -167,6 +168,9 @@ struct yasl_surface *yasl_create_toplevel(struct yasl_display *d, errno = 0; struct yasl_surface *s = d->ops->surface_create_toplevel(d, spec, graphics_device); if (!s && !errno) errno = ENODEV; + if (s && d->app_runner) { + app_runner_register_surface(d->app_runner, s); + } return s; } @@ -202,6 +206,9 @@ struct yasl_surface *yasl_surface_create_popup(struct yasl_surface *parent, cons errno = 0; struct yasl_surface *s = parent->display->ops->surface_create_popup(parent, spec); if (!s && !errno) errno = ENODEV; + if (s && parent->display->app_runner) { + app_runner_register_surface(parent->display->app_runner, s); + } return s; } @@ -226,6 +233,9 @@ void yasl_surface_destroy(struct yasl_surface *s) { if (!s || !s->display->ops->surface_destroy) return; + if (s->app_surface && s->display->app_runner) { + app_runner_unregister_surface(s->display->app_runner, s); + } yasl_surface_clear_timers(s); input_queue_clear(&s->input); s->display->ops->surface_destroy(s); |
