Skip to content

Commit

Permalink
fix: Do not unfullscreen fullscreen windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mmstick authored and jackpot51 committed May 26, 2022
1 parent b2471b8 commit 42102e9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
20 changes: 0 additions & 20 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -895,13 +895,8 @@ export class Ext extends Ecs.System<ExtEvent> {
if (prev.is_maximized()) {
prev.meta.unmaximize(Meta.MaximizeFlags.BOTH);
}

if (prev.meta.is_fullscreen()) {
prev.meta.unmake_fullscreen();
}
} else if (prev.stack) {
prev.meta.unmaximize(Meta.MaximizeFlags.BOTH)
prev.meta.unmake_fullscreen()
this.auto_tiler.forest.stacks.get(prev.stack)?.restack()
}
}
Expand Down Expand Up @@ -1019,10 +1014,6 @@ export class Ext extends Ecs.System<ExtEvent> {
if (compare.is_maximized()) {
compare.meta.unmaximize(Meta.MaximizeFlags.BOTH);
}

if (compare.meta.is_fullscreen()) {
compare.meta.unmake_fullscreen();
}
}
}
}
Expand Down Expand Up @@ -1266,8 +1257,6 @@ export class Ext extends Ecs.System<ExtEvent> {
move_monitor(direction: Meta.DisplayDirection) {
const win = this.focus_window();
if (!win) return;
if (win && win.meta.is_fullscreen())
win.meta.unmake_fullscreen();

const prev_monitor = win.meta.get_monitor();
const next_monitor = Tiling.locate_monitor(win, direction);
Expand All @@ -1289,8 +1278,6 @@ export class Ext extends Ecs.System<ExtEvent> {
move_workspace(direction: Meta.DisplayDirection) {
const win = this.focus_window();
if (!win) return;
if (win && win.meta.is_fullscreen())
win.meta.unmake_fullscreen();

/** Move a window between workspaces */
const workspace_move = (direction: Meta.MotionDirection) => {
Expand Down Expand Up @@ -1547,13 +1534,6 @@ export class Ext extends Ecs.System<ExtEvent> {
const actor = win.meta.get_compositor_private();
if (actor) global.window_group.set_child_above_sibling(actor, null);

if (win.meta.is_fullscreen()) {
this.size_changed_block();
win.meta.unmake_fullscreen();
win.meta.maximize(Meta.MaximizeFlags.BOTH);
this.size_changed_unblock();
}

this.on_monitor_changed(win, (_cfrom, cto, workspace) => {
if (win) {
win.ignore_detach = true;
Expand Down
1 change: 0 additions & 1 deletion src/mod.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ declare namespace Meta {
move_resize_frame(user_op: boolean, x: number, y: number, w: number, h: number): boolean;
raise(): void;
skip_taskbar: boolean;
unmake_fullscreen(): void;
unmaximize(flags: any): void;
unminimize(): void;
}
Expand Down
4 changes: 0 additions & 4 deletions src/tiling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@ export class Tiler {
this.queue.send(() => {
const focused = ext.focus_window();
if (focused) {
if (focused.meta.is_fullscreen()) {
focused.meta.unmake_fullscreen();
}

// The window that the focused window is being moved onto
const move_to = focus();

Expand Down

0 comments on commit 42102e9

Please sign in to comment.