5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 01:31:54 +08:00
Commit Graph

83 Commits

Author SHA1 Message Date
Lea Anthony
866fb36b67
Add fix for application menu. Add docs 2025-03-08 11:25:06 +11:00
Fabio Massaioli
e7c134de4e
[v3] Late service registration and error handling overhaul (#4066)
* Add service registration method

* Fix error handling and formatting in messageprocessor

* Add configurable error handling

* Improve error strings

* Fix service shutdown on macOS

* Add post shutdown hook

* Better fatal errors

* Add startup/shutdown sequence tests

* Improve debug messages

* Update JS runtime

* Update docs

* Update changelog

* Fix log message in clipboard message processor

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Remove panic in RegisterService

* Fix linux tests (hopefully)

* Fix error formatting everywhere

* Fix typo in windows webview

* Tidy example mods

* Set application name in tests

* Fix ubuntu test workflow

* Cleanup template test pipeline

* Fix dev build detection on Go 1.24

* Update template go.mod/sum to Go 1.24

* Remove redundant caching in template tests

* Final format string cleanup

* Fix wails3 tool references

* Fix legacy log calls

* Remove formatJS and simplify format strings

* Fix indirect import

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-02-19 09:27:41 +01:00
Lea Anthony
2db902ef82
Add menu option for Linux 2025-02-03 20:33:59 +11:00
Lea Anthony
36a1b71f93
The application menu is now macOS only.
Fixed a `Parameter incorrect` error in Windows.
Updated Window example for mica/acrylic/tabbed windows.
2025-02-03 20:08:31 +11:00
Lea Anthony
db61f9f263
Event cancellation for standard listeners.
Major doc updates.
Runtime build tidy up.
Removed redundant default event mappings.
2025-01-27 09:29:22 +11:00
Lea Anthony
be8159d410
# Conflicts:
#	docs/src/content/docs/changelog.mdx
#	v3/pkg/application/menuitem.go
2025-01-17 21:19:23 +11:00
Atterpac
e0c5de6e10
[V3/Linux] Fix Min/Max window options (#3979)
Some checks are pending
Build + Test v3 alpha / Test Templates (1.23, macos-latest, vanilla-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, macos-latest, vue) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, macos-latest, vue-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, lit) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, lit-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, preact) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, preact-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, react) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, react-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, svelte) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, svelte-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, vanilla) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, vanilla-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, vue) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, ubuntu-latest, vue-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, lit) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, lit-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, preact) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, preact-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, react) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, react-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, svelte) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, svelte-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, vanilla) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, vanilla-ts) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, vue) (push) Blocked by required conditions
Build + Test v3 alpha / Test Templates (1.23, windows-latest, vue-ts) (push) Blocked by required conditions
/ publish (push) Waiting to run
Deploy to GitHub Pages / deploy (push) Blocked by required conditions
Deploy to GitHub Pages / build (push) Waiting to run
fix min/max options for linux

