remove no-longer-needed window size workaround - woohoo!

This commit is contained in:
Drew Weymouth
2025-02-21 08:09:06 -08:00
parent cbbdad3a10
commit 90f85d26a6
-13
View File
@@ -8,7 +8,6 @@ import (
"runtime"
"slices"
"sync"
"time"
"github.com/dweymouth/supersonic/backend"
"github.com/dweymouth/supersonic/res"
@@ -97,18 +96,6 @@ func main() {
hwnd := ctx.(driver.WindowsWindowContext).HWND
myApp.SetupWindowsSMTC(hwnd)
}
// slightly hacky workaround for https://github.com/fyne-io/fyne/issues/4964
_, isWayland := ctx.(*driver.WaylandWindowContext)
if runtime.GOOS == "linux" && !isWayland {
s := mainWindow.DesiredSize()
go func() {
time.Sleep(50 * time.Millisecond)
fyne.Do(func() { mainWindow.Window.Resize(s.Subtract(fyne.NewSize(4, 0))) })
time.Sleep(50 * time.Millisecond)
fyne.Do(func() { mainWindow.Window.Resize(s) }) // back to desired size
}()
}
})
})
fyneApp.Lifecycle().SetOnEnteredForeground(windowStartupTasks)