-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Added Surface::{width,height}
implementations for CGL/WGL
#1551
Added Surface::{width,height}
implementations for CGL/WGL
#1551
Conversation
cb06653
to
d31335c
Compare
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.
Ideally, the != nil
check in CGL should be moved to create_window_surface
. Perhaps one could even change the type from ns_view: id
to ns_view: NonNull<Object>
.
@madsmtm Alright, I've moved the check into Apart from that this newest change means that |
@MarijnS95 could you look into the android failure? It looks like the ndk just doesn't build, given that traces don't go into glutin? |
@kchibisov this was caused by |
48e1465
to
9d9d747
Compare
9d9d747
to
b52fa42
Compare
This commit also fixes thread safety issues on macOS, before that accessing context from thread other than main would simply result in SIGILL.
b52fa42
to
43528cc
Compare
@madsmtm could you take a look, I think I've fixed all thread safety issues with macOS and were able to run stuff off the main thread, though, I've removed the example due to its complexity... I've also clarified the docs and ensured that we return physical sizes from the |
Also, @madsmtm do you know a way to somehow wakeup macOS's main thread from |
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.
@madsmtm could you take a look
Looks good to me now 👍
Also, @madsmtm do you know a way to somehow wakeup macOS's main thread from
set_wait
in winit? Without side channels and such, maybe there's a global method to magically wake-it-up?
I assume you mean after having called ControlFlow::set_wait
? But yes, what we do in winit
to do so is to send an empty NSEvent
:
I wonder if I can do so from inside glutin, I think I can do so, given that |
You definitely could - though I don't think I understand why you need to? |
If winit is blocked on the main thread, and you call something on the off thread, you'll block on the off-thread as well. If we send dummy event we'll wake-up the main loop without any issue? Otherwise the user must wake-up the main thread manually when calling functions in glutin which block on macOS? |
No, you needn't worry about that: |
Huh, ok. |
CHANGELOG.md
if knowledge of this change could be valuable to usersHello again,
I've looked into implementing these missing methods on CGL/WGL. For the CGL implementation I'm not sure whether the nil check is necessary, if not then the maybe the return type could be changed to
u32
since all Platforms have an implementation now?