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

position based on workarea instead of screen #210

Closed
wants to merge 1 commit into from
Closed
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
11 changes: 5 additions & 6 deletions [email protected]/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,11 @@ const DropDownTerminalExtension = new Lang.Class({
let panelHeight = Main.layoutManager.panelBox.height;

let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let screen = global.screen.get_monitor_geometry(global.screen.get_primary_monitor());
let bbox = Main.legacyTray ? Main.legacyTray.actor : screen;
let x1 = bbox.x / scaleFactor;
let y1 = bbox.y / scaleFactor;
let screenHeight = bbox.height / scaleFactor;
let screenWidth = bbox.width / scaleFactor;
let workarea = Main.layoutManager.getWorkAreaForMonitor(global.screen.get_primary_monitor());
let x1 = workarea.x / scaleFactor;
let y1 = workarea.y / scaleFactor;
let screenHeight = workarea.height / scaleFactor;
let screenWidth = workarea.width / scaleFactor;
let x2 = x1 + screenWidth;
let y2 = y1 + screenHeight;

Expand Down