Skip to content

Commit 5c416b1

Browse files
authored
[BlurCinnamon@klangman] One Fix and rounded corner panel support (#985)
- Fix a 1.6.0 regression where the dimming of desktop effects are not removed after disabiling the desktop effects on the general page in the config window - Add support for rounded cinnamon panels, but currently to enable rounded corners in Cinnamon panels you need to manually edit your cinnamon.css file
1 parent b25e301 commit 5c416b1

File tree

14 files changed

+140
-105
lines changed

14 files changed

+140
-105
lines changed

BlurCinnamon@klangman/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.6.1
4+
5+
* Fixed a 1.6.0 regression where the dimming of desktop effects are not removed after disabiling the desktop effects on the general page in the config window.
6+
* Added support for rounded cinnamon panels, but currently to enable rounded corners in Cinnamon panels you need to manually edit your cinnamon.css file.
7+
38
## 1.6.0
49

510
* Added the ability to apply effects to application window backgrounds

BlurCinnamon@klangman/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Cinnamon components you can apply effects to (currently):
1414
8. The Coverflow and Timeline 3D Alt-Tab switchers (not the Cinnamon default Alt-Tab switcher!)
1515
9. Application window backgrounds **(#)**
1616

17-
**(#)** Note: The Blur Cinnamon effects for the (#) marked Cinnamon components above are disabled by default. They can be enabled in the Blur Cinnamon configuration window. These effects will override some of your theme settings (i.e. rounded corners etc.).
17+
**(#)** Note: The Blur Cinnamon effects for the (#) marked Cinnamon components above are disabled by default. They can be enabled in the Blur Cinnamon configuration window. Some effects will override your theme settings to force transparency.
1818

1919
Blurring can also be disabled if you just want a transparent or semi-transparent effect without blurring for Panels, Applet popup menu or the Expo.
2020

@@ -25,6 +25,7 @@ Blurring can also be disabled if you just want a transparent or semi-transparent
2525
- Dimming overlay with user configurable color and intensity (fully-transparent to a solid color)
2626
- Makes the components transparent (when needed) so that the desktop background image effects are visible
2727
- Allows you to adjust the color saturation of the Cinnamon components. You can reduced saturation all the way down to gray scale
28+
- Uses a rounded corner effect to match your themes rounded corner settings, and provides manual rounded corner setting for application window effects so you can match the rounded corner of the application windows you choose to blur
2829
- Ability to changes the opacity of application windows so application window blur effects are visible under the window
2930
- Option to add a backlight effect to the focused window using a background image blur effect spilling over the focused windows borders
3031
- You can use general settings across all Cinnamon components or use unique settings for each component type
@@ -43,7 +44,7 @@ Using any of the above with Blur Cinnamon may have some odd side effects that wo
4344

4445
## Limitations
4546

46-
1. The Applet popup menu effects are intended to be used with the Cinnamon (6.4) theme or the Mint-Y dark desktop themes. The effects might work will with some other themes but I have not tested them so the effects might not work out just right. You can try the Mint-Y light themes but it might be hard to read the menu items without some playing around with the settings and the background image. To make sure that the blurred background does not spill over any rounded corners, the popup-menu rounded corners will be disabled when popup-menu effects are enabled. Popup-menu effects are disabled by default in this extension.
47+
1. The Applet popup menu effects are intended to be used with the Cinnamon (6.4) theme or the Mint-Y dark desktop themes. The effects might work will with some other themes but I have not tested them so the effects might not work out just right. You can try the Mint-Y light themes but it might be hard to read the menu items without some playing around with the settings and the background image. Blur Cinnamon Popup-menu effects are disabled by default.
4748
2. The Applet popup-menu effects works for all the applets that I have tested except "Cinnamenu". Cinnamenu is preventing other code from receiving the "open-state-changed" event which BlurCinnamon uses to know when to apply popup-menu theme setting and when to resize and show the blur background element. This issue is fixed in the latest Cinnamenu from [Fredcw GitHub](https://github.com/fredcw/Cinnamenu) but you will need to manually fix the current Cinnamon Spices version of Cinnamenu (see [here](https://github.com/linuxmint/cinnamon-spices-extensions/issues/873))
4849
3. Currently, any windows that are positioned such that they overlap with a panel or an popup-menu will not be visible beneath blurred panel/popup-menu as you might expect with a transparent panel/menu. This is because the blur effect is applied to a user interface element that floats above all windows just like the panel floats above the windows. At some point I hope to look into allowing the blur element to appear below all windows rather than above and make the a optional behavior setting.
4950
4. If you disable effects for any Cinnamon component under the General tab of the setting dialog while any "Use unique effect settings" options are enabled under the other tabs, the components "effect setting" options under the other tabs will still be visible, but changing those setting will have no effect until you re-enable the component under the General tab. Ideally those effect setting would only be visible when the component is enabled under the general tab but Cinnamon setting support is a bit limited in this way.

BlurCinnamon@klangman/files/BlurCinnamon@klangman/6.0/extension.js

Lines changed: 50 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// Some code bowwowed from the BlurOverview Cinnamon extension Copyright (C) 2012 Jen Bowen aka nailfarmer
66

77
// Gaussian Blur (borrowed from Blur-my-shell / Aurélien Hamy) modified for Cinnamon by Kevin Langman 2024
8+
// Rounded Corners (borrowed from Blur-my-shell / Aurélien Hamy) modified for Cinnamon by Kevin Langman 2025
89

910
// This program is free software: you can redistribute it and/or modify
1011
// it under the terms of the GNU General Public License as published by
@@ -389,6 +390,21 @@ class BlurBase {
389390
}
390391
}
391392

393+
destroy(background) {
394+
if (background._blurCinnamonDimmer) {
395+
background.remove_child(background._blurCinnamonDimmer);
396+
}
397+
let effect = this._getCornerEffect(background);
398+
if (effect)
399+
background.remove_effect(effect);
400+
effect = this._getDesatEffect(background);
401+
if (effect)
402+
background.remove_effect(effect);
403+
effect = this._getBlurEffect(background);
404+
if (effect)
405+
background.remove_effect(effect);
406+
}
407+
392408
_printActor(actor) {
393409
let themeNode = actor.get_theme_node();
394410
let margins = actor.get_margin();
@@ -635,10 +651,17 @@ class BlurPanels extends BlurBase {
635651
_setClip(panel){
636652
if (panel && panel.__blurredPanel && panel.__blurredPanel.background) {
637653
let actor = panel.actor;
654+
let cornerEffect = this._getCornerEffect(panel.__blurredPanel.background);
638655
if (actor.is_visible()) {
639-
panel.__blurredPanel.background.set_clip( actor.x, actor.y, actor.width, actor.height );
656+
if (cornerEffect)
657+
cornerEffect.clip = [actor.x+2, actor.y+2, actor.width-3, actor.height-3];
658+
else
659+
panel.__blurredPanel.background.set_clip( actor.x, actor.y, actor.width, actor.height );
640660
} else {
641-
panel.__blurredPanel.background.set_clip( 0, 0, 0, 0 );
661+
if (cornerEffect)
662+
cornerEffect.clip = [0, 0, 0, 0];
663+
else
664+
panel.__blurredPanel.background.set_clip( 0, 0, 0, 0 );
642665
}
643666
if (panel._hidden || panel._disabled || global.display.get_monitor_in_fullscreen(panel.monitorIndex)) {
644667
panel.__blurredPanel.background.hide();
@@ -664,6 +687,9 @@ class BlurPanels extends BlurBase {
664687

665688
// Create a new blur effect for the panel argument.
666689
_blurPanel(panel) {
690+
let topRadius = 0;
691+
let bottomRadius = 0;
692+
let cornerRadius = 0;
667693
let panelSettings = this._getPanelSettings(panel);
668694
if (!panelSettings ) return;
669695
let [opacity, blendColor, blurType, radius, saturation] = panelSettings;
@@ -689,13 +715,25 @@ class BlurPanels extends BlurBase {
689715
"background-gradient-direction: vertical; background-gradient-start: transparent; " +
690716
"background-gradient-end: transparent; background: transparent;" );
691717
}
718+
// Determine the corner radius
719+
let themeNode = actor.get_theme_node();
720+
if (themeNode) {
721+
// TODO: Need to be able to independently round all four corners, needs improvements to the corner effect code!
722+
topRadius = themeNode.get_border_radius(St.Corner.TOPLEFT);
723+
bottomRadius = themeNode.get_border_radius(St.Corner.BOTTOMLEFT);
724+
cornerRadius = Math.max(topRadius, bottomRadius);
725+
}
692726
// If blurring is required, create a background, create effect, clip background to cover the panel only
693727
// With this commented out, a panel with no effects applied (just made transparent) will still prevent
694728
// windows beneath the panels from being visible.
695729
//if (blurType > BlurType.None || saturation<100) {
696-
let background = this._createBackgroundAndEffects(opacity, blendColor, blurType, radius, saturation);
730+
let background = this._createBackgroundAndEffects(opacity, blendColor, blurType, radius, saturation, global.overlay_group, cornerRadius, topRadius!==0, bottomRadius!==0);
697731
blurredPanel.background = background;
698-
background.set_clip( panel.actor.x, panel.actor.y, panel.actor.width, panel.actor.height );
732+
let cornerEffect = this._getCornerEffect(background);
733+
if (cornerEffect)
734+
cornerEffect.clip = [panel.actor.x+2, panel.actor.y+2, panel.actor.width-3, panel.actor.height-3];
735+
else
736+
background.set_clip( panel.actor.x, panel.actor.y, panel.actor.width, panel.actor.height );
699737
if (!panel._hidden && !global.display.get_monitor_in_fullscreen(panel.monitorIndex)) {
700738
background.show();
701739
}
@@ -732,12 +770,7 @@ class BlurPanels extends BlurBase {
732770
actor.set_style_class_name(blurredPanel.original_class);
733771
actor.set_style_pseudo_class(blurredPanel.original_pseudo_class);
734772
if (blurredPanel.background) {
735-
let effect = blurredPanel.background.get_effect(BLUR_EFFECT_NAME);
736-
if (effect)
737-
blurredPanel.background.remove_effect(effect);
738-
effect = blurredPanel.background.get_effect(DESAT_EFFECT_NAME);
739-
if (effect)
740-
blurredPanel.background.remove_effect(effect);
773+
super.destroy(blurredPanel.background);
741774
global.overlay_group.remove_actor(blurredPanel.background);
742775
blurredPanel.background.destroy();
743776
}
@@ -1237,6 +1270,7 @@ class BlurPopupMenus extends BlurBase {
12371270
// Restore monkey patched PopupMenu open & close functions
12381271
debugMsg( "Destroying Popup Menu object" );
12391272
PopupMenu.PopupMenu.prototype.open = this.original_popupmenu_open;
1273+
super.destroy(this._background);
12401274
global.overlay_group.remove_actor(this._background);
12411275
this._background.destroy();
12421276
// Remove all data in the menus associated with blurCinnamon
@@ -1274,8 +1308,6 @@ class BlurDesktop extends BlurBase {
12741308
let dimmerColor = this._getColor( blendColor, opacity );
12751309
this._dimmer = new Clutter.Actor({x_expand: true, y_expand: true, width: global.background_actor.width, height: global.background_actor.height, background_color: dimmerColor});
12761310
global.background_actor.add_child(this._dimmer);
1277-
1278-
this._effects_applied = true;
12791311
this.updateEffects();
12801312
}
12811313

@@ -1364,6 +1396,9 @@ class BlurDesktop extends BlurBase {
13641396
if (effect) {
13651397
global.background_actor.remove_effect(effect);
13661398
}
1399+
if (this._dimmer) {
1400+
global.background_actor.remove_child(this._dimmer);
1401+
}
13671402
}
13681403
}
13691404

@@ -1491,6 +1526,7 @@ class BlurNotifications extends BlurBase {
14911526
MessageTray.MessageTray.prototype._showNotification = this.original_showNotification;
14921527
MessageTray.MessageTray.prototype._hideNotification = this.original_hideNotification;
14931528
global.overlay_group.remove_actor(this._background);
1529+
super.destroy(this._background);
14941530
this._background.destroy();
14951531
}
14961532
}
@@ -1575,6 +1611,7 @@ class BlurTooltips extends BlurBase {
15751611

15761612
this._signalManager.disconnectAllSignals();
15771613
this._background.hide();
1614+
super.destroy(this._background);
15781615
this._background.destroy();
15791616
}
15801617
}
@@ -1732,15 +1769,7 @@ class BlurApplications extends BlurBase {
17321769
let data = compositor._blurCinnamonDataWindow;
17331770
data.signalManager.disconnectAllSignals();
17341771
compositor.remove_child(data.background);
1735-
let blurEffect = this._getBlurEffect(data.background);
1736-
if (blurEffect)
1737-
data.background.remove_effect(blurEffect);
1738-
let desatEffect = this._getDesatEffect(data.background);
1739-
if (desatEffect)
1740-
data.background.remove_effect(desatEffect);
1741-
let cornerEffect = this._getCornerEffect(data.background);
1742-
if (cornerEffect)
1743-
data.background.remove_effect(cornerEffect);
1772+
super.destroy(data.background);
17441773
data.background.destroy();
17451774
data.metaWindow.set_opacity(255);
17461775
compositor._blurCinnamonDataWindow = undefined;

BlurCinnamon@klangman/files/BlurCinnamon@klangman/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"uuid": "BlurCinnamon@klangman",
33
"name": "Blur Cinnamon",
4-
"version": "1.6.0",
4+
"version": "1.6.1",
55
"description": "Allows you to blur, colorize, desaturate and adjust the dimming of several Cinnamon Desktop components",
66
"url": "https://github.com/klangman/BlurCinnamon",
77
"cinnamon-version": [

BlurCinnamon@klangman/files/BlurCinnamon@klangman/po/[email protected]

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#, fuzzy
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: BlurCinnamon@klangman 1.6.0\n"
8+
"Project-Id-Version: BlurCinnamon@klangman 1.6.1\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
1010
"extensions/issues\n"
11-
"POT-Creation-Date: 2025-11-30 22:15-0500\n"
11+
"POT-Creation-Date: 2025-12-03 23:37-0500\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: \n"
1414
"Language-Team: \n"
@@ -17,22 +17,22 @@ msgstr ""
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919

20-
#. 6.0/extension.js:1807
20+
#. 6.0/extension.js:1836
2121
msgid "Error"
2222
msgstr ""
2323

24-
#. 6.0/extension.js:1808
24+
#. 6.0/extension.js:1837
2525
msgid ""
2626
"Unable to determine the application or the WM_CLASS of the previously "
2727
"focused window, therefore Blur Cinnamon effects can not be applied to that "
2828
"window"
2929
msgstr ""
3030

31-
#. 6.0/extension.js:2284
31+
#. 6.0/extension.js:2313
3232
msgid "Welcome to Blur Cinnamon"
3333
msgstr ""
3434

35-
#. 6.0/extension.js:2285
35+
#. 6.0/extension.js:2314
3636
msgid ""
3737
"Hope you are enjoying your new Panel, Expo, Overview and Alt-Tab Coverflow/"
3838
"Timeline effects.\n"
@@ -44,15 +44,15 @@ msgid ""
4444
"dimming."
4545
msgstr ""
4646

47-
#. 6.0/extension.js:2289
47+
#. 6.0/extension.js:2318
4848
msgid "Open Blur Cinnamon Settings"
4949
msgstr ""
5050

51-
#. 6.0/extension.js:2366
51+
#. 6.0/extension.js:2395
5252
msgid "Testing Blur Cinnamon Notification Effects"
5353
msgstr ""
5454

55-
#. 6.0/extension.js:2367
55+
#. 6.0/extension.js:2396
5656
msgid ""
5757
"This is how notifications will appear when using the current Blur Cinnamon "
5858
"Notification Popup effects.\n"

BlurCinnamon@klangman/files/BlurCinnamon@klangman/po/ca.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: BlurCinnamon@klangman 1.2.0\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
1010
"extensions/issues\n"
11-
"POT-Creation-Date: 2025-11-30 22:15-0500\n"
11+
"POT-Creation-Date: 2025-12-03 23:37-0500\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: Odyssey <[email protected]>\n"
1414
"Language-Team: \n"
@@ -18,22 +18,22 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"X-Generator: Poedit 3.6\n"
2020

21-
#. 6.0/extension.js:1807
21+
#. 6.0/extension.js:1836
2222
msgid "Error"
2323
msgstr ""
2424

25-
#. 6.0/extension.js:1808
25+
#. 6.0/extension.js:1837
2626
msgid ""
2727
"Unable to determine the application or the WM_CLASS of the previously "
2828
"focused window, therefore Blur Cinnamon effects can not be applied to that "
2929
"window"
3030
msgstr ""
3131

32-
#. 6.0/extension.js:2284
32+
#. 6.0/extension.js:2313
3333
msgid "Welcome to Blur Cinnamon"
3434
msgstr "Benvingut al Desenfoc de Cinnamon"
3535

36-
#. 6.0/extension.js:2285
36+
#. 6.0/extension.js:2314
3737
#, fuzzy
3838
msgid ""
3939
"Hope you are enjoying your new Panel, Expo, Overview and Alt-Tab Coverflow/"
@@ -54,15 +54,15 @@ msgstr ""
5454
"per defecte. També podeu realitzar canvis a les propietats dels efectes, com "
5555
"ara la intensitat del desenfoc, la saturació del color i l'enfoscament."
5656

57-
#. 6.0/extension.js:2289
57+
#. 6.0/extension.js:2318
5858
msgid "Open Blur Cinnamon Settings"
5959
msgstr "Obre la configuració del Desenfoc de Cinnamon"
6060

61-
#. 6.0/extension.js:2366
61+
#. 6.0/extension.js:2395
6262
msgid "Testing Blur Cinnamon Notification Effects"
6363
msgstr "Provant els efectes del Desenfoc de Cinnamon"
6464

65-
#. 6.0/extension.js:2367
65+
#. 6.0/extension.js:2396
6666
msgid ""
6767
"This is how notifications will appear when using the current Blur Cinnamon "
6868
"Notification Popup effects.\n"

BlurCinnamon@klangman/files/BlurCinnamon@klangman/po/da.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: BlurCinnamon@klangman 1.5.2\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
1010
"extensions/issues\n"
11-
"POT-Creation-Date: 2025-11-30 22:15-0500\n"
11+
"POT-Creation-Date: 2025-12-03 23:37-0500\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: Alan Mortensen <[email protected]>\n"
1414
"Language-Team: \n"
@@ -18,22 +18,22 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"X-Generator: Poedit 3.4.2\n"
2020

21-
#. 6.0/extension.js:1807
21+
#. 6.0/extension.js:1836
2222
msgid "Error"
2323
msgstr ""
2424

25-
#. 6.0/extension.js:1808
25+
#. 6.0/extension.js:1837
2626
msgid ""
2727
"Unable to determine the application or the WM_CLASS of the previously "
2828
"focused window, therefore Blur Cinnamon effects can not be applied to that "
2929
"window"
3030
msgstr ""
3131

32-
#. 6.0/extension.js:2284
32+
#. 6.0/extension.js:2313
3333
msgid "Welcome to Blur Cinnamon"
3434
msgstr "Velkommen til Sløret Cinnamon"
3535

36-
#. 6.0/extension.js:2285
36+
#. 6.0/extension.js:2314
3737
#, fuzzy
3838
msgid ""
3939
"Hope you are enjoying your new Panel, Expo, Overview and Alt-Tab Coverflow/"
@@ -54,15 +54,15 @@ msgstr ""
5454
"også foretage ændringer i effektens egenskaber, såsom sløringens intensitet, "
5555
"farvemætning og dæmpning."
5656

57-
#. 6.0/extension.js:2289
57+
#. 6.0/extension.js:2318
5858
msgid "Open Blur Cinnamon Settings"
5959
msgstr "Åbn Sløret Cinnamon-indstillinger"
6060

61-
#. 6.0/extension.js:2366
61+
#. 6.0/extension.js:2395
6262
msgid "Testing Blur Cinnamon Notification Effects"
6363
msgstr "Tester Sløret Cinnamons underretningseffekter"
6464

65-
#. 6.0/extension.js:2367
65+
#. 6.0/extension.js:2396
6666
msgid ""
6767
"This is how notifications will appear when using the current Blur Cinnamon "
6868
"Notification Popup effects.\n"

0 commit comments

Comments
 (0)