workspace: Some style changes to match guidelines
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
This commit is contained in:
parent
5e6629e1a7
commit
28a56d24ad
@ -1,5 +1,6 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Atk = imports.gi.Atk;
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const GObject = imports.gi.GObject;
|
const GObject = imports.gi.GObject;
|
||||||
@ -7,10 +8,8 @@ const Mainloop = imports.mainloop;
|
|||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Pango = imports.gi.Pango;
|
const Pango = imports.gi.Pango;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
|
||||||
const Atk = imports.gi.Atk;
|
|
||||||
|
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
|
||||||
const DND = imports.ui.dnd;
|
const DND = imports.ui.dnd;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
@ -292,8 +291,7 @@ var WindowClone = class {
|
|||||||
this.actor.layout_manager.boundingBox = rect;
|
this.actor.layout_manager.boundingBox = rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the actor just below us, respecting reparenting done
|
// Find the actor just below us, respecting reparenting done by DND code
|
||||||
// by DND code
|
|
||||||
getActualStackAbove() {
|
getActualStackAbove() {
|
||||||
if (this._stackAbove == null)
|
if (this._stackAbove == null)
|
||||||
return null;
|
return null;
|
||||||
@ -1137,10 +1135,9 @@ var Workspace = class {
|
|||||||
this._windows = [];
|
this._windows = [];
|
||||||
this._windowOverlays = [];
|
this._windowOverlays = [];
|
||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
if (this._isOverviewWindow(windows[i])) {
|
if (this._isOverviewWindow(windows[i]))
|
||||||
this._addWindowClone(windows[i], true);
|
this._addWindowClone(windows[i], true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Track window changes
|
// Track window changes
|
||||||
if (this.metaWorkspace) {
|
if (this.metaWorkspace) {
|
||||||
@ -1506,7 +1503,7 @@ var Workspace = class {
|
|||||||
|
|
||||||
// We might have the window in our list already if it was on all workspaces and
|
// We might have the window in our list already if it was on all workspaces and
|
||||||
// now was moved to this workspace
|
// now was moved to this workspace
|
||||||
if (this._lookupIndex (metaWin) != -1)
|
if (this._lookupIndex(metaWin) != -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!this._isMyWindow(win))
|
if (!this._isMyWindow(win))
|
||||||
@ -1538,8 +1535,9 @@ var Workspace = class {
|
|||||||
|
|
||||||
clone.slot = [x, y, clone.actor.width * scale, clone.actor.height * scale];
|
clone.slot = [x, y, clone.actor.width * scale, clone.actor.height * scale];
|
||||||
clone.positioned = true;
|
clone.positioned = true;
|
||||||
clone.actor.set_position (x, y);
|
|
||||||
clone.actor.set_scale (scale, scale);
|
clone.actor.set_position(x, y);
|
||||||
|
clone.actor.set_scale(scale, scale);
|
||||||
clone.overlay.relayout(false);
|
clone.overlay.relayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1881,7 +1879,7 @@ var Workspace = class {
|
|||||||
|
|
||||||
_removeWindowClone(metaWin) {
|
_removeWindowClone(metaWin) {
|
||||||
// find the position of the window in our list
|
// find the position of the window in our list
|
||||||
let index = this._lookupIndex (metaWin);
|
let index = this._lookupIndex(metaWin);
|
||||||
|
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
return null;
|
return null;
|
||||||
|
@ -399,7 +399,7 @@ var WorkspaceThumbnail = class {
|
|||||||
|
|
||||||
// We might have the window in our list already if it was on all workspaces and
|
// We might have the window in our list already if it was on all workspaces and
|
||||||
// now was moved to this workspace
|
// now was moved to this workspace
|
||||||
if (this._lookupIndex (metaWin) != -1)
|
if (this._lookupIndex(metaWin) != -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!this._isMyWindow(win))
|
if (!this._isMyWindow(win))
|
||||||
@ -412,7 +412,7 @@ var WorkspaceThumbnail = class {
|
|||||||
while (parent.is_attached_dialog())
|
while (parent.is_attached_dialog())
|
||||||
parent = parent.get_transient_for();
|
parent = parent.get_transient_for();
|
||||||
|
|
||||||
let idx = this._lookupIndex (parent);
|
let idx = this._lookupIndex(parent);
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
// parent was not created yet, it will take care
|
// parent was not created yet, it will take care
|
||||||
// of the dialog when created
|
// of the dialog when created
|
||||||
@ -536,7 +536,7 @@ var WorkspaceThumbnail = class {
|
|||||||
|
|
||||||
_removeWindowClone(metaWin) {
|
_removeWindowClone(metaWin) {
|
||||||
// find the position of the window in our list
|
// find the position of the window in our list
|
||||||
let index = this._lookupIndex (metaWin);
|
let index = this._lookupIndex(metaWin);
|
||||||
|
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user