Skip to content

'paint' event not triggered when using useSharedTexture in window opened by setWindowOpenHandler #46853

@benoitlahoz

Description

@benoitlahoz

Preflight Checklist

Electron Version

34.5.1

What operating system(s) are you using?

macOS

Operating System Version

macOS Monterey 12.7.6

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Expect the new window, opened from renderer through setWindowOpenHandler with overrideBrowserWindowOptions or createWindow, to trigger the 'paint' event.

Actual Behavior

'paint' event is not triggered, as if the useSharedTexture option (thank you @reitowo!) wasn't taken into account.

Testcase Gist URL

Unable to publish a gist but here is the repository.
Relevant files are window.ts for main process, and MainView.vue, SyphonView.vue for renderer one.

In the application click 'Create Server'.

Additional Information

Use case
I want to create or consume canvases in the visible window (think of incoming WebRTC streams, drawable canvas, etc.) and to 'clone' them (drawImage) at their real size in an OSR window. Then, in the 'paint' event I would be able to publish the frame handle to my node native addon (node-syphon).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions