mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-15 16:39:32 +08:00
Merge remote-tracking branch 'origin/v3-alpha' into v3-alpha
This commit is contained in:
commit
cc70b98eed
@ -94,7 +94,7 @@ func (a *linuxApp) setApplicationMenu(menu *Menu) {
|
|||||||
|
|
||||||
func (a *linuxApp) run() error {
|
func (a *linuxApp) run() error {
|
||||||
|
|
||||||
a.parent.On(events.Linux.ApplicationStartup, func(evt *ApplicationEvent) {
|
a.parent.OnApplicationEvent(events.Linux.ApplicationStartup, func(evt *ApplicationEvent) {
|
||||||
// TODO: What should happen here?
|
// TODO: What should happen here?
|
||||||
})
|
})
|
||||||
a.setupCommonEvents()
|
a.setupCommonEvents()
|
||||||
|
@ -13,7 +13,7 @@ func (a *linuxApp) setupCommonEvents() {
|
|||||||
for sourceEvent, targetEvent := range commonApplicationEventMap {
|
for sourceEvent, targetEvent := range commonApplicationEventMap {
|
||||||
sourceEvent := sourceEvent
|
sourceEvent := sourceEvent
|
||||||
targetEvent := targetEvent
|
targetEvent := targetEvent
|
||||||
a.parent.On(sourceEvent, func(event *ApplicationEvent) {
|
a.parent.OnApplicationEvent(sourceEvent, func(event *ApplicationEvent) {
|
||||||
event.Id = uint(targetEvent)
|
event.Id = uint(targetEvent)
|
||||||
applicationEvents <- event
|
applicationEvents <- event
|
||||||
})
|
})
|
||||||
|
@ -289,7 +289,7 @@ func (w *linuxWebviewWindow) run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w.setURL(startURL)
|
w.setURL(startURL)
|
||||||
w.parent.On(events.Linux.WindowLoadChanged, func(_ *WindowEvent) {
|
w.parent.OnWindowEvent(events.Linux.WindowLoadChanged, func(_ *WindowEvent) {
|
||||||
if w.parent.options.JS != "" {
|
if w.parent.options.JS != "" {
|
||||||
w.execJS(w.parent.options.JS)
|
w.execJS(w.parent.options.JS)
|
||||||
}
|
}
|
||||||
@ -298,19 +298,19 @@ func (w *linuxWebviewWindow) run() {
|
|||||||
w.execJS(js)
|
w.execJS(js)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
w.parent.On(events.Linux.WindowFocusIn, func(e *WindowEvent) {
|
w.parent.OnWindowEvent(events.Linux.WindowFocusIn, func(e *WindowEvent) {
|
||||||
w.parent.emit(events.Common.WindowFocus)
|
w.parent.emit(events.Common.WindowFocus)
|
||||||
})
|
})
|
||||||
w.parent.On(events.Linux.WindowFocusOut, func(e *WindowEvent) {
|
w.parent.OnWindowEvent(events.Linux.WindowFocusOut, func(e *WindowEvent) {
|
||||||
w.parent.emit(events.Common.WindowLostFocus)
|
w.parent.emit(events.Common.WindowLostFocus)
|
||||||
})
|
})
|
||||||
w.parent.On(events.Linux.WindowDeleteEvent, func(e *WindowEvent) {
|
w.parent.OnWindowEvent(events.Linux.WindowDeleteEvent, func(e *WindowEvent) {
|
||||||
w.parent.emit(events.Common.WindowClosing)
|
w.parent.emit(events.Common.WindowClosing)
|
||||||
})
|
})
|
||||||
w.parent.On(events.Linux.WindowDidMove, func(e *WindowEvent) {
|
w.parent.OnWindowEvent(events.Linux.WindowDidMove, func(e *WindowEvent) {
|
||||||
w.parent.emit(events.Common.WindowDidMove)
|
w.parent.emit(events.Common.WindowDidMove)
|
||||||
})
|
})
|
||||||
w.parent.On(events.Linux.WindowDidResize, func(e *WindowEvent) {
|
w.parent.OnWindowEvent(events.Linux.WindowDidResize, func(e *WindowEvent) {
|
||||||
w.parent.emit(events.Common.WindowDidResize)
|
w.parent.emit(events.Common.WindowDidResize)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user