Skip to content
New issue

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

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

Already on GitHub? # to your account

window overview, menu applet: Fix invalid object access cases #7880

Merged
merged 3 commits into from
Sep 24, 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
4 changes: 3 additions & 1 deletion files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,9 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
}

_clearPrevSelection(actor) {
if (this._previousSelectedActor && this._previousSelectedActor != actor) {
if (this._previousSelectedActor
&& !this._previousSelectedActor.is_finalized()
&& this._previousSelectedActor != actor) {
if (this._previousSelectedActor._delegate instanceof ApplicationButton ||
this._previousSelectedActor._delegate instanceof RecentButton ||
this._previousSelectedActor._delegate instanceof SearchProviderResultButton ||
Expand Down
2 changes: 1 addition & 1 deletion js/ui/dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ var _Draggable = new Lang.Class({
event.get_time())) {
// If it accepted the drop without taking the actor,
// handle it ourselves.
if (this._dragActor.get_parent() == Main.uiGroup) {
if (!this._dragActor.is_finalized() && this._dragActor.get_parent() === Main.uiGroup) {
if (this._restoreOnSuccess) {
this._restoreDragActor(event.get_time());
return true;
Expand Down
2 changes: 1 addition & 1 deletion js/ui/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Tweener = imports.ui.tweener;
const WorkspacesView = imports.ui.workspacesView;

// Time for initial animation going into Overview mode
const ANIMATION_TIME = 0.25;
var ANIMATION_TIME = 0.25;

const SwipeScrollDirection = WorkspacesView.SwipeScrollDirection;

Expand Down
1 change: 1 addition & 0 deletions js/ui/tooltips.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ Tooltip.prototype = {
},

hide: function() {
if (this._tooltip.is_finalized()) return;
this._tooltip.hide();

this.visible = false;
Expand Down
2 changes: 1 addition & 1 deletion js/ui/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ WorkspaceMonitor.prototype = {
},

showWindowsOverlays: function() {
if (this.leavingOverview)
if (this.leavingOverview || this._windowOverlaysGroup.is_finalized())
return;

this._windowOverlaysGroup.show();
Expand Down
4 changes: 2 additions & 2 deletions js/ui/workspacesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ WorkspacesView.prototype = {
});
}
Tweener.addTween(workspace.actor, params);
} else {
} else if (!workspace.actor.is_finalized()) {
workspace.actor.set_position(x, 0);
if (w == 0)
this._updateVisibility();
Expand All @@ -219,7 +219,7 @@ WorkspacesView.prototype = {
if (this._animating || this._scrolling) {
workspace.hideWindowsOverlays();
workspace.actor.show();
} else {
} else if (!workspace.actor.is_finalized()) {
workspace.showWindowsOverlays();
workspace.actor.visible = (w == active);
}
Expand Down