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

82 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
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
Lea Anthony
65f95b0380
Removed OnShouldClose: Create single way of handling conditional and unconditional close. 2024-12-23 08:23:07 +11:00
Lea Anthony
454d170dfb
[mac] setPosition - adjust based on scale factor 2024-12-20 18:12:54 +11:00
Lea Anthony
296b9debd3
Support fullscreen for frameless windows. 2024-12-07 21:14:38 +11:00
Lea Anthony
5445aebe94
Ensure windowDidBecomeKey callback is running on main thread 2024-12-07 20:45:08 +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
Lea Anthony
d18b7bc4b8
V3 alpha feature/file association port (#3873)
* Update nsis template

* Move app data into config.yml

* mac support

* Add FileAssociations application config option
Support `ApplicationOpenedWithFile` event on Windows
Add docs

* Add FileAssociations application config option
Support `ApplicationOpenedWithFile` event on Windows
Add docs
Add test project

* Update example & docs.
Fix show window bug.

* Fix window show event bug

* Update changelog
2024-11-09 08:58:20 +11:00
Lea Anthony
b27aed2497
[mac] fix always on top during window creation (#3841)
* [mac] fix always on top during window creation

* Update changelog.md
2024-10-20 13:14:26 +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
Lea Anthony
7fafee8a6c [mac] events updates 2024-09-08 20:14:45 +10:00
Oleg Gulevskyy
b756bce67f
Set MacOS window levels (NSWindow) (#3674)
* set nswindow levels via mac options

* add changelog description

* update changelog to conform with others
2024-08-20 18:06:45 +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
f738f1e246 Add more macOS version checks 2024-06-08 15:16:33 +10:00
Lea Anthony
95c751d4ac Fix compilation issue on Darwin < 12.3 2024-06-08 13:53:31 +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
2cee1edcb5
Add window.GetBorderSizes 2024-04-25 15:22:01 +10:00
Lea Anthony
e6805707d8 Fix mac compilation issues 2024-03-14 08:52:10 +11: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
Fabio Massaioli
7e687750b2
[v3] Add option for showing the toolbar in fullscreen mode on macOS (#3282)
* Add option for showing the toolbar in fullscreen mode on macOS

* Add an example demonstrating the ShowToolbarWhenFullscreen option

* Update docs

* Add changelog entry

* Run go mod tidy
2024-03-02 20:10:25 +11:00
Lea Anthony
471d626043
Add control to disable window buttons on Mac
Three new options have been introduced in the application options for MacOS to disable the minimize, maximize, and close buttons on the window. Corresponding functionality has been added in the webview window for darwin to handle these new options. These changes have been showcased in the window example main.go file.
2024-02-08 08:31:58 +11:00
Lea Anthony
7674f8eb2b Fixed dialogs on macOS. Update WML example to use compiled runtime. 2024-01-25 21:00:33 +11:00
Lea Anthony
6522657893
Refactor menu functions and streamline devtools toggle across systems
This update adds implementation to several menu item functions, replacing their previous 'not implemented' state. This includes actions for close, reload, forcing reload, toggling of fullscreen, reset zoom, and others. The update also includes modifications for the handling of developer tools toggle under different build configurations. This refactoring is aimed to standardize devtools configuration across different operating systems.
2024-01-21 20:52:32 +11:00
Lea Anthony
861ddea1b2
Add option to prevent application shutdown
This update allows the application shutdown to be cancelled. It implements the shouldQuit function, which can prevent the application from quitting if it returns false. Additional checks have been added to ensure cleanup and quit processes are performed only if required. The darwin delegate and linux and windows applications were modified to include this new functionality.
2024-01-17 20:45: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
985c5bf8e2 [darwin] Support Ignore mouse events
[darwin] Support applicationSupportsSecureRestorableState
Update video example
2023-10-29 20:29:45 +11:00
Lea Anthony
7795a2a46f
Fix modifier processing on windows.
Move info logs to debug.
2023-10-15 13:53:31 +11:00
Lea Anthony
ebe91ba11d [darwin] Disable listener caching. Run execJS on main thread. 2023-10-07 20:08:22 +11:00
Lea Anthony
255690eee0 [darwin] Add webview preferences 2023-09-30 15:23:56 +10:00
Lea Anthony
86b6e10620
[darwin]AlwaysOnTop: NSStatusWindowLevel -> NSFloatingWindowLevel 2023-09-30 14:27:48 +10:00
Lea Anthony
7cdab16ba9
Add API docs. Do small refactors 2023-09-24 08:57:40 +10:00
Lea Anthony
af8ee6703e [darwin] Support keybindings 2023-09-20 21:34:50 +10:00
Lea Anthony
bb3a0cc54f
Add WebviewWindow.IsFocused() 2023-09-13 08:57:20 +10:00
Lea Anthony
d390cac8db
Fix EnableFraudulentWebsiteWarnings for mac 2023-09-07 21:33:11 +10:00
Lea Anthony
d44c8eba1c
[v3] Use system logger instead of println 2023-08-28 20:30:40 +10:00
Lea Anthony
946a4c56a0 [v3 mac] Better logging 2023-08-18 09:58:43 +10:00
Lea Anthony
5e76a5e76a [v3 mac] Fix event callback signatures 2023-07-12 21:29:01 +10:00
Lea Anthony
d6cfe4414d
[v3 Windows] Add WebviewWindow.Flash() 2023-07-11 20:10:18 +10:00
Lea Anthony
3d323ab9d2 [v3] Fix systray example. PositionWindow now takes an offset. EventApplicationDidResignActive -> EventApplicationDidResignActiveNotification 2023-07-04 19:26:00 +10:00
Lea Anthony
5737b3cc7b [v3 mac] Fix merge issues 2023-06-25 10:13:20 +10:00
Lea Anthony
4de5e1b9f1
[v3] Add WindowUnFocus event 2023-06-24 13:23:50 +10:00
Lea Anthony
c96cccab2e
[v3] Add Window AbsolutePosition/SetAbsolutePosition 2023-06-23 21:14:26 +10:00
Lea Anthony
45cfbe917e
[v3] Position/GetPosition -> RelativePosition/GetRelativePosition 2023-06-23 20:49:27 +10:00
Lea Anthony
76672facfe
[v3] Add window Enabled method. Fix dialog attachment 2023-06-23 19:48:04 +10:00