Skip to content

Commit f65f480

Browse files
authored
Merge pull request #369 from Schneegans/feature/gnome-48
Add support for GNOME 48
2 parents 011239d + d13d39b commit f65f480

File tree

8 files changed

+59
-33
lines changed

8 files changed

+59
-33
lines changed

.github/workflows/badges.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout Repository
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818
- name: Download cloc
1919
run: sudo apt-get update -y && sudo apt-get install -y cloc
2020
- name: Get the Numbers

.github/workflows/checks.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout Repository
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
- name: Download Clang-Format
2222
run: |
2323
sudo apt update -qq
@@ -33,7 +33,7 @@ jobs:
3333
name: Check Compliance with REUSE Specification
3434
runs-on: ubuntu-latest
3535
steps:
36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3737
- name: REUSE Compliance Check
3838
uses: fsfe/reuse-action@v1
3939

@@ -43,12 +43,12 @@ jobs:
4343
if: github.event_name == 'pull_request'
4444
steps:
4545
- name: Checkout Current Repository
46-
uses: actions/checkout@v2
46+
uses: actions/checkout@v4
4747
with:
4848
path: current
4949
ref: ${{ github.ref }}
5050
- name: Checkout Base Repository
51-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
5252
with:
5353
path: base
5454
ref: ${{ github.base_ref }}
@@ -74,7 +74,7 @@ jobs:
7474
name: Run ShellCheck
7575
runs-on: ubuntu-latest
7676
steps:
77-
- uses: actions/checkout@v2
77+
- uses: actions/checkout@v4
7878
- name: Run ShellCheck
7979
run: |
8080
find $GITHUB_WORKSPACE -type f -and \( -name "*.sh" \) | xargs shellcheck
@@ -95,21 +95,21 @@ jobs:
9595
- "gnome-xsession"
9696
- "gnome-wayland-nested"
9797
steps:
98-
- uses: actions/checkout@v2
98+
- uses: actions/checkout@v4
9999
- name: Download Dependencies
100100
run: |
101101
sudo apt update -qq
102-
sudo apt install gettext -qq
102+
sudo apt install gettext imagemagick libglib2.0-dev -qq
103103
- name: Build Fly-Pie
104104
run: make
105105
- name: Test Fly-Pie
106106
run: sudo $GITHUB_WORKSPACE/tests/run-test.sh -v ${{ matrix.version }} -s ${{ matrix.session }}
107-
- uses: actions/upload-artifact@v2
107+
- uses: actions/upload-artifact@v4
108108
if: failure()
109109
with:
110110
name: log_${{ matrix.version }}_${{ matrix.session }}
111111
path: fail.log
112-
- uses: actions/upload-artifact@v2
112+
- uses: actions/upload-artifact@v4
113113
if: failure()
114114
with:
115115
name: screen_${{ matrix.version }}_${{ matrix.session }}

.github/workflows/deploy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout Repository
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818
- name: Install Dependencies
1919
run: |
2020
sudo apt-get update -q
@@ -30,4 +30,4 @@ jobs:
3030
asset_name: [email protected]
3131
tag: ${{ github.ref }}
3232
overwrite: true
33-
draft: true
33+
prerelease: true

docs/changelog.md

+9
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ SPDX-License-Identifier: CC-BY-4.0
99

1010
# Changelog of Fly-Pie
1111

12+
## [unreleased]
13+
14+
**Release Date:** TBD
15+
16+
#### Enhancements
17+
18+
- Ported the extension to GNOME 48.
19+
- Several translation updates. Thanks to all the translators!
20+
1221
## [Fly-Pie 27](https://github.com/schneegans/fly-pie/releases/tag/v27)
1322

1423
**Release Date:** 2024-08-23

metadata.json

