Skip to content

Commit

Permalink
Window Grab Operations: Fix regression for GNOME 44
Browse files Browse the repository at this point in the history
Mutter introduced a new flag META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED (1024)
in 2d8fa26c. See that commit for more details. The flag is used to indicate
wether a window is unconstrainted during a grab operation e. g. wether it
can go under the top bar. As an example, this flag will be set, if you use
super + mouse buttons. We currently only check for equality when looking at
the Meta.GrabOp instead of using a bitwise or. That's why for simplicitiy's
sake, just remove the new flag before working with the grabOp (and take
the new flag into account during an upcoming larger refactor).

Fixes #252
  • Loading branch information
Leleat committed Mar 28, 2023
1 parent 31cee43 commit c80e95c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ var Handler = class TilingMoveHandler {

this._displaySignals = [];
const g1Id = global.display.connect('grab-op-begin', (src, window, grabOp) => {
grabOp &= ~1024; // META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED

if (window && moveOps.includes(grabOp))
this._onMoveStarted(window, grabOp);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ var Handler = class TilingResizeHandler {
};

const g1 = global.display.connect('grab-op-begin', (d, window, grabOp) => {
grabOp &= ~1024; // META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED

if (window && isResizing(grabOp))
this._onResizeStarted(window, grabOp);
});
const g2 = global.display.connect('grab-op-end', (d, window, grabOp) => {
grabOp &= ~1024; // META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED

if (window && isResizing(grabOp))
this._onResizeFinished(window, grabOp);
});
Expand Down

0 comments on commit c80e95c

Please sign in to comment.