Skip to content

Commit

Permalink
fix some performacnce issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyElGringo committed Aug 3, 2019
1 parent 439af6f commit 431f01d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 177 deletions.
5 changes: 4 additions & 1 deletion module/hotKeysModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ var HotKeysModule = class HotKeysModule {
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
Shell.ActionMode.NORMAL,
() => {
global.superWorkspaceManager.noUImode = !global
/* global.superWorkspaceManager.noUImode = !global
.superWorkspaceManager.noUImode;
Main.panel.get_parent().visible = !global.superWorkspaceManager
.noUImode;
Expand Down Expand Up @@ -220,6 +220,9 @@ var HotKeysModule = class HotKeysModule {
global.superWorkspaceManager.noUImode ? 0 : -1
);
superWorkspace.tilingLayout.onTile();
}); */
global.get_window_actors().forEach(windowActor => {
Main.wm.getWindowClone(windowActor.meta_window);
});
}
);
Expand Down
37 changes: 14 additions & 23 deletions module/superWorkspaceModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ var SuperWorkspaceModule = class SuperWorkspaceModule {
this.signals = [];
Main.wm.getWindowClone = function(metaWindow) {
let windowActor = metaWindow.get_compositor_private();
let actorContent = Shell.util_get_content_for_window_actor(
/* let actorContent = Shell.util_get_content_for_window_actor(
windowActor,
metaWindow.get_frame_rect()
);
let actorClone = new St.Widget({ content: actorContent });
actorClone.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
/* let clone = new Clutter.Clone({
source: windowActor.get_texture()
}); */
let actorClone = new St.Widget({ content: actorContent }); */
let actorClone = new Clutter.Clone({
source: windowActor
});

let constraint = new Clutter.BindConstraint({
source: windowActor,
Expand Down Expand Up @@ -165,7 +164,7 @@ var SuperWorkspaceModule = class SuperWorkspaceModule {
Main.wm._prepareWorkspaceSwitch = function(from, to, direction) {
if (this._switchData) return;

let wgroup = global.window_group;
let wgroup = Main.uiGroup;
let windows = global.get_window_actors();
let switchData = {};

Expand All @@ -185,7 +184,10 @@ var SuperWorkspaceModule = class SuperWorkspaceModule {
switchData.overContainer.add_actor(switchData.container);

wgroup.add_actor(switchData.movingWindowBin);
wgroup.add_actor(switchData.overContainer);
wgroup.insert_child_above(
switchData.overContainer,
global.window_group
);

let primaryMonitorGeometry = global.display.get_monitor_geometry(
global.display.get_primary_monitor()
Expand Down Expand Up @@ -241,6 +243,7 @@ var SuperWorkspaceModule = class SuperWorkspaceModule {
);

info.superWorkspace.backgroundContainer.reparent(info.actor);

info.superWorkspace.uiVisible = true;
info.superWorkspace.updateUI();
info.superWorkspace.frontendContainer.reparent(info.actor);
Expand All @@ -260,25 +263,19 @@ var SuperWorkspaceModule = class SuperWorkspaceModule {
actor.reparent(switchData.movingWindowBin);
} else if (window.get_workspace().index() == from) {
actor.reparent(switchData.curGroup);
actor.lower(switchData.superWorkspace.frontendContainer);
} else {
let visible = false;
for (let dir of Object.values(Meta.MotionDirection)) {
let info = switchData.surroundings[dir];

if (
!info ||
info.index != window.get_workspace().index()
)
continue;

actor.reparent(info.actor);
actor.lower(info.superWorkspace.frontendContainer);
visible = true;
//actor.lower(info.superWorkspace.frontendContainer);
break;
}

actor.visible = visible;
}
}

Expand All @@ -302,13 +299,7 @@ var SuperWorkspaceModule = class SuperWorkspaceModule {
);
switchData.superWorkspace.uiVisible = false;
switchData.superWorkspace.updateUI();
global.get_window_actors().forEach(window => {
if (
window.get_meta_window().get_workspace() !=
global.workspace_manager.get_active_workspace()
)
window.hide();
});

for (let dir of Object.values(Meta.MotionDirection)) {
let info = switchData.surroundings[dir];
if (info) {
Expand All @@ -321,7 +312,7 @@ var SuperWorkspaceModule = class SuperWorkspaceModule {
}
}
Tweener.removeTweens(switchData.container);
switchData.container.destroy();
switchData.overContainer.destroy();
switchData.movingWindowBin.destroy();

this._movingWindow = null;
Expand Down
5 changes: 0 additions & 5 deletions widget/material/rippleBackground.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ let RippleWave = GObject.registerClass(
this.mouseX = mouseX;
this.mouseY = mouseY;
this.waveSize = size / 4;
this.x = Math.round(this.mouseX - this.width / 2);
this.y = Math.round(this.mouseY - this.height / 2);
//this.set_pivot_point(mouseX / this.width, mouseY / this.height);
//this.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
Tweener.addTween(this, {
waveSize: this.fullSize,
time: this.fullSize / 600,
Expand All @@ -42,7 +38,6 @@ let RippleWave = GObject.registerClass(
this.height = waveSize;
this.x = Math.round(this.mouseX - this.width / 2);
this.y = Math.round(this.mouseY - this.height / 2);
this.queue_redraw();
}

get waveSize() {
Expand Down
148 changes: 0 additions & 148 deletions widget/material/rippleContainer.js

This file was deleted.

0 comments on commit 431f01d

Please sign in to comment.