+14-18
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
{
2-
"uuid": "[email protected]",
3-
"description": "A marking menu which can be used to launch applications, simulate hotkeys, open URLs and much more. Once installed, press Ctrl+Space to open the default menu. Open the preferences dialog for an interactive tutorial and for creating custom menus!",
4-
"name": "Fly-Pie",
5-
"donations": {
6-
"kofi": "schneegans",
7-
"github": "schneegans",
8-
"paypal": "simonschneegans"
9-
},
10-
"gettext-domain": "flypie",
11-
"settings-schema": "org.gnome.shell.extensions.flypie",
12-
"shell-version": [
13-
"45",
14-
"46",
15-
"47"
16-
],
17-
"url": "https://github.com/Schneegans/Fly-Pie",
18-
"version": 27
19-
}
2+
"uuid": "[email protected]",
3+
"description": "A marking menu which can be used to launch applications, simulate hotkeys, open URLs and much more. Once installed, press Ctrl+Space to open the default menu. Open the preferences dialog for an interactive tutorial and for creating custom menus!",
4+
"name": "Fly-Pie",
5+
"donations": {
6+
"kofi": "schneegans",
7+
"github": "schneegans",
8+
"paypal": "simonschneegans"
9+
},
10+
"gettext-domain": "flypie",
11+
"settings-schema": "org.gnome.shell.extensions.flypie",
12+
"shell-version": ["45", "46", "47", "48"],
13+
"url": "https://github.com/Schneegans/Fly-Pie",
14+
"version": 28
15+
}

prefs.js

+9
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,15 @@ export default class FlyPiePreferences extends ExtensionPreferences {
196196

197197
this._pages.forEach(page => {
198198
window.add(page);
199+
200+
// Starting with GNOME 48 there is an additional scrolled windo in the adw
201+
// preference pages which we do not want. We simply hide it.
202+
if (utils.shellVersionIsAtLeast(48, 'alpha')) {
203+
const scrolledWindow = this._findChildByType(page, Gtk.ScrolledWindow);
204+
if (scrolledWindow) {
205+
scrolledWindow.visible = false;
206+
}
207+
}
199208
});
200209
}
201210

src/extension/Background.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,12 @@ class Background extends Clutter.Actor {
193193
// The open() method above does not really show the background; it's still translucent.
194194
// The actual revealing is done by this method.
195195
reveal() {
196-
Meta.disable_unredirect_for_display(global.display);
196+
// Since GNOME 48 this is a "global" method.
197+
if (Meta.disable_unredirect_for_display) {
198+
Meta.disable_unredirect_for_display(global.display);
199+
} else {
200+
global.compositor.disable_unredirect();
201+
}
197202
this.ease({
198203
opacity: 255,
199204
duration: this._settings.get_double('easing-duration') * 1000,
@@ -220,7 +225,12 @@ class Background extends Clutter.Actor {
220225
duration: this._settings.get_double('easing-duration') * 1000,
221226
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
222227
onStopped: () => {
223-
Meta.enable_unredirect_for_display(global.display);
228+
// Since GNOME 48 this is a "global" method.
229+
if (Meta.disable_unredirect_for_display) {
230+
Meta.enable_unredirect_for_display(global.display);
231+
} else {
232+
global.compositor.enable_unredirect();
233+
}
224234

225235
// Hide completely once the opacity has been faded to zero.
226236
this.visible = false;

src/extension/SelectionWedges.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Clutter from 'gi://Clutter';
1616
import GObject from 'gi://GObject';
1717
import Cairo from 'gi://cairo';
1818
import St from 'gi://St';
19+
import Cogl from 'gi://Cogl';
1920

2021
import * as utils from '../common/utils.js';
2122

@@ -103,7 +104,8 @@ class SelectionWedges extends Clutter.Actor {
103104
// faster than a Clutter.Canvas.
104105
this._wedgeActor = new Clutter.Actor();
105106
this._wedgeShader = new Clutter.ShaderEffect({
106-
shader_type: Clutter.ShaderType.FRAGMENT_SHADER,
107+
shader_type: Cogl.ShaderType ? Cogl.ShaderType.FRAGMENT :
108+
Clutter.ShaderType.FRAGMENT_SHADER,
107109
});
108110

109111
// This shader could be simplified by using vec4's for the colors, but I did not

0 commit comments

Comments
 (0)