diff --git a/uicontext.go b/uicontext.go index 9e37a86f3..18ae973db 100644 --- a/uicontext.go +++ b/uicontext.go @@ -110,15 +110,6 @@ func (c *uiContext) setScreenClearedEveryFrame(cleared bool) { } } -func (c *uiContext) setWindowResizable(resizable bool) { - c.m.Lock() - defer c.m.Unlock() - - if w := uiDriver().Window(); w != nil { - w.SetResizable(resizable) - } -} - func (c *uiContext) screenScale(deviceScaleFactor float64) float64 { if c.offscreen == nil { return 0 diff --git a/window.go b/window.go index ad922317e..e29404c06 100644 --- a/window.go +++ b/window.go @@ -75,7 +75,9 @@ func IsWindowResizable() bool { // // SetWindowResizable is concurrent-safe. func SetWindowResizable(resizable bool) { - theUIContext.setWindowResizable(resizable) + if w := uiDriver().Window(); w != nil { + w.SetResizable(resizable) + } } // SetWindowTitle sets the title of the window.