moveDone: only move reactive windows

This commit is contained in:
Tor Hedin Brønner
2018-12-14 16:44:46 +01:00
parent fbd8f439b0
commit b138e9083e
+9 -9
View File
@@ -593,8 +593,10 @@ class Space extends Array {
if (!w.get_compositor_private())
return;
if (this.isPlaceable(w))
this.visible.push(w);
if (!this.isPlaceable(w))
return;
this.visible.push(w);
// Guard against races between move_to and layout
// eg. moving can kill ongoing resize on wayland
@@ -611,20 +613,18 @@ class Space extends Array {
let y = monitor.y + Math.round(clone.y);
let f = w.get_frame_rect();
(f.x !== x || f.y !== y) && w.move_frame(true, x, y);
});
this.visible.forEach(w => {
let actor = w.get_compositor_private();
// The actor's width/height is not correct right after resize
let b = w.get_buffer_rect();
const x = Math.max(0, monitor.x - b.x);
const y = Math.max(0, monitor.y - b.y);
const cw = b.width - x
const cx = Math.max(0, monitor.x - b.x);
const cy = Math.max(0, monitor.y - b.y);
const cw = b.width - cx
- Math.max(0, (b.x + b.width) - (monitor.x + monitor.width));
const ch = actor.height - y
const ch = actor.height - cy
- Math.max(0, (b.y + b.height) - (monitor.y + monitor.height));
actor.set_clip(x, y, cw, ch);
actor.set_clip(cx, cy, cw, ch);
w.clone.hide();
actor.show();