5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-06 06:30:14 +08:00
wails/v3/pkg/application/screen_linux.go
Lea Anthony 84e1bb4d9b Improve Linux application events and refactor app method receivers
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
2024-03-06 11:48:26 -06:00

30 lines
509 B
Go

//go:build linux
package application
import (
"fmt"
"sync"
)
func (l *linuxApp) getPrimaryScreen() (*Screen, error) {
return nil, fmt.Errorf("not implemented")
}
func (l *linuxApp) getScreens() ([]*Screen, error) {
var wg sync.WaitGroup
var screens []*Screen
var err error
wg.Add(1)
InvokeSync(func() {
screens, err = getScreens(l.application)
wg.Done()
})
wg.Wait()
return screens, err
}
func getScreenForWindow(window *linuxWebviewWindow) (*Screen, error) {
return window.getScreen()
}