Skip to content

Commit

Permalink
🔀 Merge pull request #178 from Schneegans/feature/gnome-48
Browse files Browse the repository at this point in the history
  • Loading branch information
Schneegans authored Feb 16, 2025
2 parents 615bdaa + d90a52c commit b0b8e59
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/badges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Download cloc
run: sudo apt-get update -y && sudo apt-get install -y cloc
- name: Get the Numbers
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download Clang-Format
run: |
sudo apt update -qq
Expand All @@ -33,7 +33,7 @@ jobs:
name: Check Compliance with REUSE Specification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1

Expand All @@ -43,12 +43,12 @@ jobs:
if: github.event_name == 'pull_request'
steps:
- name: Checkout Current Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: current
ref: ${{ github.ref }}
- name: Checkout Base Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: base
ref: ${{ github.base_ref }}
Expand All @@ -74,7 +74,7 @@ jobs:
name: Run ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run ShellCheck
run: |
find $GITHUB_WORKSPACE -type f -and \( -name "*.sh" \) | xargs shellcheck
Expand All @@ -91,26 +91,26 @@ jobs:
matrix:
version:
- "39"
- "rawhide"
- "40"
- "41"
session:
- "gnome-xsession"
- "gnome-wayland-nested"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download Dependencies
run: |
sudo apt update -qq
sudo apt install gettext -qq
sudo apt update -q
sudo apt install gettext libglib2.0-dev imagemagick
- name: Build Desktop Cube
run: make
- name: Test Desktop Cube
run: sudo $GITHUB_WORKSPACE/tests/run-test.sh -v ${{ matrix.version }} -s ${{ matrix.session }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: log_${{ matrix.version }}_${{ matrix.session }}
path: fail.log
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: screen_${{ matrix.version }}_${{ matrix.session }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update -q
sudo apt-get install gettext
sudo apt-get install libglib2.0-dev gettext
- name: Create Release
run: |
make zip
Expand Down
10 changes: 9 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ SPDX-License-Identifier: CC-BY-4.0

# Changelog of the Desktop Cube Extension

## [Desktop Cube 26](https://github.com/schneegans/Desktop-Cube/releases/tag/v25)
## [Desktop Cube 27](https://github.com/schneegans/Desktop-Cube/releases/tag/v27)

**Release Date:** TBD

#### Enhancements

- Ported the extension to GNOME 48.

## [Desktop Cube 26](https://github.com/schneegans/Desktop-Cube/releases/tag/v26)

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

Expand Down
32 changes: 14 additions & 18 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{
"uuid": "[email protected]",
"description": "Indulge in nostalgia with useless 3D effects.",
"name": "Desktop Cube",
"donations": {
"kofi": "schneegans",
"github": "schneegans",
"paypal": "simonschneegans"
},
"gettext-domain": "desktop-cube",
"settings-schema": "org.gnome.shell.extensions.desktop-cube",
"shell-version": [
"45",
"46",
"47"
],
"url": "https://github.com/Schneegans/Desktop-Cube",
"version": 26
}
"uuid": "[email protected]",
"description": "Indulge in nostalgia with useless 3D effects.",
"name": "Desktop Cube",
"donations": {
"kofi": "schneegans",
"github": "schneegans",
"paypal": "simonschneegans"
},
"gettext-domain": "desktop-cube",
"settings-schema": "org.gnome.shell.extensions.desktop-cube",
"shell-version": ["45", "46", "47", "48"],
"url": "https://github.com/Schneegans/Desktop-Cube",
"version": 27
}
13 changes: 8 additions & 5 deletions src/Skybox.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import GObject from 'gi://GObject';
import Shell from 'gi://Shell';
import GdkPixbuf from 'gi://GdkPixbuf';
import Cogl from 'gi://Cogl';
import St from 'gi://St';

import * as Main from 'resource:///org/gnome/shell/ui/main.js';

Expand Down Expand Up @@ -66,8 +67,9 @@ var SkyboxEffect = GObject.registerClass({
vfunc_build_pipeline() {

// In the vertex shader, we compute the view space position of the actor's corners.
this.add_glsl_snippet(Shell.SnippetHook.VERTEX, 'varying vec4 vsPos;',
'vsPos = cogl_modelview_matrix * cogl_position_in;', false);
this.add_glsl_snippet(
Cogl.SnippetHook ? Cogl.SnippetHook.VERTEX : Shell.SnippetHook.VERTEX,
'varying vec4 vsPos;', 'vsPos = cogl_modelview_matrix * cogl_position_in;', false);

const fragmentDeclares = `
varying vec4 vsPos;
Expand Down Expand Up @@ -102,8 +104,9 @@ var SkyboxEffect = GObject.registerClass({
cogl_color_out = texture2D(uTexture, vec2(x, y));
`;

this.add_glsl_snippet(Shell.SnippetHook.FRAGMENT, fragmentDeclares, fragmentCode,
false);
this.add_glsl_snippet(
Cogl.SnippetHook ? Cogl.SnippetHook.FRAGMENT : Shell.SnippetHook.FRAGMENT,
fragmentDeclares, fragmentCode, false);
}

// For each draw call, we have to set some uniform values.
Expand Down Expand Up @@ -132,7 +135,7 @@ var SkyboxEffect = GObject.registerClass({

try {
const pixbuf = GdkPixbuf.Pixbuf.new_from_stream_finish(result);
const texture = new Clutter.Image();
const texture = new St.ImageContent();
texture.set_data(pixbuf.get_pixels(), FORMATS[pixbuf.get_n_channels() - 1],
pixbuf.get_width(), pixbuf.get_height(),
pixbuf.get_rowstride());
Expand Down

0 comments on commit b0b8e59

Please sign in to comment.