Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
jtaala committed Aug 6, 2024
2 parents fd31a03 + 2b25b20 commit 797cf26
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"url": "https://github.com/paperwm/PaperWM",
"settings-schema": "org.gnome.shell.extensions.paperwm",
"shell-version": [ "45", "46" ],
"version-name": "46.15.0",
"version-name": "46.15.1",
"donations": {
"buymeacoffee": "jaytaala",
"patreon": "valpackett"
Expand Down
Binary file modified schemas/gschemas.compiled
Binary file not shown.
4 changes: 2 additions & 2 deletions schemas/org.gnome.shell.extensions.paperwm.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@
</key>

<key type="as" name="drift-left">
<default><![CDATA[['<Ctrl><Shift>Left']]]></default>
<default><![CDATA[['<Super>bracketleft']]]></default>
<summary>Drift tiling viewport to the left</summary>
</key>
<key type="as" name="drift-right">
<default><![CDATA[['<Ctrl><Shift>Right']]]></default>
<default><![CDATA[['<Super>bracketright']]]></default>
<summary>Drift tiling viewport to the right</summary>
</key>

Expand Down
33 changes: 15 additions & 18 deletions scratch.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,22 @@ export function disable() {
The actual window actor (not clone) is tweened to ensure it's on top of the
other windows/clones (clones if the space animates)
*/
export function easeScratch(metaWindow, targetX, targetY, tweenParams = {}) {
let f = metaWindow.get_frame_rect();
let b = metaWindow.get_buffer_rect();
let dx = f.x - b.x;
let dy = f.y - b.y;

Easer.addEase(metaWindow.get_compositor_private(), Object.assign(
{
time: Settings.prefs.animation_time,
x: targetX - dx,
y: targetY - dy,
export function easeScratch(metaWindow, targetX, targetY, params = {}) {
const complete = params?.onComplete ?? function() {};
const f = metaWindow.get_frame_rect();
const b = metaWindow.get_buffer_rect();
const dx = f.x - b.x;
const dy = f.y - b.y;

Easer.addEase(metaWindow.get_compositor_private(), {
x: targetX - dx,
y: targetY - dy,
time: Settings.prefs.animation_time,
onComplete: () => {
metaWindow.move_frame(true, targetX, targetY);
complete();
},
tweenParams,
{
onComplete (...args) {
metaWindow.move_frame(true, targetX, targetY);
tweenParams.onComplete && tweenParams.onComplete.apply(this, args);
},
}));
});
}

export function makeScratch(metaWindow) {
Expand Down
2 changes: 1 addition & 1 deletion tiling.js
Original file line number Diff line number Diff line change
Expand Up @@ -4955,7 +4955,7 @@ export function centerWindowHorizontally(metaWindow) {

const targetX = workArea.x + Math.round((workArea.width - frame.width) / 2);
if (space.indexOf(metaWindow) === -1) {
metaWindow.move_frame(true, targetX + monitor.x, frame.y);
Scratch.easeScratch(metaWindow, targetX + monitor.x, frame.y);
} else {
move_to(space, metaWindow, {
x: targetX,
Expand Down

0 comments on commit 797cf26

Please sign in to comment.