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 electron width/heigth when using xrandr under bullseye #3161

Merged
merged 1 commit into from
Aug 12, 2023
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _This release is scheduled to be released on 2023-10-01._

- Fix undefined formatTime method in clock module (#3143)
- Fix clientonly startup fails after async added (#3151)
- Fix electron width/heigth when using xrandr under bullseye

## [2.24.0] - 2023-07-01

Expand Down
13 changes: 11 additions & 2 deletions js/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,20 @@ let mainWindow;
*
*/
function createWindow() {
// see https://www.electronjs.org/docs/latest/api/screen
// Create a window that fills the screen's available work area.
let electronSize = (800, 600);
try {
electronSize = electron.screen.getPrimaryDisplay().workAreaSize;
} catch {
Log.warn("Could not get display size, using defaults ...");
}

let electronSwitchesDefaults = ["autoplay-policy", "no-user-gesture-required"];
app.commandLine.appendSwitch(...new Set(electronSwitchesDefaults, config.electronSwitches));
let electronOptionsDefaults = {
width: 800,
height: 600,
width: electronSize.width,
height: electronSize.height,
x: 0,
y: 0,
darkTheme: true,
Expand Down