func (w *Window) SetTitle(title string) { onMainThread(func() { ctitle := C.CString(title) defer C.free(unsafe.Pointer(ctitle)) C.setWindowTitle(w.cw, ctitle) }) }
func (w *Window) SetTitle(title string) { w.oplock.Lock() defer w.oplock.Unlock() ctitle := C.CString(title) defer C.free(unsafe.Pointer(ctitle)) C.setWindowTitle(w.cw, ctitle) }