mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
WorkspacesView: don't access the allocation 4 times
Access it once, and save 3 GObject property accesses and related copies. https://bugzilla.gnome.org/show_bug.cgi?id=729823
This commit is contained in:
parent
7d7b92419f
commit
37ef0e4bed
1 changed files with 3 additions and 2 deletions
|
|
@ -606,8 +606,9 @@ const WorkspacesDisplay = new Lang.Class({
|
|||
return;
|
||||
|
||||
let [x, y] = this.actor.get_transformed_position();
|
||||
let width = this.actor.allocation.x2 - this.actor.allocation.x1;
|
||||
let height = this.actor.allocation.y2 - this.actor.allocation.y1;
|
||||
let allocation = this.actor.allocation;
|
||||
let width = allocation.x2 - allocation.x1;
|
||||
let height = allocation.y2 - allocation.y1;
|
||||
let primaryGeometry = { x: x, y: y, width: width, height: height };
|
||||
|
||||
let monitors = Main.layoutManager.monitors;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue