Revert "insertWindow: derive existing from metaWindow.unmapped"

This reverts commit 1c5779116b.

Not entirely sure what's up here, but this triggers infinite recursion when
eg. opening the color picker from paperwm prefs.

fixes #200
This commit is contained in:
Tor Hedin Brønner
2019-11-20 11:58:13 +01:00
parent d46b7bf701
commit b58050f7f5
+5 -6
View File
@@ -2016,7 +2016,7 @@ class Spaces extends Map {
*/
signals.connectOneShot(actor, 'first-frame', () => {
allocateClone(metaWindow);
insertWindow(metaWindow);
insertWindow(metaWindow, {existing: false});
});
};
@@ -2248,7 +2248,7 @@ function add_handler(ws, metaWindow) {
let actor = metaWindow.get_compositor_private();
if (actor) {
// Set position and hookup signals, with `existing` set to true
insertWindow(metaWindow);
insertWindow(metaWindow, {existing: true && !metaWindow.redirected});
delete metaWindow.redirected;
}
// Otherwise we're dealing with a new window, so we let `window-created`
@@ -2262,8 +2262,7 @@ function add_handler(ws, metaWindow) {
and `Display::window-created` through `WindowActor::show` if window is newly
created to ensure that the WindowActor exists.
*/
function insertWindow(metaWindow) {
let existing = !metaWindow.unmapped;
function insertWindow(metaWindow, {existing}) {
// Add newly created windows to the space being previewed
if (!existing &&
@@ -2576,7 +2575,7 @@ function grabEnd(metaWindow, type) {
if (workspace === 'all')
return; // Moved to the shared monitor space
else if (metaWindow.get_workspace() === workspace)
insertWindow(metaWindow);
insertWindow(metaWindow, {existing: true});
else
metaWindow.change_workspace(workspace);
if (workspace)
@@ -3068,7 +3067,7 @@ function takeWindow(metaWindow, space, {navigator}) {
navigator._moving.reverse().forEach(w => {
w.change_workspace(space.workspace);
if (w.get_workspace() === space.workspace) {
insertWindow(w);
insertWindow(w, {existing: true});
}
});
});