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

WindowResized events may notify Renderer last #78

Open
ldicker83 opened this issue Aug 27, 2018 · 1 comment
Open

WindowResized events may notify Renderer last #78

ldicker83 opened this issue Aug 27, 2018 · 1 comment
Assignees
Milestone

Comments

@ldicker83
Copy link
Member

ldicker83 commented Aug 27, 2018

There are cases where the Renderer is not the first listener for window resized events to be notified. This causes an issue with some programs that rely on the Renderer for width/height.

While not technically a bug this is very much a usability issue that has caused confusion for me and absolutely would cause confusion for users.


Solution here is to find a way to force the Renderer to get its resize event notification first -- how to do that is a bit more complicated as the Delegate class that is used in the Sigs/Slots implementation uses std::set which doesn't maintain insertion order.

Two options are available here: Modify the Delegate classes to use std::vector instead of std::set and perform a manual check for duplicates (more time consuming to develop but a fairly clean solution) or have the EventHandler explicitly push a resized event to the Renderer before anything else (a lot easier and faster but will result in duplicate events being received by the client application and is a true kludge).

@ldicker83 ldicker83 added the bug label Aug 27, 2018
@ldicker83 ldicker83 added this to the v1.5.0 milestone Aug 27, 2018
@ldicker83 ldicker83 self-assigned this Aug 27, 2018
@ldicker83 ldicker83 modified the milestones: v1.5.0, 1.6.0 May 19, 2019
@DanRStevens
Copy link
Collaborator

WindowResized event distribution may related to #701. Typically events are distributed from a main window using a window processing function. Extracting the Window code may provide some clues as to how to structure event distribution. It might be the Window class needs to perform some event processing first, before propagating the event to other listeners.

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

No branches or pull requests

2 participants