[gnome-shell/gbsneto/40-stuff: 63/68] workspacesView/workspacesDisplay: Remove parent opacity hack
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/40-stuff: 63/68] workspacesView/workspacesDisplay: Remove parent opacity hack
- Date: Wed, 20 Jan 2021 22:41:09 +0000 (UTC)
commit 07ed64656b5bda2dd6b56654514260933fbb6871
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Jan 15 08:00:50 2021 -0300
workspacesView/workspacesDisplay: Remove parent opacity hack
Now, we set WorkspacesDisplay's opacity directly, so there's no
need to have this parent → child glue code anymore. Remove it,
and bind the primary view's opacity with WorkspacesDisplay's.
js/ui/workspacesView.js | 36 ------------------------------------
1 file changed, 36 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index d9874467c2..09a8eae80a 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -728,7 +728,6 @@ class WorkspacesDisplay extends St.Widget {
this._workspacesOnlyOnPrimaryChanged.bind(this));
this._workspacesOnlyOnPrimaryChanged();
- this._notifyOpacityId = 0;
this._restackedNotifyId = 0;
this._scrollEventId = 0;
this._keyPressEventId = 0;
@@ -743,13 +742,6 @@ class WorkspacesDisplay extends St.Widget {
}
_onDestroy() {
- if (this._notifyOpacityId) {
- let parent = this.get_parent();
- if (parent)
- parent.disconnect(this._notifyOpacityId);
- this._notifyOpacityId = 0;
- }
-
if (this._parentSetLater) {
Meta.later_remove(this._parentSetLater);
this._parentSetLater = 0;
@@ -1003,34 +995,6 @@ class WorkspacesDisplay extends St.Widget {
: false;
}
- vfunc_parent_set(oldParent) {
- if (oldParent && this._notifyOpacityId)
- oldParent.disconnect(this._notifyOpacityId);
- this._notifyOpacityId = 0;
-
- if (this._parentSetLater)
- return;
-
- this._parentSetLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
- this._parentSetLater = 0;
- let newParent = this.get_parent();
- if (!newParent)
- return;
-
- // This is kinda hackish - we want the primary view to
- // appear as parent of this, though in reality it
- // is added directly to Main.layoutManager.overviewGroup
- this._notifyOpacityId = newParent.connect('notify::opacity', () => {
- let opacity = this.get_parent().opacity;
- let primaryView = this._getPrimaryView();
- if (!primaryView)
- return;
- primaryView.opacity = opacity;
- primaryView.visible = opacity != 0;
- });
- });
- }
-
_onRestacked(overview, stackIndices) {
for (let i = 0; i < this._workspacesViews.length; i++)
this._workspacesViews[i].syncStacking(stackIndices);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]