File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -556,6 +556,24 @@ fun setCapture(stub SizeOfPointer) SizeOfPointer {
556556fun releaseDC(hWnd HWnd, hdc HDc) Int32 {
557557 // TODO Release device context
558558 tofitaDebugLog("ReleaseDC called with hWnd %8 hdc %8".utf16(), hWnd as! UInt64, hdc as! UInt64)
559+
560+ var window = handleToWindow(hWnd)
561+ if window == null {
562+ return 0
563+ }
564+
565+ while window.parent != null {
566+ window = window.parent
567+ }
568+
569+ // Force refresh
570+ // TODO probably detect if someone was drawing on the DC
571+ let dc = window.dc
572+ let fb = dc.fb.ref
573+ // TODO Let syscall payload be different type, not `fb`'s user-space type
574+ njraaSwapWindowFramebuffer(fb)
575+
576+ return 1
559577}
560578
561579@dllExport('ReleaseCapture')
You can’t perform that action at this time.
0 commit comments