Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
4d78d02
commit 5d377fd
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5d377fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But what happens now if you have multiple windows? Any call to any sf::Window's pollEvent() or waitEvent() will dispatch messages for all windows (and discard thread messages (?)). This seems not to be much of a problem for SFML windows, since they have internal queues, but it can cause problems if using other windows (e.g. native ones or ones from UI Toolkits like Qt).
By the way, I am not able to reproduce #328 or #69 even without this patch.
5d377fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I don't think it's a problem though.
What do you mean? The whole point of this patch is to process thread messages by passing a NULL handle.
Same for me, I was never able to reproduce it. I have no idea what makes it appear.
As the commit message states, this is only an attempt. It seems hard to find reliable documentation about this issue, so let's try something and see what good or bad effect it will have.
5d377fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought of the scenario where one wants to combine SFML's event processing with a handwritten/other message loop. But on second thought this does not seem to be a good idea anyway, which actually invalidates my concerns.
You could also process thread messages only by passing -1 instead of NULL (see the documentation of the hWnd parameter) but when Werker is right the offending message is sent to a window (the mentioned "cicmarshalwnd" points, according to a quick search, to a console window). However, the current solution might be better anyway, since unprocessed messages are always bad, no matter if thread messages or ones belonging to mysterious marshal windows.
Sounds reasonable. Bugs which one cannot reproduce are the hardest to fix.
5d377fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what you guys have been fixing but you apparently did this in a wrong way: http://en.sfml-dev.org/forums/index.php?topic=17251.0
5d377fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title says it, and links to the corresponding issues. The rest of my answer will be on the forum, to avoid splitting the discussion.