Fix case where shared memory file doesn't exist

This commit is contained in:
wheaney 2024-04-03 14:41:20 -07:00
parent 0779ffe7d2
commit 7c6d7ef84d
1 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,6 @@ function degreeToRadian(degree) {
} }
// most uniforms don't change frequently, this function should be called periodically // most uniforms don't change frequently, this function should be called periodically
function setIntermittentUniformVariables() { function setIntermittentUniformVariables() {
const dataView = this._dataView; const dataView = this._dataView;
@ -217,13 +216,15 @@ export default class BreezyDesktopExtension extends Extension {
this._running_poller_id = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 1000, (() => { this._running_poller_id = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 1000, (() => {
if (this._check_driver_running()) { if (this._check_driver_running()) {
this._effect_enable(); this._effect_enable();
this._running_poller_id = undefined;
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;
} else { } else {
return GLib.SOURCE_CONTINUE; return GLib.SOURCE_CONTINUE;
} }
}).bind(this)); }).bind(this));
} else {
this._effect_enable();
} }
this._effect_enable();
} }
_check_driver_running() { _check_driver_running() {
@ -232,7 +233,6 @@ export default class BreezyDesktopExtension extends Extension {
} }
_effect_enable() { _effect_enable() {
this._running_poller_id = undefined;
if (!this._cursorManager) this._cursorManager = new CursorManager(global.stage); if (!this._cursorManager) this._cursorManager = new CursorManager(global.stage);
this._cursorManager.enable(); this._cursorManager.enable();