-
Notifications
You must be signed in to change notification settings - Fork 18.1k
exp/shiny: windriver: AccessDenied for DestroyWindow #25671
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
Comments
This example demonstrates the bug reported in golang/go#25671
To run the example I promised: |
Is Maybe I should peek back in... |
@andlabs: it might be. I haven't seen any other shiny examples where multiple windows are handled. |
CC @nigeltao |
I will debug this on weekend. Alex |
This will work, once golang/go#25671 is resolved.
That error was there all the time.
I am certain you get that error because DestroyWindows is called on a different thread from the message pump thread. I added GetCurrentThreadId to check.
Sounds good to me.
Please, do.
Please, remove whatever TODOs you think are inappropriate. We will make final decision once we review your CL. Thank you. Alex |
Change https://golang.org/cl/115998 mentions this issue: |
What version of Go are you using (
go version
)?go version go1.9.2 windows/amd64
Does this issue reproduce with the latest release?
That should be the case.
What operating system and processor architecture are you using (
go env
)?windows/amd64
What did you do?
Trying to close a window programmatically by sending a lifecycle event.
I'll send a comment with a link to an example program.
What did you expect to see?
The window to disappear.
What did you see instead?
For the main window this works, but client windows are not destroyed.
Description
This is a follow up to CL 115515.
It's a similar topic but an independent problem.
I tracked it down to
shiny/driver/internal/win32/win32.go:121
Release calls DestroyWindow on the handle.
Adding a Printf shows that it returns AccessDenied.
I am not sure about the reason, it might be related to "running on the same thread".
Proposed fix
shiny/driver/internal/win32/win32.go:121
Replace
_DestroyWindow(hwnd)
withSendMessage(hwnd, _WM_CLOSE, 0, 0)
It works for me.
If you agree that this is the right fix, I'll send a CL.
Should I also remove the TODO's from @andlabs around it? I'm not sure if they are appropriate anymore.
The text was updated successfully, but these errors were encountered: