Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IcingTaskManager@json: Fix more invalid object access issues #1982

Merged
merged 3 commits into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ const Tweener = imports.ui.tweener;
const DND = imports.ui.dnd;
const Tooltips = imports.ui.tooltips;
const PopupMenu = imports.ui.popupMenu;
const Applet = imports.ui.applet;
const SignalManager = imports.misc.signalManager;

const {each, find, findIndex, isEqual, setTimeout, throttle, getFocusState, unref} = require('./utils');
const {each, find, findIndex, isEqual, isFinalized, setTimeout, getFocusState, unref} = require('./utils');
const {AppMenuButtonRightClickMenu, HoverMenuController, AppThumbnailHoverMenu} = require('./specialMenus');
const constants = require('./constants');
const store = require('./store');
Expand Down Expand Up @@ -539,6 +538,8 @@ class AppGroup {
}

resetHoverStatus() {
if (isFinalized(this.actor)) return;

let hoverPseudoClass = getPseudoClass(this.state.settings.hoverPseudoClass);
let focusPseudoClass = getPseudoClass(this.state.settings.focusPseudoClass);
let activePseudoClass = getPseudoClass(this.state.settings.activePseudoClass);
Expand Down Expand Up @@ -962,6 +963,8 @@ class AppGroup {
}

handleFavorite (changed) {
if (isFinalized(this.actor)) return;

if (changed) {
setTimeout(() => this.listState.trigger('updateAppGroupIndexes', this.groupState.appId), 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ class WindowThumbnail {
let [width, height] = windowTexture.get_size();
this.signals.connect(this.metaWindowActor, 'size-changed', () => this.refreshThumbnail());
this.signals.connect(this.metaWindowActor, 'destroy', () => {
if (this.willUnmount) return;
if (this.willUnmount || !this.groupState.trigger) return;
this.groupState.trigger('removeThumbnailFromMenu', this.metaWindow);
this.metaWindowActor = null;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const GObject = imports.gi.GObject;
const Gettext = imports.gettext;
const Mainloop = imports.mainloop;

Expand Down Expand Up @@ -183,4 +184,8 @@ const getFocusState = function (metaWindow) {
return true;
});
return transientHasFocus;
};
};

const isFinalized = function(obj) {
return obj && GObject.Object.prototype.toString.call(obj).indexOf('FINALIZED') > -1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"description": "Window list with app grouping and thumbnails",
"max-instances": -1,
"name": "Icing Task Manager",
"version": "6.3.12",
"version": "6.3.13",
"role": "panellauncher",
"uuid": "IcingTaskManager@json",
"multiversion": true,
"cinnamon-version": ["2.8", "3.0", "3.2", "3.4", "3.6", "3.8"]
"cinnamon-version": ["2.8", "3.0", "3.2", "3.4", "3.6", "3.8", "4.0"]
}