Skip to content
Open
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
21 changes: 11 additions & 10 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ 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 @@ -557,7 +558,7 @@ class Manager {
return;
}
global.window_manager.emit("show-tile-preview",
global.display.get_focus_window(), new Meta.Rectangle(
global.display.get_focus_window(), new Mtk.Rectangle(
{ x: rx, y: ry, width: rw, height: rh }
)
, this._monitorId
Expand Down Expand Up @@ -1038,7 +1039,7 @@ class Manager {
}
if (setmove) {
if (this._targetWindow.allows_move() &&
!this._targetWindow.get_maximized()) {
!this._targetWindow.is_maximized()) {
this._edgeAction = WindowEdgeAction.MOVE;
}
}
Expand Down Expand Up @@ -1100,7 +1101,7 @@ class Manager {
let holdMove = this._getTapHoldMove();

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

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