changelog.md

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-01-11 10:32:27 +11:00
Lea Anthony
86f5049d29
Improve move & resize debouncer.
Fix double event.
Fix shutdown issue with webview2.
2024-12-27 12:05:11 +11:00
Lea Anthony
2a6e3da30a
Ensure key callbacks in window run() are called on the main thread 2024-12-07 20:54:22 +11:00
Atterpac
4f9010b024
[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>
2024-11-17 21:02:58 +11:00
Lea Anthony
3e00b390c1
V3 alpha feature/start window position (#3885)
* New InitialPosition setting

* Fix mac inverted Y issue.
Fix mac centering issue.

* Change position text in example

* Update changelog.md
2024-11-16 10:10:40 +11:00
Mohamed Gharib
efe0c8d534
[v3-Windows] New DIP system for Enhanced High DPI Monitor Support (#3665)
* [v3-Windows] New DIP system for Enhanced High DPI Monitor Support

* Update changelog

* Remove asset middleware

* Remove SetThreadDpiAwarenessContext()

* Fix macOS build.

* Fill missing screens fields (linux, darwin)

* Skip DPI transformation on unsupported platforms

* Simplify distanceFromRectSquared()

* Update v3/pkg/application/screenmanager.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-09-22 08:38:30 +10:00
Lea O'Anthony
2c55110776
Improved menus.
Fixed warning on windows quit.
2024-09-17 21:19:00 +10:00
Gabriel Lima
5481f3a684
[linux] fix: update for new events syntax (#3734)
Changed uses of deprecated `.On` to the current standard.
2024-09-08 20:22:42 +10:00
Atterpac
5004aac259
[V3] Refactor linux ignore mouse events (#3721)
refactor linux ignore mouse events

changelog.md
2024-09-06 08:10:05 +10:00
bruxaodev
fbcce0b20c
[windows] Add support for click-through overlay window (#3667)
* [windows] Add support for click-through overlay window

* update changelog

* setIgnoreMouseEvents - exemple

* fix - remove unused import

* Add macOS+Linux support. Update example.

* Fix SetIgnoreMouseEvents before window created.

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-08-18 20:50:22 +10:00
Mohamed Gharib
d5e289880f
[v3] Rename AbsolutePosition() to Position() (#3611) 2024-07-15 19:27:21 +10:00
Travis McLane
cfe2424f4d
WindowDidMove / WindowDidResize events for Linux and Windows
* [linux] emit system specific event for theme change

Code was incorrectly emitting the `events.Common.ThemeChanged` event
instead of the OS Specific `events.Linux.SystemThemeChanged` event.
It is the reponsibility of the code in events_common_linux.go to map
it to the common variety.

* [linux] implement WindowDidMove

* [linux] implement debounce for WindowDidMove

* [example] listen for events.Common.WindowDidMove

* [windows] move WindowDidMove mapper outside of DnD guard

* WindowDidResize implementation

* windows: WindowDidResize

* chore: changelog update

* events.Common.WindowDidMove and events.Common.WindowDidResize
2024-06-30 16:11:45 -05:00
Lea Anthony
9d24c039fe Fix linux window button methods 2024-06-08 15:56:17 +10:00
Lea Anthony
bf9e17a6c8
[WEP] Customise Window Titlebars (#3508)
* Add proposal.
Reference Mac implementation

* Add windows support. Update proposal.

* Update example

* Rename Active->Enable,Inactive->Disabled. Ensure window can get controls back after hiding close on windows. Added guide. Updated example.

* Add ExStyle option for setting titlebar style.

* Fix linux builds

* Tidy up
2024-06-08 13:42:27 +10:00
Lea Anthony
e424a85a99
Menu improvements (#3492)
* Expose `DefaultApplicationMenu`.
Add `FindByLabel` and `ItemAt` for finding menu items in a menu

* Add `Menu.RemoveMenuItem()`, `MneuItem.GetAccelerator()` and `MenuItem.RemoveAccelerator()`

* Remove `Update`

* Iterate when removing menu items

* Add `GetSubmenu()`
2024-05-20 21:15:02 +10:00
Lea Anthony
2cee1edcb5
Add window.GetBorderSizes 2024-04-25 15:22:01 +10:00
abichinger
7c921d6a81
[v3 alpha] implement setIcon on linux (#3354)
* implement `linuxApp.setIcon`

* Move code into `linux_cgo.go`
2024-04-09 11:04:54 -05:00
abichinger
db5553ec75
[linux] fix closing of custom context menu #3329 (#3330)
* [linux] fix closing of custom context menu

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-24 16:51:45 +11:00
Lea Anthony
4ab6352504 Set default size for linux windows 2024-03-17 20:57:46 +11:00
Travis McLane
716f4af808 [linux] add missing implementations 2024-03-06 17:10:41 -06:00
Travis McLane
c21784037d wip: fixing rebase issue 2024-03-06 16:59:13 -06:00
Lea Anthony
161444107a Support linux systrays, of sorts... 2024-03-06 16:59:13 -06:00
Lea Anthony
12e2e2101a fix screens 2024-03-06 16:59:13 -06:00
Lea Anthony
e39097a17e fix min/max 2024-03-06 16:59:13 -06:00
Lea Anthony
29363fc07f ToggleDevTools -> OpenDevTools
More refactor CGO methods.
2024-03-06 16:59:13 -06:00
Lea Anthony
02a1b540ce [WIP] refactor CGO methods 2024-03-06 15:43:50 -06:00
Lea Anthony
a048233f4c Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
2024-03-06 15:40:28 -06:00
Lea Anthony
758c4c2c8d Refactor Linux application handling in webview
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
2024-03-06 11:52:06 -06:00
Lea Anthony
adae39efee Add webview GPU policy and update Linux options
The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability.
2024-03-06 11:49:11 -06:00
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
Lea Anthony
6b0daf3da9 Update windowSetupSignalHandlers & linux events 2024-03-06 11:44:55 -06:00
Lea Anthony
b6c5d90c9d Window Flash for Linux
Set Min/Max window buttons
2024-03-06 11:43:16 -06:00
Lea Anthony
a34ccbff33 ToggleDevTools -> OpenDevTools
More refactor CGO methods.
2024-03-06 11:43:12 -06:00
Lea Anthony
4cd4b46772 [WIP] refactor CGO methods 2024-03-06 11:42:19 -06:00
Lea Anthony
3d93c83920 Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
2024-03-06 11:42:19 -06:00
Lea Anthony
809863d61a Refactor Linux application handling in webview
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
2024-03-06 11:42:19 -06:00
Lea Anthony
4c7b643295 Add webview GPU policy and update Linux options
The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability.
2024-03-06 11:42:19 -06:00
Lea Anthony
05b16f1d63 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:42:19 -06:00
Lea Anthony
bfa53dfd6c Update windowSetupSignalHandlers & linux events 2024-03-06 11:42:19 -06:00
Lea Anthony
b249f0d0ce
Bring linux up to date with dev changes 2024-01-21 21:24:30 +11:00
Lea Anthony
1195464acb Improve window teardown on termination
This commit adds a robust teardown process for windows on application shutdown. It introduces a field to track the destruction state of each window and checks such before performing window operations. Also, it enhances the destroy functions within application for thorough clean up. Finally, redundant event handlers related to application termination were removed while fixing file generating challenge in go tasks.
2024-01-09 07:45:56 +11:00
Lea Anthony
0b48c3456b
[linux] Add webkit version detection + capabilities 2023-11-12 08:21:31 +11:00
Lea Anthony
1f16655769
[linux] Allow devtools by default 2023-11-11 19:05:03 +11:00
Travis McLane
385b1dbfd4 [linux] implement 'script-message-received' handling
- use unsafe.Pointers for 'signal_connect'
- add handler for 'script-message-received::external'
  need to update this to handle older versions of webkit2gtk better
  currently removed the ifdef guards (since they don't work in Go code
  directly) - need to reimplement using build tags if required.
2023-11-06 23:29:03 -06:00