Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
# Window Gestures

Window Gestures is GNOME Shell extension for managing window with touchpad gestures.
Support up to gnome 49.
Support only for GNOME 45.

## Installation
*Gnome extension repository don't support Gnome 49*
### Manually
**Clone the repository and enter it**
`git clone https://github.com/spitzerl/windowgestures && cd windowgestures`
**Run the building script**
`./build.sh`
**Then install the generated zip**
`gnome-extensions install windowgestures@extension.amarullz.com.zip`
Restart your session and then open your extension manager to activate it.
<!--[![Get from GNOME Extension](./gext.svg)](https://extensions.gnome.org/extension/6343/window-gestures/)-->
[![Get from GNOME Extension](./gext.svg)](https://extensions.gnome.org/extension/6343/window-gestures/)


## Features
Expand Down
21 changes: 10 additions & 11 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import Meta from 'gi://Meta';
import St from 'gi://St';
import Shell from 'gi://Shell';
import Gio from 'gi://Gio';
import Mtk from 'gi://Mtk';

import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js';
Expand Down Expand Up @@ -558,7 +557,7 @@ class Manager {
return;
}
global.window_manager.emit("show-tile-preview",
global.display.get_focus_window(), new Mtk.Rectangle(
global.display.get_focus_window(), new Meta.Rectangle(
{ x: rx, y: ry, width: rw, height: rh }
)
, this._monitorId
Expand Down Expand Up @@ -1039,7 +1038,7 @@ class Manager {
}
if (setmove) {
if (this._targetWindow.allows_move() &&
!this._targetWindow.is_maximized()) {
!this._targetWindow.get_maximized()) {
this._edgeAction = WindowEdgeAction.MOVE;
}
}
Expand Down Expand Up @@ -1101,7 +1100,7 @@ class Manager {
let holdMove = this._getTapHoldMove();

if (!allowMove || holdMove) {
if (!this._targetWindow.is_maximized() &&
if (!this._targetWindow.get_maximized() &&
!this._targetWindow.isTiled) {
this._edgeGestured = 1;
}
Expand All @@ -1112,7 +1111,7 @@ class Manager {
else if (
!this._edgeGestured &&
!this._targetWindow.is_fullscreen() &&
!this._targetWindow.is_maximized() &&
!this._targetWindow.get_maximized() &&
this._targetWindow.allows_move()) {
this._edgeAction = WindowEdgeAction.MOVE;
return this._swipeUpdateMove();
Expand Down Expand Up @@ -1331,7 +1330,7 @@ class Manager {
if (this._isEdge(WindowEdgeAction.MOVE_SNAP_TOP)) {
if (this._targetWindow.can_maximize()) {
this._resetWinPos();
this._targetWindow.set_maximize_flags(Meta.MaximizeFlags.BOTH);
this._targetWindow.maximize(Meta.MaximizeFlags.BOTH);
}
}
else if (this._isEdge(WindowEdgeAction.MOVE_SNAP_LEFT)) {
Expand Down Expand Up @@ -1551,7 +1550,7 @@ class Manager {
activeWin = global.display.get_focus_window();
}
if (activeWin && ((activeWin.allows_move() &&
!activeWin.is_maximized()) || !isWin)) {
!activeWin.get_maximized()) || !isWin)) {
activeWin.activate(
Meta.CURRENT_TIME
);
Expand Down Expand Up @@ -2503,7 +2502,7 @@ class Manager {
}

let winCanMax = activeWin.allows_move() && activeWin.can_maximize();
let winIsMaximized = activeWin.is_maximized();
let winIsMaximized = activeWin.get_maximized();
let winMaxed = Meta.MaximizeFlags.BOTH == winIsMaximized;
if (activeWin.isTiled) {
winIsMaximized = Meta.MaximizeFlags.VERTICAL;
Expand Down Expand Up @@ -2609,7 +2608,7 @@ class Manager {
}
if (this._actionWidgets[wid] && (progress > 0)) {
if (ui == 1) {
activeWin.set_maximize_flags(Meta.MaximizeFlags.BOTH);
activeWin.maximize(Meta.MaximizeFlags.BOTH);
}
else if (ui == 2) {
this._setSnapWindow(0);
Expand Down Expand Up @@ -2648,7 +2647,7 @@ class Manager {
}
else if (ui == 6) {
// restore
activeWin.set_unmaximize_flags(
activeWin.unmaximize(
Meta.MaximizeFlags.BOTH
);
if (activeWin.isTiled) {
Comment on lines +2650 to 2653
Expand Down Expand Up @@ -2680,4 +2679,4 @@ export default class WindowGesturesExtension extends Extension {
this.manager.destroy();
this.manager = null;
}
}
}
Loading