remove no-longer-needed window size workaround - woohoo!
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"slices"
|
"slices"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/dweymouth/supersonic/backend"
|
"github.com/dweymouth/supersonic/backend"
|
||||||
"github.com/dweymouth/supersonic/res"
|
"github.com/dweymouth/supersonic/res"
|
||||||
@@ -97,18 +96,6 @@ func main() {
|
|||||||
hwnd := ctx.(driver.WindowsWindowContext).HWND
|
hwnd := ctx.(driver.WindowsWindowContext).HWND
|
||||||
myApp.SetupWindowsSMTC(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)
|
fyneApp.Lifecycle().SetOnEnteredForeground(windowStartupTasks)
|
||||||
|
|||||||
Reference in New Issue
Block a user