Clipping ignored on actors inside uiGroup when magnifier is on
Affected version
OS: NixOS unstable / Ubuntu 19.10 (regular gnome session)
gnome-shell: 3.34.3 / 3.34.1
Backend: XOrg and Wayland
GPU: Intel Corporation HD Graphics 620
Note: not sure if this belongs in mutter or gnome-shell
Bug summary
When magnifier is enabled (also without any zoom) clips on actors inside Main.uiGroup
is ignored.
Steps to reproduce
Turn on magnifier (aka. Zoom in the a11y menu)
wget https://gitlab.gnome.org/GNOME/gnome-shell/uploads/74cfca4d9356d0756531503169c80bba/magnifier_clip_bug.js
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval "$(cat magnifier_clip_bug.js)"
# Get rid of the actor when done
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval "window.__clip_bug_demo.destroy(); window.__clip_bug_demo = null"
What happened
The white border indicates the clip - the red rectangle the child. The child overflows the clip.
What did you expect to happen
The child should've been clipped according to the clip.
Disable the magnifier to see the expected result. (or find the magnifier actor in the stage and hide it. The actual uiGroup renders fine so it's probably related to ClutterClone)
Relevant logs, screenshots, screencasts etc.
[1]
const Clutter = imports.gi.Clutter;
const St = imports.gi.St;
const Main = imports.ui.main;
let actor = new St.Widget({
style: "background-color: red; border: 5px solid black",
width: 300,
height: 300,
x: -20,
y: -20
});
let clip = new Clutter.Actor({
x: 80, y: 80
});
window.__clip_bug_demo = clip;
clip.set_clip(0,0, 100, 100);
let border = new St.Widget({
style: "border: 2px solid white;",
width: clip.clip.width,
height: clip.clip.height,
});
clip.add_actor(actor);
clip.add_actor(border);
Main.uiGroup.add_actor(clip);
Possibly related: mutter#184 (closed) ?
Note: when I took the screenshots the PaperWM extension was active, but I later tested without - getting the same result.
Edited by Ole Jørgen Brønner