Remove use of superfluous MetaWindowActor APIs
This commit is contained in:
parent
cc4659f5c6
commit
7fcae1e974
@ -232,12 +232,13 @@ const WorkspaceTracker = new Lang.Class({
|
|||||||
|
|
||||||
let windows = global.get_window_actors();
|
let windows = global.get_window_actors();
|
||||||
for (i = 0; i < windows.length; i++) {
|
for (i = 0; i < windows.length; i++) {
|
||||||
let win = windows[i];
|
let actor = windows[i];
|
||||||
|
let win = actor.get_meta_window();
|
||||||
|
|
||||||
if (win.get_meta_window().is_on_all_workspaces())
|
if (win.is_on_all_workspaces())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
let workspaceIndex = win.get_workspace();
|
let workspaceIndex = win.get_workspace().index();
|
||||||
emptyWorkspaces[workspaceIndex] = false;
|
emptyWorkspaces[workspaceIndex] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -975,25 +976,29 @@ const WindowManager = new Lang.Class({
|
|||||||
wgroup.add_actor(switchData.movingWindowBin);
|
wgroup.add_actor(switchData.movingWindowBin);
|
||||||
|
|
||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
let window = windows[i];
|
let actor = windows[i];
|
||||||
|
let window = actor.get_meta_window();
|
||||||
|
|
||||||
if (!window.meta_window.showing_on_its_workspace())
|
if (!window.showing_on_its_workspace())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (this._movingWindow && window.meta_window == this._movingWindow) {
|
if (window.is_on_all_workspaces())
|
||||||
switchData.movingWindow = { window: window,
|
continue;
|
||||||
parent: window.get_parent() };
|
|
||||||
|
let record = { window: actor,
|
||||||
|
parent: actor.get_parent() };
|
||||||
|
|
||||||
|
if (this._movingWindow && window == this._movingWindow) {
|
||||||
|
switchData.movingWindow = record;
|
||||||
switchData.windows.push(switchData.movingWindow);
|
switchData.windows.push(switchData.movingWindow);
|
||||||
window.reparent(switchData.movingWindowBin);
|
actor.reparent(switchData.movingWindowBin);
|
||||||
} else if (window.get_workspace() == from) {
|
} else if (window.get_workspace().index() == from) {
|
||||||
switchData.windows.push({ window: window,
|
switchData.windows.push(record);
|
||||||
parent: window.get_parent() });
|
actor.reparent(switchData.outGroup);
|
||||||
window.reparent(switchData.outGroup);
|
} else if (window.get_workspace().index() == to) {
|
||||||
} else if (window.get_workspace() == to) {
|
switchData.windows.push(record);
|
||||||
switchData.windows.push({ window: window,
|
actor.reparent(switchData.inGroup);
|
||||||
parent: window.get_parent() });
|
actor.show();
|
||||||
window.reparent(switchData.inGroup);
|
|
||||||
window.show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ const XdndHandler = new Lang.Class({
|
|||||||
let cursorWindow = windows[windows.length - 1];
|
let cursorWindow = windows[windows.length - 1];
|
||||||
|
|
||||||
// FIXME: more reliable way?
|
// FIXME: more reliable way?
|
||||||
if (!cursorWindow.is_override_redirect())
|
if (!cursorWindow.get_meta_window().is_override_redirect())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let constraint_position = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.POSITION,
|
let constraint_position = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.POSITION,
|
||||||
|
Loading…
Reference in New Issue
Block a user