5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-06 19:30:10 +08:00
wails/v3/pkg/application/events_common_linux.go
2023-10-03 08:37:11 +11:00

21 lines
533 B
Go

//go:build linux
package application
import "github.com/wailsapp/wails/v3/pkg/events"
var commonApplicationEventMap = map[events.ApplicationEventType]events.ApplicationEventType{
events.Linux.SystemThemeChanged: events.Common.ThemeChanged,
}
func (m *linuxApp) setupCommonEvents() {
for sourceEvent, targetEvent := range commonApplicationEventMap {
sourceEvent := sourceEvent
targetEvent := targetEvent
m.parent.On(sourceEvent, func(event *Event) {
event.Id = uint(targetEvent)
applicationEvents <- event
})
}
}