mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-05 19:56:53 +00:00
moveDone: only move reactive windows
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user