Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Newly-created forks not having the correct orientation #1148

Open
wants to merge 2 commits into
base: master_focal
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ configure:
sh scripts/configure.sh

compile: $(sources) clean
env PROJECTS="$(PROJECTS)" sh scripts/transpile.sh
env PROJECTS="$(PROJECTS)" ./scripts/transpile.sh

# Rebuild, install, reconfigure local settings, restart shell, and listen to journalctl logs
debug: depcheck compile install install-system76-plugins configure enable restart-shell listen
Expand Down
6 changes: 3 additions & 3 deletions scripts/transpile.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ glib-compile-schemas schemas &

for proj in ${PROJECTS}; do
mkdir -p _build/${proj}
tsc --p src/${proj} &
tsc --p src/${proj}
done

tsc &
tsc

wait

Expand All @@ -34,7 +34,7 @@ cp -r metadata.json icons schemas *.css _build &

for src in $(find target -name '*.js'); do
dest=$(echo $src | sed s#target#_build#g)
transpile &
transpile
done

wait
5 changes: 1 addition & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ export class Ext extends Ecs.System<ExtEvent> {

private size_requests: Map<GObject.Object, SignalID> = new Map();

/** Used to debounce on_focus triggers */
private focus_trigger: null | SignalID = null;

// Entity-component associations

/** Store for stable sequences of each registered window */
Expand Down Expand Up @@ -2582,7 +2579,7 @@ function _show_skip_taskbar_windows(ext: Ext) {
// are skip taskbar true
(meta_win.get_wm_class() !== null &&
!gnome_shell_wm_class) ||
default_isoverviewwindow_ws(win);
default_isoverviewwindow_ws(win));
};
}
}
Expand Down
10 changes: 6 additions & 4 deletions src/fork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ export class Fork {
let area: [number, number, number, number];

if (this.is_horizontal()) {
const width = this.area.width - this.length_left + ext.gap_inner;
area = [width, this.area.y, this.area.width - width, this.area.height];
const xpos = this.area.x + this.length_left + ext.gap_inner
const width = this.area.width - this.length_left - ext.gap_inner
area = [xpos, this.area.y, width, this.area.height];
} else {
const height = this.area.height - this.length_left + ext.gap_inner;
area = [this.area.x, height, this.area.width, this.area.height - height];
const ypos = this.area.y + this.length_left + ext.gap_inner
const height = this.area.height - this.length_left - ext.gap_inner;
area = [this.area.x, ypos, this.area.width, height];
}

return new Rect.Rectangle(area);
Expand Down
3 changes: 0 additions & 3 deletions src/panel_settings.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
const Me = imports.misc.extensionUtils.getCurrentExtension();

// import * as auto_tiler from 'auto_tiler';
import * as Utils from 'utils';
import { Launcher } from './dialog_launcher';

//import type { Entity } from './ecs';
import type { Ext } from './extension';

const { Clutter, Gio, St } = imports.gi;
Expand Down
14 changes: 10 additions & 4 deletions src/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,14 @@ export class ShellWindow {
}

is_single_max_screen(): boolean {
let monitor_count = this.meta.get_display().get_n_monitors();
return (this.is_maximized() || this.smart_gapped) && monitor_count == 1;
const display = this.meta.get_display()

if (display) {
let monitor_count = display.get_n_monitors();
return (this.is_maximized() || this.smart_gapped) && monitor_count == 1;
}

return false
}

is_snap_edge(): boolean {
Expand Down Expand Up @@ -435,8 +441,8 @@ export class ShellWindow {
*/
restack(updateState: RESTACK_STATE = RESTACK_STATE.NORMAL) {
this.update_border_layout();
if (this.meta.is_fullscreen() ||
(this.is_single_max_screen() && !this.is_snap_edge()) ||
if (this.meta.is_fullscreen() ||
(this.is_single_max_screen() && !this.is_snap_edge()) ||
this.meta.minimized) {
this.hide_border()
}
Expand Down