From 9d5be1660d8f74038ebed3d74fdbc809e43787ae Mon Sep 17 00:00:00 2001 From: Nippy Date: Fri, 9 Oct 2026 17:23:53 +0200 Subject: gnome fix --- .../installed/blur-my-shell@aunetx/extension.js | 132 +++++++++++++++------ 1 file changed, 97 insertions(+), 35 deletions(-) (limited to 'raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/extension.js') diff --git a/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/extension.js b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/extension.js index b94ac65..2d7309a 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/extension.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/extension.js @@ -6,7 +6,6 @@ import * as Config from 'resource:///org/gnome/shell/misc/config.js'; import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js'; import { update_from_old_settings } from './conveniences/settings_updater.js'; -import { import_in_shell_only} from './conveniences/utils.js'; import { PipelinesManager } from './conveniences/pipelines_manager.js'; import { EffectsManager } from './conveniences/effects_manager.js'; import { Connections } from './conveniences/connections.js'; @@ -22,8 +21,8 @@ import { WindowListBlur } from './components/window_list.js'; import { CoverflowAltTabBlur } from './components/coverflow_alt_tab.js'; import { ApplicationsBlur } from './components/applications.js'; import { ScreenshotBlur } from './components/screenshot.js'; - -const BlurModule = await import_in_shell_only('gi://Blur'); +import { PopupBlur } from './components/popup.js'; +import { NativeDynamicBlurEffect } from './effects/native_dynamic_gaussian_blur.js'; /// The main extension class, created when the GNOME Shell is loaded. @@ -75,6 +74,7 @@ export default class BlurMyShell extends Extension { this._coverflow_alt_tab_blur = new CoverflowAltTabBlur(...init()); this._applications_blur = new ApplicationsBlur(...init()); this._screenshot_blur = new ScreenshotBlur(...init()); + this._popup = new PopupBlur(...init()); // connect each component to preferences change this._connect_to_settings(); @@ -83,7 +83,7 @@ export default class BlurMyShell extends Extension { if (this._settings.lockscreen.BLUR && !this._lockscreen_blur.enabled) this._lockscreen_blur.enable(); - // update whether or not the external rounded corners library was found + // update whether or not the active blur effect supports rounded corners this._update_rounded_blur_found(); // ensure we take the correct action for the current session mode @@ -117,28 +117,14 @@ export default class BlurMyShell extends Extension { // try to enable the components as soon as possible anyway, this way the // overview may load before the user sees it - try { - if (this._settings.overview.BLUR && !this._overview_blur.enabled) - this._overview_blur.enable(); - } catch (e) { - this._log("Could not enable overview blur directly"); - this._log(e); - } - try { - if (this._settings.dash_to_dock.BLUR - && !this._dash_to_dock_blur.enabled) - this._dash_to_dock_blur.enable(); - } catch (e) { - this._log("Could not enable dash-to-dock blur directly"); - this._log(e); - } - try { - if (this._settings.panel.BLUR && !this._panel_blur.enabled) - this._panel_blur.enable(); - } catch (e) { - this._log("Could not enable panel blur directly"); - this._log(e); - } + if (this._settings.overview.BLUR && !this._overview_blur.enabled) + this._overview_blur.enable(); + + if (this._settings.dash_to_dock.BLUR && !this._dash_to_dock_blur.enabled) + this._dash_to_dock_blur.enable(); + + if (this._settings.panel.BLUR && !this._panel_blur.enabled) + this._panel_blur.enable(); // tells the extension we have enabled the user session components, so that we do not // disable them later if they were not even enabled to begin with @@ -166,7 +152,8 @@ export default class BlurMyShell extends Extension { this._disable_user_session(); this._overview_blur.restore_patched_proto(); - // disable lockscreen blur too + // disable components that stay active outside the user session + this._popup.disable(); this._lockscreen_blur.disable(); // untrack them @@ -179,6 +166,12 @@ export default class BlurMyShell extends Extension { this._coverflow_alt_tab_blur = null; this._applications_blur = null; this._screenshot_blur = null; + this._popup = null; + + this._effects_manager.destroy_all(); + this._pipelines_manager.destroy(); + this._effects_manager = null; + this._pipelines_manager = null; // make sure no settings change can re-enable them this._settings.disconnect_all_settings(); @@ -204,7 +197,7 @@ export default class BlurMyShell extends Extension { _disable_user_session() { this._log("disabling user session mode..."); - // disable every component except lockscreen blur + // disable every component except lockscreen blur and popup blur this._panel_blur.disable(); this._dash_to_dock_blur.disable(); this._overview_blur.disable(); @@ -247,16 +240,14 @@ export default class BlurMyShell extends Extension { } } - /// Verify whether or not the gi://Blur library was found, in order to inform - /// the preferences and instruct the user to install it to have native rounded - /// corners in dynamic blur. + /// Verify whether the active native blur effect supports rounded corners. _update_rounded_blur_found() { - if (BlurModule === null) { + if (!NativeDynamicBlurEffect.supports_corner_radius) { this._settings.ROUNDED_BLUR_FOUND = false; this._log("using original implementation for the native blur effect") } else { this._settings.ROUNDED_BLUR_FOUND = true; - this._log("using external library for the native blur effect") + this._log("using native rounded corners for the blur effect") } } @@ -326,6 +317,9 @@ export default class BlurMyShell extends Extension { if (this._settings.screenshot.BLUR) this._screenshot_blur.enable(); + if (this._settings.popup.BLUR) + this._popup.enable(); + this._log("all components enabled."); } @@ -427,8 +421,10 @@ export default class BlurMyShell extends Extension { // panel override background toggled on/off this._settings.panel.OVERRIDE_BACKGROUND_changed(() => { - if (this._settings.panel.BLUR) + if (this._settings.panel.BLUR) { this._panel_blur.connect_to_windows_and_overview(); + this._panel_blur.reset(); + } }); // panel style changed @@ -439,10 +435,30 @@ export default class BlurMyShell extends Extension { // panel background's dynamic overriding toggled on/off this._settings.panel.OVERRIDE_BACKGROUND_DYNAMICALLY_changed(() => { - if (this._settings.panel.BLUR) + if (this._settings.panel.BLUR) { this._panel_blur.connect_to_windows_and_overview(); + this._panel_blur.reset(); + } }); + this._settings.panel.OVERRIDE_BACKGROUND_DYNAMICALLY_MODE_changed(() => { + if (this._settings.panel.BLUR) { + this._panel_blur.connect_to_windows_and_overview(); + this._panel_blur.reset(); + } + }); + + this._settings.panel.GRADIENT_PANEL_changed(() => { + if (this._settings.panel.BLUR) { + this._panel_blur.update_visibility() ; + } + }); + + this._settings.panel.GRADIENT_PANEL_MODE_changed(() => { + if (this._settings.panel.BLUR) { + this._panel_blur.update_visibility(); + } + }); // ---------- DASH TO DOCK ---------- @@ -533,6 +549,12 @@ export default class BlurMyShell extends Extension { this._applications_blur.connect_to_overview(); }); + // application unblur-when-fullscreen changed + this._settings.applications.UNBLUR_WHEN_FULLSCREEN_changed(() => { + if (this._settings.applications.BLUR) + this._applications_blur.update_fullscreen_status(); + }); + // application enable-all changed this._settings.applications.ENABLE_ALL_changed(() => { if (this._settings.applications.BLUR) @@ -630,6 +652,46 @@ export default class BlurMyShell extends Extension { if (this._settings.screenshot.BLUR) this._screenshot_blur.update_pipeline(); }); + + + // ---------- POPUP BLUR ---------- + + // toggled on/off + this._settings.popup.BLUR_changed(() => { + if (this._settings.popup.BLUR) + this._popup.enable(); + else + this._popup.disable(); + }); + + this._settings.popup.STATIC_BLUR_changed(() => { + if (this._settings.popup.BLUR) + this._popup.reset(); + }); + + this._settings.popup.PIPELINE_changed(() => { + if (this._settings.popup.BLUR) + this._popup.update_pipeline(); + }); + + // popup background override toggled on/off + this._settings.popup.OVERRIDE_BACKGROUND_changed(() => { + if (this._settings.popup.BLUR) + this._popup.update_background(); + }); + + // Apply only the popup surface override, leaving shell theme control + // and text styles intact. + this._settings.popup.PRESERVE_SHELL_THEME_changed(() => { + if (this._settings.popup.BLUR) + this._popup.update_background(); + }); + + // popup background style changed + this._settings.popup.STYLE_POPUP_changed(() => { + if (this._settings.popup.BLUR) + this._popup.update_background(); + }); } _log(str) { -- cgit v1.3