summaryrefslogtreecommitdiff
path: root/redo/tab_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-14 13:05:31 -0400
committerPietro Gagliardi <[email protected]>2014-08-14 13:05:31 -0400
commitacbe70b4e5688df23e04ac0e55d8515252a52275 (patch)
tree4ad3a6cd2cb7e909dbd6437ffa6b852b09f1561b /redo/tab_windows.go
parent2c8bb7bc6d3b5614d53de957b4dca025c53a9cee (diff)
Fixed the infinite loop on Tab control dialog message bug(s) on the Windows backend.
Diffstat (limited to 'redo/tab_windows.go')
-rw-r--r--redo/tab_windows.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/redo/tab_windows.go b/redo/tab_windows.go
index 1d22887..371d7bc 100644
--- a/redo/tab_windows.go
+++ b/redo/tab_windows.go
@@ -34,7 +34,7 @@ func newTab() Tab {
func (t *tab) Append(name string, control Control) {
c := newContainer(control)
- c.setParent(&controlParent{t._hwnd})
+ c.setParent(t._hwnd)
t.tabs = append(t.tabs, c)
// initially hide tab 1..n controls; if we don't, they'll appear over other tabs, resulting in weird behavior
if len(t.tabs) != 1 {
@@ -55,6 +55,15 @@ func tabChanged(data unsafe.Pointer, new C.LRESULT) {
t.tabs[int(new)].show()
}
+//export tabTabHasChildren
+func tabTabHasChildren(data unsafe.Pointer, which C.LRESULT) C.BOOL {
+ t := (*tab)(data)
+ if t.tabs[int(which)].nchildren > 0 {
+ return C.TRUE
+ }
+ return C.FALSE
+}
+
func (t *tab) hwnd() C.HWND {
return t._hwnd
}