Skip to content

Commit

Permalink
fix blur function names
Browse files Browse the repository at this point in the history
  • Loading branch information
neffo committed Mar 19, 2024
1 parent 73d7812 commit b29d41b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions blur.js
Original file line number Diff line number Diff line change
@@ -13,8 +13,10 @@ import St from 'gi://St';
import * as UnlockDialog from 'resource:///org/gnome/shell/ui/unlockDialog.js';
import * as Config from 'resource:///org/gnome/shell/misc/config.js';
var _updateBackgroundEffects = UnlockDialog.UnlockDialog.prototype._updateBackgroundEffects;
var _showClock = UnlockDialog.UnlockDialog.prototype._showClock;
var _showPrompt = UnlockDialog.UnlockDialog.prototype._showPrompt;

// original functions
var _showClock_GNOME = UnlockDialog.UnlockDialog.prototype._showClock;
var _showPrompt_GNOME = UnlockDialog.UnlockDialog.prototype._showPrompt;

var shellVersionMajor = parseInt(Config.PACKAGE_VERSION.split('.')[0]);
var shellVersionMinor = parseInt(Config.PACKAGE_VERSION.split('.')[1]);
@@ -70,13 +72,13 @@ function _updateBackgroundEffects_BWP(monitorIndex) {
// adjustable blur in a Windows-like way (this ensures login prompt is readable)
function _showClock_BWP() {
promptActive = false;
this._showClock_GNOME(); // pass to default GNOME function
_showClock_GNOME(); // pass to default GNOME function
this._updateBackgroundEffects();
}

function _showPrompt_BWP() {
promptActive = true;
this._showPrompt_GNOME(); // pass to default GNOME function
_showPrompt_GNOME(); // pass to default GNOME function
this._updateBackgroundEffects();
}

@@ -123,8 +125,8 @@ export default class Blur {
UnlockDialog.UnlockDialog.prototype._showPrompt = _showPrompt_BWP;

// this are the original functions which we call into from our versions above
UnlockDialog.UnlockDialog.prototype._showClock_GNOME = _showClock;
UnlockDialog.UnlockDialog.prototype._showPrompt_GNOME = _showPrompt;
UnlockDialog.UnlockDialog.prototype._showClock_GNOME = _showClock_GNOME;
UnlockDialog.UnlockDialog.prototype._showPrompt_GNOME = _showPrompt_GNOME;

}
this.enabled = true;

0 comments on commit b29d41b

Please sign in to comment.