mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-06 06:30:14 +08:00

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.
19 lines
421 B
Go
19 lines
421 B
Go
//go:build linux
|
|
|
|
package application
|
|
|
|
func (l *linuxApp) dispatchOnMainThread(id uint) {
|
|
dispatchOnMainThread(id)
|
|
}
|
|
|
|
func executeOnMainThread(callbackID uint) {
|
|
mainThreadFunctionStoreLock.RLock()
|
|
fn := mainThreadFunctionStore[callbackID]
|
|
if fn == nil {
|
|
Fatal("dispatchCallback called with invalid id: %v", callbackID)
|
|
}
|
|
delete(mainThreadFunctionStore, callbackID)
|
|
mainThreadFunctionStoreLock.RUnlock()
|
|
fn()
|
|
}
|