[V3-Linux] Fix linux compile and systray OnClicks (#3886)

* fix linux compile

* fix systray OnClick and OnRightClick

* changelog.md

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
Atterpac 2024-11-17 03:02:58 -07:00 committed by GitHub
commit 4f9010b024
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View file

@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Consolidated dev config into `config.yml` by [leaanthony](https://github.com/leaanthony)
### Fixed
- Fixed Linux systray `OnClick` and `OnRightClick` implementation by @atterpac in [#3886](https://github.com/wailsapp/wails/pull/3886)
- Fixed `AlwaysOnTop` not working on Mac by [leaanthony](https://github.com/leaanthony) in [#3841](https://github.com/wailsapp/wails/pull/3841)
- [darwin] Fixed `application.NewEditMenu` including a duplicate `PasteAndMatchStyle` role in the edit menu on Darwin by [johnmccabe](https://github.com/johnmccabe) in [#3839](https://github.com/wailsapp/wails/pull/3839)
- [linux] Fixed aarch64 compilation [#3840](https://github.com/wailsapp/wails/issues/3840) in [#3854](https://github.com/wailsapp/wails/pull/3854) by [kodflow](https://github.com/kodflow)

View file

@ -698,7 +698,7 @@ func (s *linuxSystemTray) GetLayout(parentID int32, recursionDepth int32, proper
// Activate implements org.kde.StatusNotifierItem.Activate method.
func (s *linuxSystemTray) Activate(x int32, y int32) (err *dbus.Error) {
fmt.Println("Activate", x, y)
s.parent.clickHandler()
return
}
@ -715,7 +715,7 @@ func (s *linuxSystemTray) Scroll(delta int32, orientation string) (err *dbus.Err
// SecondaryActivate implements org.kde.StatusNotifierItem.SecondaryActivate method.
func (s *linuxSystemTray) SecondaryActivate(x int32, y int32) (err *dbus.Error) {
fmt.Println("SecondaryActivate", x, y)
s.parent.rightClickHandler()
return
}

View file

@ -296,9 +296,9 @@ func (w *linuxWebviewWindow) run() {
w.setFrameless(w.parent.options.Frameless)
if w.parent.options.InitialPosition == WindowCentered {
C.windowCenter(w.nsWindow)
w.center()
} else {
w.setPosition(options.X, options.Y)
w.setPosition(w.parent.options.X, w.parent.options.Y)
}
switch w.parent.options.StartState {