5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 21:10:54 +08:00
Commit Graph

189 Commits

Author SHA1 Message Date
dingda.li
114c15197b fix(windows): correct window restoration behavior after minimization
- Replace SW_RESTORE with SW_SHOW flag
- Resolves #4109
2025-03-04 14:39:06 +08:00
562589540
461d34c620
fix: prevent unnecessary redraws during window minimize/restore (#3955)
* fix: prevent unnecessary redraws during window minimize/restore

This fixes the window flickering issue when minimizing/restoring by:
1. Adding isMinimizing flag to track window state
2. Adding SetPadding filter to prevent redundant redraws
3. Properly handling minimize/restore window states

Fixes #3951

* docs: improve comments and changelog for frameless window flickering fix

- Add detailed comments about frameless window fix
- Update changelog to clarify this is a frameless window issue
- Add bilingual comments for better understanding

Fixes #3951

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-12-26 16:13:46 +11:00
lvyaoting
dd4aa56310
chore: fix some comments (#3932)
Signed-off-by: lvyaoting <lvyaoting@outlook.com>
2024-12-06 14:35:46 +11:00
Andrey Pshenkin
1b6ed1bc00
Allow set window class name via options for Windows (#3828)
* Allow set window class name via options

* update changelog
2024-10-20 13:36:13 +11:00
Lea Anthony
3721d73423
More syscall fixes (#3713)
* More syscall fixes

* Update changelog.mdx
2024-09-02 19:34:22 +10:00
Lea Anthony
9995dae4ad
Nil pointer check for DnD (#3597)
* Nil pointer check for DnD

* Update changelog
2024-08-18 21:04:02 +10:00
Jakub Peleška
022a5ffec4
Fix Drag & Drop JS runtime (#3516)
* Feature/1090 native drag and drop for file and folder (#3203)

* implement basic dnd for linux

* implemented windows

* progress changed linux handling and added coordinates to drop

* progress fix drop coordinates on windows

* progress remove log from windows

* progress move js

* update js after merge

* fix event listener registration

* fix segfault on non file drag

* remove logs, fix coordinates

* minor changes, simplify to drop only

* rename EnableWails -> EnableFileDrop

* add documentation (PR id missing)

* add PR id to changelog

* fix remove casting from malloc

* fix nil check for OnFileDrop's callback

* fix nil check for OnFileDrop skip event when nil

* add error message for nil callback in OnFileDrop

---------

Co-authored-by: lyimmi <lelvente.zambo@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>

* implement native drag and drop for macOS (#3250)

* implement native drag and drop for macOS

* update docs

* add to changelog

* update docs (macOS is supported)

* Fix windows DragAndDrop options

* Fix class unset on dragleave for full frame elements

* improve class unset (nested elements and borders case)

* Fix runtime drop target detection and CSS class assignment

* Edit changelog

* Fix drag-and-drop options in references

* Update v2/internal/frontend/desktop/darwin/WailsWebView.m

* Update v2/internal/frontend/desktop/darwin/WailsWebView.m

---------

Co-authored-by: Zámbó, Levente <levente.zambo@gmail.com>
Co-authored-by: lyimmi <lelvente.zambo@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Andrey Pshenkin <andrey.pshenkin@gmail.com>
Co-authored-by: Pavel Binar <pavel@beamtransfer.io>
2024-06-10 15:15:28 +10:00
hidewrong
9a069653e2
chore: fix some comments (#3399)
Signed-off-by: hidewrong <hidewrong@outlook.com>
2024-04-17 18:42:53 +10:00
lvyaoting
aad811391b
chore: fix function names in comment (#3383)
Signed-off-by: lvyaoting <lvyaoting@outlook.com>
2024-04-09 17:19:06 -05:00
reallylowest
e7756e9274
chore: fix some typos in comments (#3357)
Signed-off-by: reallylowest <sunjinping@outlook.com>
2024-03-31 16:23:18 +11:00
Sean
9cafd85cda
fix: fallback to hardcoded Edge/Chrome/Firefox Windows browser paths if user's default browser no longer exists (#3262)
To reproduce:

- Use Windows
- Set your default browser to Firefox (Settings -> Apps -> Default Apps -> Web Browser)
- Rename your firefox.exe to something.else

The BrowserOpenURL before this commit silently fails.

The BrowserOpenURL after this commit tries to use a hardcoded fallback browser.
If successful, a warning message is logged.
If unsuccessful (default browser and fallback browsers fail), an error message is logged.

Co-authored-by: Sean <sean@malonetuning.com>
2024-03-24 17:09:27 +11:00
ALMAS
3e5df3c7f1
[v2/Windows]Set default extension for save file dialog (#3205)
* Set default extension for save file dialog

* add change log

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-01-17 22:35:15 +11:00
Vladimir
f7c19469a7
v2 [#3133] SingleInstanceData: Fill missing WD as is (#3154)
* [#3133] SingleInstanceData: Fill missing WD as is

* Apply suggestions from code review

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

* Fix: missing `import` for AI suggestions

* Add changelog entry

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-01-04 05:26:24 +11:00
Yong Hui
8efaaffadb
feat: add windows options supports DisablePinchZoom configuration(#2021) (#3115)
* feat: add windows options supports `IsPinchZoomEnabled` configuration(#2021)

* refactor: modify `IsPinchZoomEnabled` to `DisablePinchZoom` ensure default behavior is consistent

* docs: add `DisablePinchZoom` to changelog

* docs: update the description of `DisablePinchZoom` attributes in the document

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-12-15 20:21:50 +11:00
Lea Anthony
9ce0ddb4f8 [chore] lint fixes 2023-11-12 12:30:49 +11:00
Andrey Pshenkin
c24bd5e3e8
Implement Single instance lock feature with passing arguments to initial instance (#2951)
* implement MacOS openFile/openFiles events

* wip: windows file association

* fix macro import

* add file icon copy

* try copy icon

* keep only required part of scripts

* update config schema

* fix json

* set fileAssociation for mac via config

* proper iconName handling

* add fileAssociation icon generator

* fix file association icons bundle

* don't break compatibility

* remove mimeType as not supported linux for now

* add documentation

* adjust config schema

* restore formatting

* try implement single instance lock with params passing

* fix focusing

* fix focusing

* formatting

* use channel buffer for second instance events

* handle errors

* add comment

* remove unused option in file association

* wip: linux single instance lock

* wip: linux single instance

* some experiments with making window active

* try to use unminimise

* remove unused

* try present for window

* try present for window

* fix build

* cleanup

* cleanup

* implement single instance lock on mac os

* implement proper show for windows

* proper unmimimise

* get rid of openFiles mac os. change configuration structure

* remove unused channel

* remove unused function

* add documentation for single instance lock

* add PR link

* changes after review

* update docs

* changes after review

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-10-23 21:31:56 +11:00
Carl Seleborg
b5406cb13e
Add missing runtime.UnlockOSThread() (#2994)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-10-21 16:30:48 +11:00
Mohamed Gharib
3f9067c815
[v2] Devtools tag doesn't enable default context-menu (#2923)
* Devtools tag doesn't enable default context-menu

* Update changelog
2023-09-26 07:43:18 +10:00
stffabi
d370f72ede
[v2, windows] Support async request processing on AssetServer (#2926) 2023-09-20 19:28:18 +02:00
Lea Anthony
3369327ad2
[v2] Support Enabling/Disabling swipe gestures (#2878)
* [v2] Support Enabling/Disabling swipe gestures

* [v2] Update change log

* [v2] Remove old call to PutIsSwipeNavigationEnabled

* Use latest webview2

* Update go-webview2 mod version
2023-09-20 08:23:38 +10:00
Mohamed Gharib
34c725231c
[v2] Refactor devtools (better naming to remove confusion) (#2921) 2023-09-19 20:56:49 +10:00
Lea Anthony
6aa6762f12
Devtools hotkey (#2915)
* Add Ctrl/Cmd+Shift+F12 Hotkey to open devtools when `-devtools` flag used.
2023-09-19 05:56:14 +10:00
Andreas Christou
886bcc7b47
Add print functionality to v2 (#2822)
* Add print functionality to v2

* Update changelog

* Update runtime docs

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-09-06 07:55:36 +10:00
stffabi
761efed84d
[v2] Introduce size and physical size of screens (#2856) 2023-08-26 10:11:01 +10:00
Mohamed Gharib
4162f097f1
[v2, options] Add EnableDefaultContextMenu option (#2733)
* [v2, options] Add EnableDefaultContextMenu option

* Update changelog & docs

* go mod tidy (./v2)

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-06-20 06:31:47 +10:00
Mohamed Gharib
fa851f29c5
[v2] Add -devtools production build flag (#2725)
* [v2] Add devtools production build flag

* Update changelog

* Fix changelog spacing

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-06-19 06:45:01 +10:00
Lea Anthony
f2ab205415
[chore] Use webview2 package (#2687)
* [v2 windows] Use external webview2 package

* Update CHANGELOG
2023-06-10 17:04:31 +10:00
stffabi
496461920f
[v2] DevServer improvements and fixes (#2664)
* [assetserver, darwin] Fix copying request headers by using strdup

* [assetserver, linux] Fake some basic http headers for legacy webkit2 versions to support proxying requests to other servers

This fixes the devserver on v2 for newer vite versions that use the custom
scheme.

* [v2, windows] 304 responses are going to hang the WebView2 so prevent them by removing cache related headers in the request.

* [v2, dev] Now uses the custom schemes `wails://` on macOS and Linux for all Vite versions.

Prevent missing reload after fast multiple savings on Linux and Windows.
2023-05-16 09:35:48 +02:00
stffabi
22b53192e6
[v2, webview2loader] Prevent env and registry overrides when using the go loader (#2668) 2023-05-15 21:12:16 +02:00
stffabi
3853d2d1bf
[v2, windows] Handle webview2 process crashes and add DisableWebViewRendererCodeIntegrity flag (#2627)
* Add flag to disable webview RendererCodeIntegrity checks
* Handle webview2 process crashes
2023-04-27 23:03:26 +02:00
stffabi
767bfcff89
[v2, windows] Make sure to open the CommonFileDialogs on the main thread (#2606)
Otherwise it might have some strange side-effects like blocking
the completion of Deferrals in WebView2 when using custom
IStreams.
2023-04-17 20:50:27 +10:00
Joshua Hull
489689b477
Use json.Marshal instead of strconv.Quote to correctly support unicode (#2509)
* Use json.Marshal instead of strconv.Quote to correctly support unicode

* Add fix to changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-04-16 10:19:40 +10:00
stffabi
6ed0eb217d
[webview2] Fix error handling in CreateWebResourceResponse (#2496)
The old error handling fails on WebView2Runtimes > 110.0.1587.69 and
will show a "connection refused" page and reloads after a short time.
After the reload everything worked as expected again.
2023-03-16 10:49:59 +01:00
Sebastian Bauer
895d6d4b80
Size() calculates DPIs back to default space. (#2325) 2023-01-22 15:25:26 +11:00
stffabi
caa0b6c804
[assetServer, darwin] Use AssetServer native WKWebView request handling (#2283) 2023-01-16 13:02:18 +01:00
stffabi
0a98efeea9
[runtime] Improve —wails-draggable by starting a drag immediately but only for the first click in a series (#2302)
This removes the sometime lagging experience when
starting to drag on Windows. But it's still possible to use
double-click events for adding e.g. a WindowToggleMaximise.
2023-01-16 20:56:13 +11:00
stffabi
d15e673a19
[windows] Some improvements to fullscreen (#2299) 2023-01-15 06:14:15 +01:00
stffabi
aaf039bcff
[windows] Disable frameless decorations during fullscreen (#2288)
Otherwise this leads to thin transparent lines on the window borders on older Windows versions.
2023-01-11 15:22:48 +01:00
stffabi
8e4606d104
[windows] Improve fullscreen mode for frameless windows (#2279)
* Improve fullscreen mode for frameless windows
* Set Window background color in addition to WebView2 background color
2023-01-09 12:15:43 +01:00
Lea Anthony
54ca6c7059
Refactor assetserver into pkg (#2260) 2023-01-08 11:25:21 +01:00
stffabi
284e20a290
Add EnableFraudulentWebsiteDetection to options (#2269)
This allows to explicitly opt-in to scan services for fraudulent
content, such as malware or phishing attempts.
2023-01-06 00:06:26 +11:00
Zámbó, Levente
0a32c1124e
Add common text clipboard support (#2228) 2023-01-05 16:41:07 +11:00
stffabi
ebc653a584
[windows] Add support for AdditionalBrowserArgs to the legacy Webview2Loader (#2267) 2023-01-02 22:41:56 +01:00
Zámbó, Levente
ef5f547d27
Support GPU acceleration settings on Windows & Linux (#2266)
* support GPU acceleration settings Window & Linux

* fix linux empty option crash

* fix change linux gpu policy switch case

* add PR to changelog
2023-01-02 09:38:53 +11:00
Lea Anthony
d3b4105f75
Chore/refactor assetserver (#2250)
* Remove context from API calls

* Remove logger dependency

* Remove fs dependency

* Remove runtime dependency

* Update Windows/Linux calls to NewAssetServerMainPage

* Add missing imports

* fix runtime import clash
2022-12-31 10:36:07 +11:00
stffabi
006b0c65b4
[webview2loader] Add missing windows build constraint (#2201) 2022-12-13 13:51:01 +01:00
stffabi
4aab1e6b93
[webview2loader] Promote go loader from experimental to stable (#2199)
Default webview2loader is now the go loader
2022-12-13 23:27:50 +11:00
Misite Bao
f70d9de366
fix: fix go test errors (#2169)
* fix: fix go test errors

* Add flags to mac test

* Run on all branches

* Update PR workflow

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-12-06 06:45:06 +11:00
Lea Anthony
ea6aee91f1
Refactored build command (#2123)
* Refactored build command

* Update v2/cmd/wails/build.go

Co-authored-by: stffabi <stffabi@users.noreply.github.com>

* WIP

* Refactor `wails doctor`

* Refactor `wails dev`

* Refactor `wails dev`

* Fix merge conflict

* Fix test

* Update build_and_test.yml

Co-authored-by: stffabi <stffabi@users.noreply.github.com>
2022-12-01 18:18:02 +11:00
stffabi
72aef804ef
[windows] Prevent a thin white line at the bottom of a frameless window (#2111)
This seems to be only a problem on some Windows versions.
2022-11-22 20:37:45 +11:00