Skip to content

Commit

Permalink
fix: do not handle window resizing as window movement
Browse files Browse the repository at this point in the history
  • Loading branch information
domferr committed Mar 6, 2024
1 parent f8b7030 commit d1b1d4d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/tilingManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Display, Rectangle, SizeChange, Window } from '@gi-types/meta10';
import { Display, Rectangle, SizeChange, Window, GrabOp } from '@gi-types/meta10';
import { logger } from "@/utils/shell";
import { TileGroup } from "@/components/tileGroup";
import { buildTileMargin, global, isPointInsideRect, Main } from "@/utils/ui";
Expand Down Expand Up @@ -87,13 +87,16 @@ export class TilingManager {
*/
public enable() {
if (!this._signalsIds[SIGNAL_GRAB_OP_BEGIN]) {
this._signalsIds[SIGNAL_GRAB_OP_BEGIN] = global.display.connect(SIGNAL_GRAB_OP_BEGIN, (_display: Display, window: Window) => {
this._signalsIds[SIGNAL_GRAB_OP_BEGIN] = global.display.connect(SIGNAL_GRAB_OP_BEGIN, (_display: Display, window: Window, grabOp: GrabOp) => {
if (grabOp != GrabOp.MOVING) return;

this._onWindowGrabBegin(window);
});
}

if (!this._signalsIds[SIGNAL_GRAB_OP_END]) {
this._signalsIds[SIGNAL_GRAB_OP_END] = global.display.connect(SIGNAL_GRAB_OP_END, (_display: Display, window: Window) => {
this._signalsIds[SIGNAL_GRAB_OP_END] = global.display.connect(SIGNAL_GRAB_OP_END, (_display: Display, window: Window, grabOp: GrabOp) => {
if (grabOp != GrabOp.MOVING) return;
if (!window.allows_resize() || !window.allows_move()) return;

this._onWindowGrabEnd(window);
Expand Down

0 comments on commit d1b1d4d

Please sign in to comment.