Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlSpaceResizedEvent weird behavior #626

Open
tinchodias opened this issue Oct 14, 2024 · 3 comments
Open

BlSpaceResizedEvent weird behavior #626

tinchodias opened this issue Oct 14, 2024 · 3 comments

Comments

@tinchodias
Copy link
Collaborator

tinchodias commented Oct 14, 2024

With BlOSWindowSDL2Host, the event is dispatched twice when the cursor drags the border:
Oct-14-2024 19-37-11

Code:

queue := WaitfreeQueue new.

space := BlSpace new.
space
	addEventHandlerOn: BlSpaceResizedEvent
	do: [ :evt | queue nextPut: evt ].
space useSDL2Host.
space show.


events := OrderedCollection new.
queue flush: [ :anEvent | events add: anEvent ]. events.
@tinchodias tinchodias changed the title BlOSWindowSDL2Host: BlSpaceResizedEvent is announced twice BlOSWindowSDL2Host and weird behavior with BlSpaceResizedEvent Oct 14, 2024
@tinchodias
Copy link
Collaborator Author

However, the same event is not announced when size changes due to BlSpace>>extent::

Oct-14-2024 19-43-05

Code:

queue := WaitfreeQueue new.

space := BlSpace new.
space
	addEventHandlerOn: BlSpaceResizedEvent
	do: [ :evt | queue nextPut: evt ].
space useSDL2Host.
space show.

space extent: 400 asPoint.

events := OrderedCollection new.
queue flush: [ :anEvent | events add: anEvent ]. events.

@tinchodias
Copy link
Collaborator Author

tinchodias commented Oct 14, 2024

EDIT: this doesn't happen anymore after #614

MorphicWindow host dispatches 3 BlSpaceResizedEvent only on show:

Oct-14-2024 19-46-51

code:

queue := WaitfreeQueue new.

space := BlSpace new.
space
	addEventHandlerOn: BlSpaceResizedEvent
	do: [ :evt | queue nextPut: evt ].
space useMorphicHost.
space show.

events := OrderedCollection new.
queue flush: [ :anEvent | events add: anEvent ]. events.

@tinchodias tinchodias changed the title BlOSWindowSDL2Host and weird behavior with BlSpaceResizedEvent BlSpaceResizedEvent weird behavior Oct 14, 2024
@tinchodias
Copy link
Collaborator Author

This report is affected by the recently merged #614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant