Skip to content

Commit

Permalink
Merge branch 'develop' into animation-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth authored Jan 10, 2024
2 parents 98b30eb + 8d62571 commit 5d3980b
Show file tree
Hide file tree
Showing 332 changed files with 3,114 additions and 1,863 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: WillAbides/setup-go-faster@v1.8.0
- uses: WillAbides/setup-go-faster@v1.13.0
with:
go-version: '1.20.x'
go-version: '1.21.x'

- name: Install lian
run: go install lucor.dev/lian@latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mobile_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ['1.17.x', '1.20.x']
go-version: ['1.19.x', '1.21.x']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: WillAbides/setup-go-faster@v1.8.0
- uses: WillAbides/setup-go-faster@v1.13.0
with:
go-version: ${{ matrix.go-version }}

Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/platform_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,19 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ['1.17.x', '1.20.x']
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: ['1.19.x', '1.21.x']
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
runner: xvfb-run
- os: windows-latest
tags: no_glfw
- os: macos-latest
tags: no_glfw

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: WillAbides/setup-go-faster@v1.8.0
- uses: WillAbides/setup-go-faster@v1.13.0
with:
go-version: ${{ matrix.go-version }}

Expand All @@ -47,3 +45,20 @@ jobs:
- name: Wayland Tests
run: go test -tags no_glfw,ci,wayland ./...
if: ${{ runner.os == 'Linux' }}

windows_tests:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
go-version: ['1.20.x', '1.21.x']
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: WillAbides/[email protected]
with:
go-version: ${{ matrix.go-version }}

- name: Tests
run: ${{ matrix.runner }} go test "-test.benchtime" 10ms -tags no_glfw ./...
8 changes: 4 additions & 4 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: WillAbides/setup-go-faster@v1.8.0
- uses: WillAbides/setup-go-faster@v1.13.0
with:
go-version: '1.20.x'
go-version: '1.21.x'

- name: Get dependencies
run: >-
Expand All @@ -33,7 +33,7 @@ jobs:
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install honnef.co/go/tools/cmd/[email protected].2
go install honnef.co/go/tools/cmd/[email protected].6
go install github.com/mattn/goveralls@latest
- name: Vet
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/web_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: WillAbides/setup-go-faster@v1.8.0
- uses: WillAbides/setup-go-faster@v1.13.0
with:
go-version: '1.17.x'
go-version: '1.19.x'

- name: Get dependencies
run: sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev
Expand All @@ -26,9 +26,3 @@ jobs:
GOARCH: wasm
working-directory: cmd/fyne_demo
run: go build

