From e0108c146e9ebae7825ebf72da60136f914d0581 Mon Sep 17 00:00:00 2001 From: Ljuzig Date: Sat, 28 Sep 2024 18:37:11 +0200 Subject: [PATCH] fix: bars overflowing on fullscreen app fix #127 --- RELEASES.md | 1 + src/bars.ts | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index bbde5f7..723010c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -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 diff --git a/src/bars.ts b/src/bars.ts index eb9353d..0ab37d5 100644 --- a/src/bars.ts +++ b/src/bars.ts @@ -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 = { @@ -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;