domferr / domferr/tilingshell

Ghosting when tiling a window moves it to the next monitor

Open
#590 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

I have a single, simple tiling setup with 2 side by side windows (just like the gnome default), 3 monitors side by side (A-B-C, same resolution and scaling), and Super+Arrow to tile left/right. Let's say I tile a Window to the right side of monitor A, and press Super+Right, then the window (correctly) moves to the left side of monitor B, however, during that transition there is a visual artifact that looks like ghosting that reaches all the way to the right of screen B.

*I think* the reason is that the window is first moved to the next monitor and then resized, e.g. here: https://github.com/domferr/tilingshell/blob/main/src/components/tilingsystem/tilingManager.ts#L993-L1002

I tried skipping the `move_to_monitor` animation like this:

```ts
...
// move and resize the window to the current selection
if (window.get_monitor() !== this._monitor.index) {
Main.wm.skipNextEffect(windowActor);
}
window.move_to_monitor(this._monitor.index);
window.move_resize_frame(
...
```

and the ghosting is gone, although so is the animation. I also tried something like:

```ts
...
TilingShellWindowManager.easeMoveWindow({
window,
from: beforeRect,
to: destRect,
duration: 1, // tried higher values too, e.g. 250
monitorIndex: this._monitor.index,
});
// @ts-expect-error "Main.wm has the "private" function _prepareAnimationInfo"
Main.wm._prepareAnimationInfo(
...
```

which also didn't cause ghosting, but the animation was weird.

**Information (please complete the following):**
- Tiling Shell version: 17.3
- GNOME version: 50.3

Contributor guide

Open the contributing guide

Research direction

Reproduce the artifact with GNOME 50.3, three side-by-side monitors, and the Super+Arrow transition described. Start in src/components/tilingsystem/tilingManager.ts around lines 993-1002, comparing move_to_monitor and move_resize_frame with the attempted animation changes. Done means moving the window to the next monitor retains a normal animation without ghosting.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.