5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 03:52:41 +08:00
Commit Graph

67 Commits

Author SHA1 Message Date
LGiki
832d6bc4d3
[v2, linux] Fix StartHidden option not working on Linux (#2624)
* fix: StartHidden option not working on Linux

* chore: add an entry to the changelog
2023-04-30 01:20:39 +10:00
Zámbó, Levente
c3011813b0
linux separate window c and go file (#2275) 2023-01-07 16:20:11 +11: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
e57bfe002a
Fix right mouse button event (#2190) 2022-12-13 07:09:45 +11:00
stffabi
5418b879c4
[linux] Add support for WebKit2GTK 2.36+ features (#2151) 2022-11-30 11:04:12 +01:00
stffabi
f6e46ac1c3
[debug] Introducing debug options for debug builds to allow opening the inspector on startup (#2080) 2022-11-12 19:51:54 +11:00
Zámbó, Levente
de49b1f125
fix gtk_window_begin_resize_drag's mouse button (#1920)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-10-01 15:45:37 +10:00
Zámbó, Levente
2690250378
Add window transparency for linux (#1926) 2022-10-01 15:44:38 +10:00
Zámbó, Levente
13532e00a0
add missing resize for framless window on linux (#1918)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-09-30 08:51:08 +10:00
Lea Anthony
b2069c871d
Refactor app (#1909)
* Application refactor

* [windows] refactor out main loop. Create new application struct. Refactor assethandler/assetserver signatures.

* Refactor darwin app

* Refactor app for linux

* Update v2/internal/frontend/assetserver/assethandler.go

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

* Update v2/internal/frontend/assetserver/assethandler.go

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

* Update v2/internal/frontend/assetserver/assetserver.go

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

* Update v2/internal/frontend/assetserver/assetserver.go

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

Co-authored-by: stffabi <stffabi@users.noreply.github.com>
2022-09-29 18:43:35 +10:00
ZanderCodes
70c484f603
Add Some WindowState (#1349)
* Add Check for WindowState IsMaximised, IsMinimized, IsNormal and IsFullscreen

Solve conflicts

# Conflicts:
#	v2/internal/frontend/desktop/darwin/WailsContext.m
#	v2/internal/frontend/desktop/darwin/frontend.go
#	v2/internal/frontend/desktop/linux/window.go
#	v2/internal/frontend/desktop/windows/window.go

* Add Check for WindowState IsMaximised, IsMinimized, IsNormal and IsFullscreen

Solve conflict
# Conflicts:
#	v2/pkg/runtime/window.go

* Forgot some function to use it

# Conflicts:
#	v2/internal/frontend/desktop/darwin/WailsContext.h
#	v2/internal/frontend/desktop/windows/win32/consts.go
#	v2/internal/frontend/desktop/windows/win32/window.go

* Modify the instructions

# Conflicts:
#	v2/internal/frontend/devserver/devserver.go

* Add Functions to DevServer

# Conflicts:
#	v2/internal/frontend/dispatcher/systemcalls.go
#	v2/internal/frontend/runtime/desktop/window.js
#	v2/internal/frontend/runtime/package-lock.json
#	v2/internal/frontend/runtime/runtime_prod_desktop.js
#	v2/internal/frontend/runtime/wrapper/runtime.d.ts
#	v2/internal/frontend/runtime/wrapper/runtime.js

* Add Callback and JavaScript Functions

# Conflicts:
#	v2/cmd/wails/internal/commands/initialise/templates/generate/assets/common/frontend/wailsjs/runtime/runtime.js
#	v2/internal/frontend/runtime/package-lock.json
#	v2/internal/frontend/runtime/runtime_dev_desktop.js

* Remove Merge lines

* Fix IsMaximised

* Add WindowState Docs

* Update docs

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-08-30 06:52:01 +10:00
Lea Anthony
baff28bb20
Bugfix/linux warnings (#1656)
* Use scaling when setting min/max window

* Fix compile issue. Add debug

* Fix scaling issue

* Fix window widget warnings & shutdown issue. Remove debug lines for linux

* Update dev build with shutdown fix
2022-08-03 21:17:38 +10:00
Lea Anthony
224f7c0c56
Move SetMin/Max calls to main thread (#1684)
* Move SetMin/MAx calls to main thread

* Move setsize back to original location

* Remove debug
2022-08-02 06:51:20 +10:00
Lea Anthony
8e21061e78
Remove debug info for linux 2022-07-26 08:29:00 +10:00
Lea Anthony
ae756a8409
Use scaling when setting min/max window (#1557)
* Use scaling when setting min/max window

* Fix compile issue. Add debug

* Fix scaling issue
2022-07-23 17:15:22 +10:00
skamensky
04d35410de
Expose screen dimensions (#1519)
* get dimensions working for linux

* Cleaning up some GTK code

I was getting the following errors due to some bad casts.

Gdk-CRITICAL **: 18:58:51.943: gdk_monitor_get_geometry: assertion 'GDK_IS_MONITOR (monitor)' failed
Gdk-CRITICAL **: 18:58:51.943: gdk_display_get_monitor_at_window: assertion 'GDK_IS_DISPLAY (display)' failed

This commit fixes these errors

* Adding Screen namespace along with linux implementation

* moving ScreenGetAll into a more appropriate place

* Fixing typescript definition mistake, documentation, ordering of functions, and formatting

* add ScreenGetAll to more templates

* moving screen into its own javascript file

* fixing bug where screen objects are not returned from the runtime function

* rebuilding frontend wrapper package

* adding windows implementation of ScreenGetAll

* adding screen get all implementation for darwin

* reverting a change that is unrelated to the work on expose-dimensions

* removing duplicate comparison

* changing GetNthScreen in screen API on macos

To use frame instead of visibleframe to keep into account the space the the dock takes up
We want to include that space in the calculation in order to keep the sizes of screens consistent across platforms

* Correcting screen jsdoc

It used to say it returned a single screen object. Now it says that it returns an array of screen objects

* Fixing typo in function name

* reverting pointless spacing change

* reverting pointless spacing change

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: shmuel.kamensky <shmuel.kamensky@shutterfly.com>
2022-07-16 12:33:37 +10:00
Lea Anthony
cd35536a79
[linux] Fix SetBackgroundColour 2022-07-04 22:29:51 +10:00
Lea Anthony
3e42d2da05
Rename WindowSetRGBA -> WindowSetBackgroundColour (#1506)
* Rename WindowSetRGBA -> WindowSetBackgroundColour

* Fix Typos
2022-06-29 22:31:49 +10:00
Lea Anthony
7141c972fd
Move WindowGet* to main thread (#1464) 2022-06-29 20:07:16 +10:00
Lea Anthony
c477100374
Add BackgroundColour and deprecate RGBA (#1475) 2022-06-21 19:47:05 +10:00
stffabi
2a0673f99f
[v2, linux] Improve switching to main thread for callbacks (#1392)
Make sure no pointers to the stack are passed to g_idle_add,
because at the time the callback gets executed on the
main thread, the pointer might be invalid.
Go might have reused the stack or grown the stack and the
pointer is invalid.

The concept used on Windows has been ported to Linux.
2022-05-31 20:28:37 +10:00
Zámbó, Levente
794a8ce19f
feature - support linux/arm (#1427) 2022-05-27 19:09:50 -10:00
stffabi
c97e1c50af
[v2, linux] Make sure to execute the menu callbacks on a new goroutine (#1403)
* Make sure to execute the menu callbacks on a new goroutine
* Fix assertion message when opening file dialogs by passing the correct parent window
2022-05-17 20:45:48 +10:00
stffabi
65fb42d9e7
[v2] Add support for external frontend dev servers (#1290)
* [v2] Consolidate AssetServers

* [v2] Support starturl for webview on linux and darwin

* [v2] Add support for frontend DevServer

* [v2] Activate frontend DevServer in svelte template

* [website] Add bleeding edge guide for PRs

* DoNotMerge: Bump Version for testing

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-03-31 00:40:44 +11:00
bearsh
d8bcf7ac70
v2: linux: add icon to linux specific app option and load it during w… (#1272)
* v2: linux: add icon to linux specific app option and load it during window creation

Signed-off-by: Martin Gysel <me@bearsh.org>

* doc: linux specific option: icon
2022-03-30 18:15:58 +11:00
Florent
ec31d49b59
prevent close event being propagated when handled in app (#1297)
closes #1288
2022-03-30 18:13:01 +11:00
Florent
d9e5cce2b2
add support for 'DomReady' callback on linux (#1249)
* add support for 'DomReady' callback on linux
cosmetic: use bodyLen instead of len() in processRequest()

* reformat webViewLoadChanged() for consistency

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-03-14 18:42:38 +11:00
Ian M. Jones
64480ff1ab
Ensure Linux IsFullScreen uses GDK_WINDOW_STATE_FULLSCREEN bitmask appropriately. (#1245) 2022-03-11 15:41:28 +11:00
Ian M. Jones
e9aa0d5c5a
Fix fullscreen on linux arm64 (#1209)
* Fix fatal error on otherwise clean exit.

* Fix race condition while setting title during window creation.

* Fix unexpected signal error when clicking webview should initiate a drag window operation.

* Ensure ExecuteOnMainThread callbacks are removed from the event source list on completion.

* Ensure all ExecuteOnMainThread callbacks use the expected return value on completion.

* Fix potential memory leak when exiting early from startDrag.

* Fix using runtime.WindowFullscreen on Linux ARM64.
2022-03-04 23:07:40 +11:00
Ian M. Jones
c378d935f3
Fix linux unexpected signal errors (#1200)
* Fix fatal error on otherwise clean exit.

* Fix race condition while setting title during window creation.

* Fix unexpected signal error when clicking webview should initiate a drag window operation.

* Ensure ExecuteOnMainThread callbacks are removed from the event source list on completion.

* Ensure all ExecuteOnMainThread callbacks use the expected return value on completion.

* Fix potential memory leak when exiting early from startDrag.
2022-03-04 17:50:43 +11:00
Lea Anthony
c7c068ade0 Add Javascriptcore include. #1198 2022-03-02 20:17:30 +11:00
Lea Anthony
a445db1b7b
Feature/linux v2 beta (#1171)
* Update docusaurus version

* Add install instructions

* Add Linus Distro Support Page

* Update Linus Distro Support Page

* v2.0.0-beta.30

* image

* update blog

* Update blog

* Remove exp tag

* Update banner

* Update banner

* [linux] Fix warning
2022-02-22 21:35:03 +11:00
Lea Anthony
f059c35d9e
Feature: WindowToggleMaximise (#1159)
* [windows] Add WindowToggleMaximise

* Add mac support

* Update docs

* [linux] Toggle Maximise
2022-02-18 20:28:16 +11:00
Lea Anthony
6e8d65e3aa
[linux] Add stdint.h include 2022-02-17 21:23:24 +11:00
Lea Anthony
99ca6d5e77 [Linux] Restore min/max after fullscreen 2022-02-10 19:55:04 +11:00
Lea Anthony
3d02a314b9
[linux] Fix min/max size after fullscreen 2022-02-08 07:04:45 +11:00
Lea Anthony
30a4f47cba
[linux] Fix min/max size 2022-02-08 06:51:52 +11:00
Lea Anthony
668da3a827
[linux] Fix disabling context menu 2022-02-08 06:20:41 +11:00
Lea Anthony
3decd70319
Move more runtime methods to main thread 2022-02-07 20:17:25 +11:00
Lea Anthony
a016f39e97
[linux] Move SetPosition, Center, Fullscreen and UnFullscreen to main thread 2022-02-07 08:48:21 +11:00
Lea Anthony
8699bf7521
[linux] Move SetTitle and startDrag to main thread 2022-02-07 08:47:11 +11:00
Lea Anthony
0971857e7e
Fix position runtime (#1123)
* [linux] Move SetTitle and startDrag to main thread

* [linux] Move SetPosition, Center, Fullscreen and UnFullscreen to main thread

* Fix runtime Window Get/Set Position signatures

* Fix vanilla template keyboard handling
2022-02-03 21:42:14 +11:00
Lea Anthony
ac3808f9c3
Support RGBA, fix compilation error 2022-01-29 11:38:25 +11:00
Lea Anthony
642fa42f25
Feature/v2 linux menus (#1114)
* Render menubar + text menu items

* Support disabled menuitems + callbacks

* Support checkboxes

* Support reusing checkboxes

* Support submenus

* Support Radio menuitems

* Support Menu Accelerators
2022-01-29 07:19:14 +11:00
Lea Anthony
f3cc4b5ebd Support message dialog 2022-01-25 16:27:39 -06:00
Lea Anthony
c58252386f Support default directory, Fixed label, removed TreatPackagesAsDirectories 2022-01-25 16:27:39 -06:00
Travis McLane
b7647b3992 allow action to be overridden by caller 2022-01-25 16:27:39 -06:00
Lea Anthony
6c68e59113 Support OpenFile /
OpenMultipleFiles
2022-01-25 16:27:39 -06:00
Lea Anthony
6e30c6770b Tidy up and slight refactor 2022-01-25 16:27:39 -06:00
Travis McLane
a2d447aecf implement opendialog as callback function 2022-01-25 16:27:39 -06:00