Added CS_HREDRAW and CS_VREDRAW to our Area on Windows, just to be safe.
This commit is contained in:
parent
586ac941a4
commit
179ddba93a
|
@ -595,8 +595,11 @@ func areaWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lPara
|
||||||
|
|
||||||
func registerAreaWndClass(s *sysData) (newClassName string, err error) {
|
func registerAreaWndClass(s *sysData) (newClassName string, err error) {
|
||||||
const (
|
const (
|
||||||
|
_CS_HREDRAW = 0x0002
|
||||||
|
_CS_VREDRAW = 0x0001
|
||||||
|
|
||||||
// from winuser.h
|
// from winuser.h
|
||||||
_CS_DBLCLKS = 0x0008
|
_CS_DBLCLKS = 0x0008 // needed to be able to register double-clicks
|
||||||
)
|
)
|
||||||
|
|
||||||
areaWndClassNumLock.Lock()
|
areaWndClassNumLock.Lock()
|
||||||
|
@ -605,7 +608,7 @@ func registerAreaWndClass(s *sysData) (newClassName string, err error) {
|
||||||
areaWndClassNumLock.Unlock()
|
areaWndClassNumLock.Unlock()
|
||||||
|
|
||||||
wc := &_WNDCLASS{
|
wc := &_WNDCLASS{
|
||||||
style: _CS_DBLCLKS, // needed to be able to register double-clicks
|
style: _CS_DBLCLKS | _CS_HREDRAW | _CS_VREDRAW,
|
||||||
lpszClassName: uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(newClassName))),
|
lpszClassName: uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(newClassName))),
|
||||||
lpfnWndProc: syscall.NewCallback(areaWndProc(s)),
|
lpfnWndProc: syscall.NewCallback(areaWndProc(s)),
|
||||||
hInstance: hInstance,
|
hInstance: hInstance,
|
||||||
|
|
Loading…
Reference in New Issue