https://bugs.kde.org/show_bug.cgi?id=518050

            Bug ID: 518050
           Summary: kwin doesn't correctly restore animated window content
                    when switching desktops
    Classification: Plasma
           Product: kwin
      Version First 6.6.3
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: compositing
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

Found this while working on improving the built-in translucency animation.

The plugin issue in short is that if a translucent window is shown on all
desktops, switching the desktop makes it flicker. This happens because the
plugin on every desktop switch cancel()s animation and then calls animate()
again for *every* window in the system. This "flickering" is the
`cancel()/animate()` cycle.

Having dug into how to fix that, I found that this line is unnecessary (or so I
thought…):

        effects.desktopChanged.connect(translucencyEffect.updateAnimation);

That's because the plugin already controls all INs and OUTs for windows. IOW,
windows that supposed to be translucent are translucent, and ones that aren't,
well, aren't.

Removing the line however uncovered a problem in KWin: when I switch between
desktops, an image on windows from previous desktop gets "stuck" on the newly
activated desktop until I click a window.

This is definitely not expected behavior, because the only thing plugin does is
it basically changes `Effect.Opacity`. This shouldn't make image "stuck" when
switching desktops.

Idk if important, but I have `KWIN_USE_OVERLAYS=1` (didn't test without it, can
check if needed).

STEPS TO REPRODUCE (in terms of commands from kwin root dir)
1. Delete the line in plugin: `sed -i '/effects.desktopChanged.connect/d'
src/plugins/translucency/package/contents/code/main.js`
2. Copy the change to the system: `sudo cp -r
src/plugins/translucency/package/*
/usr/share/kwin-wayland/effects/translucency/`
3. Put on both desktops 1 and 2 two windows side-by-side (so 4 windows in
total, two for each desktop)
4. In "System Settings" — (re)enable translucency plugin
5. Try switching in between desktops 1 and 2

OBSERVED RESULT

And image from a window on one desktop gets "stuck" over an image in another
desktop, until you click on that window (which probably causes it to
re-render). So e.g. if you have Firefox on desktop 1 and you switched to
desktop 2 where there's Konsole, you'll still be seeing Firefox instead of
Konsole.

EXPECTED RESULT

You should see the expected window content on each desktop.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux
KDE Plasma Version: 6.6.3
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 6.19.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i5-10500H CPU @ 2.50GHz
Memory: 16 GiB of RAM (15.3 GiB usable)
Graphics Processor 1: Intel® UHD Graphics
Graphics Processor 2: NVIDIA GeForce RTX 3050 Ti Laptop GPU

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to