[v3 linux] api changes (#2830)

This commit is contained in:
Travis McLane
2023-08-19 06:12:34 +10:00
committed by GitHub
parent 841289f1d1
commit 4804b34208
5 changed files with 23 additions and 5 deletions
+7 -1
View File
@@ -83,7 +83,7 @@ func (m *linuxApp) run() error {
// Add a hook to the ApplicationDidFinishLaunching event
// FIXME: add Wails specific events - i.e. Shouldn't platform specific ones be translated to Wails events?
m.parent.On(events.Mac.ApplicationDidFinishLaunching, func() {
m.parent.On(events.Mac.ApplicationDidFinishLaunching, func(evt *Event) {
// Do we need to do anything now?
fmt.Println("events.Mac.ApplicationDidFinishLaunching received!")
})
@@ -107,6 +107,12 @@ func (m *linuxApp) registerWindow(window pointer, id uint) {
m.windowsLock.Unlock()
}
func (m *linuxApp) isDarkMode() bool {
// FIXME: How do we detect this?
// Maybe this helps: https://askubuntu.com/questions/1469869/how-does-firefox-detect-light-dark-theme-change-on-kde-systems
return false
}
func newPlatformApp(parent *App) *linuxApp {
name := strings.ToLower(strings.Replace(parent.options.Name, " ", "", -1))
if name == "" {