Skip to content

Commit

Permalink
fix: bars overflowing on fullscreen app
Browse files Browse the repository at this point in the history
fix #127
  • Loading branch information
ljuzig committed Sep 28, 2024
1 parent 76552d9 commit e0108c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Bug fixes

- Temporary, but effective, fix for the bars overflowing from their container when there's a fullscreen window [[#127](https://github.com/AstraExt/astra-monitor/issues/127)]
- Resolved an issue where `iotop` was not accurately identifying process names when both SWAPIN and IO% information were present

# Astra Monitor 28 - September 27 2024
Expand Down
8 changes: 7 additions & 1 deletion src/bars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import Clutter from 'gi://Clutter';
import Utils from './utils/utils.js';
import Config from './config.js';

import * as Main from 'resource:///org/gnome/shell/ui/main.js';

declare const global: any;

export type BarProps = {
Expand Down Expand Up @@ -181,8 +183,12 @@ export default GObject.registerClass(
updateBars(values: { color: number; value: number }[][]) {
if(!this.get_stage() || !this.get_parent()) return;

const componentMonitor = Main.layoutManager.findMonitorForActor(this);
if(componentMonitor && componentMonitor.inFullscreen) {
return;
}

try {
// eslint-disable-next-line prefer-const
let [width, height] = this.get_size();
width /= this.scaleFactor;
height /= this.scaleFactor;
Expand Down

0 comments on commit e0108c1

Please sign in to comment.