mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
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.
This commit is contained in:
committed by
Travis McLane
parent
6b0daf3da9
commit
84e1bb4d9b
@@ -7,17 +7,17 @@ import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
func (a *linuxApp) getPrimaryScreen() (*Screen, error) {
|
||||
func (l *linuxApp) getPrimaryScreen() (*Screen, error) {
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (a *linuxApp) getScreens() ([]*Screen, error) {
|
||||
func (l *linuxApp) getScreens() ([]*Screen, error) {
|
||||
var wg sync.WaitGroup
|
||||
var screens []*Screen
|
||||
var err error
|
||||
wg.Add(1)
|
||||
InvokeSync(func() {
|
||||
screens, err = getScreens(a.application)
|
||||
screens, err = getScreens(l.application)
|
||||
wg.Done()
|
||||
})
|
||||
wg.Wait()
|
||||
|
||||
Reference in New Issue
Block a user