Skip to content

Commit

Permalink
🔀 Merge pull request #155 from Schneegans/feature/rawhide
Browse files Browse the repository at this point in the history
  • Loading branch information
Schneegans authored Feb 27, 2024
2 parents d913a69 + be45913 commit e1267a5
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
matrix:
version:
- "39"
#- "rawhide"
- "rawhide"
session:
- "gnome-xsession"
- "gnome-wayland-nested"
Expand Down
3 changes: 2 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ SPDX-License-Identifier: CC-BY-4.0

#### Enhancements

- The extension has been updated to work with GNOME 46.
- Many translation updates. Thanks to all the translators!
- All CI jobs are now executed for GNOME 45 as well.
- All CI jobs are now executed for GNOME 45 and GNOME 46 as well.

## [Desktop Cube 21 [backport release]](https://github.com/schneegans/Desktop-Cube/releases/tag/v21)

Expand Down
54 changes: 38 additions & 16 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import St from 'gi://St';

import * as Util from 'resource:///org/gnome/shell/misc/util.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as Config from 'resource:///org/gnome/shell/misc/config.js';
import {PressureBarrier} from 'resource:///org/gnome/shell/ui/layout.js';
import {WorkspacesView, FitMode} from 'resource:///org/gnome/shell/ui/workspacesView.js';
import {SwipeTracker} from 'resource:///org/gnome/shell/ui/swipeTracker.js';
Expand All @@ -36,6 +37,8 @@ import {Skybox} from './src/Skybox.js';
// switching workspaces in desktop mode to make them look like cube faces. //
//////////////////////////////////////////////////////////////////////////////////////////

const [GS_VERSION] = Config.PACKAGE_VERSION.split('.').map(s => Number(s));

// Maximum degrees the cube can be rotated up and down.
const MAX_VERTICAL_ROTATION = 50;

Expand Down Expand Up @@ -621,23 +624,42 @@ export default class DesktopCube extends Extension {
this._rightBarrier.destroy();
}

this._leftBarrier = new Meta.Barrier({
display: global.display,
x1: 0,
x2: 0,
y1: 1,
y2: global.stage.height,
directions: Meta.BarrierDirection.POSITIVE_X,
});
// Since GNOME 46, the display property is not required anymore.
if (GS_VERSION <= 45) {
this._leftBarrier = new Meta.Barrier({
display: global.display,
x1: 0,
x2: 0,
y1: 1,
y2: global.stage.height,
directions: Meta.BarrierDirection.POSITIVE_X,
});

this._rightBarrier = new Meta.Barrier({
display: global.display,
x1: global.stage.width,
x2: global.stage.width,
y1: 1,
y2: global.stage.height,
directions: Meta.BarrierDirection.NEGATIVE_X,
});
this._rightBarrier = new Meta.Barrier({
display: global.display,
x1: global.stage.width,
x2: global.stage.width,
y1: 1,
y2: global.stage.height,
directions: Meta.BarrierDirection.NEGATIVE_X,
});
} else {
this._leftBarrier = new Meta.Barrier({
x1: 0,
x2: 0,
y1: 1,
y2: global.stage.height,
directions: Meta.BarrierDirection.POSITIVE_X,
});

this._rightBarrier = new Meta.Barrier({
x1: global.stage.width,
x2: global.stage.width,
y1: 1,
y2: global.stage.height,
directions: Meta.BarrierDirection.NEGATIVE_X,
});
}

this._pressureBarrier.addBarrier(this._leftBarrier);
this._pressureBarrier.addBarrier(this._rightBarrier);
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"gettext-domain": "desktop-cube",
"settings-schema": "org.gnome.shell.extensions.desktop-cube",
"shell-version": [
"45"
"45",
"46"
],
"url": "https://github.com/Schneegans/Desktop-Cube",
"version": 22
Expand Down
2 changes: 1 addition & 1 deletion tests/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ do_in_pod 'echo "export GSK_RENDERER=cairo" >> .bash_profile'
# ----------------------------------------------------- wait for the container to start up

echo "Waiting for D-Bus."
do_in_pod wait-user-bus.sh > /dev/null 2>&1
sleep 5


# ----------------------------------------------------- install the to-be-tested extension
Expand Down

0 comments on commit e1267a5

Please sign in to comment.