Skip to content

Commit 47d4829

Browse files
jmmarananjackpot51
authored andcommitted
fix: unfullscreen on move
1 parent f0e843a commit 47d4829

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,8 @@ export class Ext extends Ecs.System<ExtEvent> {
11091109
move_monitor(direction: Meta.DisplayDirection) {
11101110
const win = this.focus_window();
11111111
if (!win) return;
1112+
if (win && win.meta.is_fullscreen())
1113+
win.meta.unmake_fullscreen();
11121114

11131115
const prev_monitor = win.meta.get_monitor();
11141116
let next_monitor = Tiling.locate_monitor(win, direction);
@@ -1130,6 +1132,8 @@ export class Ext extends Ecs.System<ExtEvent> {
11301132
move_workspace(direction: Meta.DisplayDirection) {
11311133
const win = this.focus_window();
11321134
if (!win) return;
1135+
if (win && win.meta.is_fullscreen())
1136+
win.meta.unmake_fullscreen();
11331137

11341138
/** Move a window between workspaces */
11351139
const workspace_move = (direction: Meta.MotionDirection) => {

src/tiling.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class Tiler {
7272
toggle_stacking(ext: Ext) {
7373
ext.auto_tiler?.toggle_stacking(ext);
7474
const win = ext.focus_window();
75-
if (win && !win.meta.is_fullscreen()) this.overlay_watch(ext, win);
75+
if (win) this.overlay_watch(ext, win);
7676
}
7777

7878
rect(ext: Ext, monitor: Rectangle): Rectangle | null {
@@ -194,7 +194,11 @@ export class Tiler {
194194
if (this.queue.length === 2) return;
195195
this.queue.send(() => {
196196
const focused = ext.focus_window();
197-
if (focused && !focused.meta.is_fullscreen()) {
197+
if (focused) {
198+
if (focused.meta.is_fullscreen()) {
199+
focused.meta.unmake_fullscreen();
200+
}
201+
198202
// The window that the focused window is being moved onto
199203
const move_to = focus();
200204

@@ -700,7 +704,6 @@ export class Tiler {
700704
if (!this.window) {
701705
const win = ext.focus_window();
702706
if (!win) return;
703-
if (win && win.meta.is_fullscreen()) return;
704707

705708
this.window = win.entity;
706709

0 commit comments

Comments
 (0)