floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.55k stars 469 forks source link

sokol_app.h html5: event bubbling followup fixes... #972

Closed floooh closed 5 months ago

floooh commented 5 months ago

The recent fix to simply let bubble mouse and touch events up to the web page has some undesirable side effects:

Related:

Solution: restore previous default behaviour (mouse, touch and maybe key input does not bubble up by default), and instead add the following config items to sapp_desc:

...this would be a good opportunity (but a breaking change) to introduce nesting for those platform-specific config items, e.g. (still a good idea, but for a later time)

return (sapp_desc){
    .win32 = {
        ...
    },
    .html5 = {
        ...
    }
};
floooh commented 5 months ago

Fixed via https://github.com/floooh/sokol/pull/975