- name: Build GopherJS and Wasm full website
run: |
go install github.com/gopherjs/gopherjs@latest
go install ./cmd/fyne
cd cmd/fyne_demo && fyne package --target=web
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,39 @@
This file lists the main changes with each version of the Fyne toolkit.
More detailed release notes can be found on the [releases page](https://github.com/fyne-io/fyne/releases).

## 2.4.3 - 23 December 2023

### Fixed

* Fix OpenGL init for arm64 desktop devices
* System tray icon on Mac is showing the app ID (#4416)
* Failure with fyne release -os android/arm (#4174)
* Android GoBack with forcefully close the app even if the keyboard is up (#4257)
* *BSD systems using the wrong (and slow) window resize
* Optimisations to reduce memory allocations in List, GridWrap, driver and mime type handling
* Reduce calls to C and repeated size checks in painter and driver code


## 2.4.2 - 22 November 2023

### Fixed

* Markdown only shows one horizontal rule (#4216)
* Spacer in HBox with hidden item will cause an additional trailing padding (#4259)
* Application crash when fast clicking the folders inside the file dialog (#4260)
* failed to initialise OpenGL (#437)
* App panic when clicking on a notification panel if there's a systray icon (#4385)
* Systray cannot be shown on Ubuntu (#3678, #4381)
* failed to initialise OpenGL on Windows dual-chip graphics cards (#437)
* Reduce memory allocations for each frame painted
* RichText may not refresh if segments manually replaced
* Correct URI.Extension() documentation
* Update for security fixes to x/sys and x/net
* Inconsistent rendering of Button widget (#4243)
* PasswordEntry initial text is not obscured (#4312)
* Pasting text in Entry does not update cursor position display (#4181)


## 2.4.1 - 9 October 2023

### Fixed
Expand Down
15 changes: 3 additions & 12 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,11 @@ type App interface {
SetCloudProvider(CloudProvider) // configure cloud for this app
}

// app contains an App variable, but due to atomic.Value restrictions on
// interfaces we need to use an indirect type, i.e. appContainer.
var app atomic.Value // appContainer

// appContainer is a dummy container that holds an App instance. This
// struct exists to guarantee that atomic.Value can store objects with
// same type.
type appContainer struct {
current App
}
var app atomic.Pointer[App]

// SetCurrentApp is an internal function to set the app instance currently running.
func SetCurrentApp(current App) {
app.Store(appContainer{current})
app.Store(&current)
}

// CurrentApp returns the current application, for which there is only 1 per process.
Expand All @@ -104,7 +95,7 @@ func CurrentApp() App {
LogError("Attempt to access current Fyne app when none is started", nil)
return nil
}
return (val).(appContainer).current
return *val
}

// AppMetadata captures the build metadata for an application.
Expand Down
8 changes: 4 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type fyneApp struct {
uniqueID string

cloud fyne.CloudProvider
lifecycle fyne.Lifecycle
lifecycle app.Lifecycle
settings *settings
storage fyne.Storage
prefs fyne.Preferences
Expand Down Expand Up @@ -97,7 +97,7 @@ func (a *fyneApp) Preferences() fyne.Preferences {
}

func (a *fyneApp) Lifecycle() fyne.Lifecycle {
return a.lifecycle
return &a.lifecycle
}

func (a *fyneApp) newDefaultPreferences() *preferences {
Expand Down Expand Up @@ -131,11 +131,11 @@ func makeStoreDocs(id string, s *store) *internal.Docs {
}

func newAppWithDriver(d fyne.Driver, id string) fyne.App {
newApp := &fyneApp{uniqueID: id, driver: d, lifecycle: &app.Lifecycle{}}
newApp := &fyneApp{uniqueID: id, driver: d}
fyne.SetCurrentApp(newApp)

newApp.prefs = newApp.newDefaultPreferences()
newApp.lifecycle.(*app.Lifecycle).SetOnStoppedHookExecuted(func() {
newApp.lifecycle.SetOnStoppedHookExecuted(func() {
if prefs, ok := newApp.prefs.(*preferences); ok {
prefs.forceImmediateSave()
}
Expand Down
7 changes: 3 additions & 4 deletions app/app_darwin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && !js && !wasm && !test_web_driver
// +build !ci,!js,!wasm,!test_web_driver
//go:build !ci && !wasm && !test_web_driver

package app

Expand All @@ -16,11 +15,11 @@ void sendNotification(char *title, char *content);
import "C"
import (
"fmt"
"os/exec"
"strings"
"unsafe"

"fyne.io/fyne/v2"
"golang.org/x/sys/execabs"
)

func (a *fyneApp) SendNotification(n *fyne.Notification) {
Expand Down Expand Up @@ -53,7 +52,7 @@ func fallbackNotification(title, content string) {
template := `display notification "%s" with title "%s"`
script := fmt.Sprintf(template, escapeNotificationString(content), escapeNotificationString(title))

err := execabs.Command("osascript", "-e", script).Start()
err := exec.Command("osascript", "-e", script).Start()
if err != nil {
fyne.LogError("Failed to launch darwin notify script", err)
}
Expand Down
1 change: 0 additions & 1 deletion app/app_darwin.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci
// +build !ci

#import <Foundation/Foundation.h>
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
Expand Down
1 change: 0 additions & 1 deletion app/app_darwin_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && !ios
// +build !ci,!ios

package app

Expand Down
8 changes: 0 additions & 8 deletions app/app_debug.go

This file was deleted.

8 changes: 3 additions & 5 deletions app/app_desktop_darwin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && !ios && !js && !wasm && !test_web_driver
// +build !ci,!ios,!js,!wasm,!test_web_driver
//go:build !ci && !ios && !wasm && !test_web_driver

package app

Expand All @@ -17,10 +16,9 @@ import "C"
import (
"net/url"
"os"
"os/exec"
"path/filepath"

"golang.org/x/sys/execabs"

"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
)
Expand Down Expand Up @@ -54,7 +52,7 @@ func rootConfigDir() string {
}

func (a *fyneApp) OpenURL(url *url.URL) error {
cmd := execabs.Command("open", url.String())
cmd := exec.Command("open", url.String())
cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr
return cmd.Run()
}
Expand Down
1 change: 0 additions & 1 deletion app/app_desktop_darwin.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && !ios
// +build !ci,!ios

extern void themeChanged();

Expand Down
1 change: 0 additions & 1 deletion app/app_gl.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && !android && !ios && !mobile
// +build !ci,!android,!ios,!mobile

package app

Expand Down
5 changes: 1 addition & 4 deletions app/app_goxjs.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//go:build !ci && (!android || !ios || !mobile) && (js || wasm || test_web_driver)
// +build !ci
// +build !android !ios !mobile
// +build js wasm test_web_driver
//go:build !ci && (!android || !ios || !mobile) && (wasm || test_web_driver)

package app

Expand Down
2 changes: 0 additions & 2 deletions app/app_mobile.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//go:build !ci && (android || ios || mobile)
// +build !ci
// +build android ios mobile

package app

Expand Down
1 change: 0 additions & 1 deletion app/app_mobile_and.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && android
// +build !ci,android

#include <android/log.h>
#include <jni.h>
Expand Down
1 change: 0 additions & 1 deletion app/app_mobile_and.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && android
// +build !ci,android

package app

Expand Down
1 change: 0 additions & 1 deletion app/app_mobile_and_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && android
// +build !ci,android

package app

Expand Down
1 change: 0 additions & 1 deletion app/app_mobile_ios.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && ios
// +build !ci,ios

package app

Expand Down
1 change: 0 additions & 1 deletion app/app_mobile_ios.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && ios
// +build !ci,ios

#import <UIKit/UIKit.h>

Expand Down
3 changes: 1 addition & 2 deletions app/app_notlegacy_darwin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !ci && !legacy && !js && !wasm && !test_web_driver
// +build !ci,!legacy,!js,!wasm,!test_web_driver
//go:build !ci && !legacy && !wasm && !test_web_driver

package app

Expand Down
20 changes: 0 additions & 20 deletions app/app_openurl_js.go

This file was deleted.

Loading

0 comments on commit 5d3980b

Please sign in to comment.