Skip to content

Commit d20ef58

Browse files
elmarbradfitz
elmar
authored andcommitted
shiny: windriver: close client windows
After receiving a close request from the window manager, DestroyWindow must be called to actually close the window. This is done by DefWindowProc. Fixes golang/go#25587 Change-Id: I05c95046ce4572fec0cba67eba2d313f318e36ba Reviewed-on: https://go-review.googlesource.com/115515 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 8460e60 commit d20ef58

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shiny/driver/internal/win32/win32.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,11 @@ func sendSize(hwnd syscall.Handle) {
170170
}
171171

172172
func sendClose(hwnd syscall.Handle, uMsg uint32, wParam, lParam uintptr) (lResult uintptr) {
173+
// TODO(ktye): DefWindowProc calls DestroyWindow by default.
174+
// To intercept destruction of the window, return 0 and call
175+
// DestroyWindow when appropriate.
173176
LifecycleEvent(hwnd, lifecycle.StageDead)
174-
return 0
177+
return _DefWindowProc(hwnd, uMsg, wParam, lParam)
175178
}
176179

177180
func sendMouseEvent(hwnd syscall.Handle, uMsg uint32, wParam, lParam uintptr) (lResult uintptr) {

0 commit comments

Comments
 (0)