Fix: problem with cursors that are not the same on my OS as hardcoded in the MouseCursor class #182
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi.
I was investigating why White is often very slow to get items (WPF application) and found out that it was waiting inside
Window.HourGlassWait()
method. Adding some debug logging shown such thing:and yet several dozens of such lines after what timeout happened.
Here HCURSOR=65543 is defined as
SilverlightWait
. But we don't use Silverlight at all. Trying to figure out what is happening I've written such piece:And the result was:
It seems that in my OS 65543 is precisely "normal" arrow cursor. And
Window.HourGlassWait()
waits until something else found. Not to mention that waiting results in failure.By the way, other cursors in the MouseCursor.cs are also not coincide with my OS values.
Now, this pull request is more a question then ready-to-merge code, because I don't know what to replace Silverlight values with, so just commented them. But overall this code make unit-tests of White pass on my machine and my real code work much-much faster (I believe that before I was waiting for a timeout on almost each
WaitHourGlass()
call).