Skip to content

SDL2 host: Click on an unfocused space doesn't dispatch a click event #842

@tinchodias

Description

@tinchodias

This doesn't happen in Morphic host, and the following steps show this seems to be the behavior of SDL2, as I traced low-level events as they come from the SDL2 event loop: @ELePors

  1. Add in the block closure of OSSDL2Driver>>#processEvent: this sentence: Stdio stdout << mappedEvent asString; lf; flush.
  2. Evaluate in a Workspace:
spaceA := BlSpace new.
spaceB := BlSpace new.

{ spaceA. spaceB } do: [ :each |
	each root
		addEventHandlerOn: BlClickEvent
		do: [ :evt |
			each root background: Color random.
			evt traceCr ].
	each extent: 100 asPoint.
"	each useMorphicHost."
	each show ]
  1. Result:
Screen.Recording.2026-02-02.at.16.29.35.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions