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

            Bug ID: 459733
           Summary: Kwin applies integer scaling instead of fractional
                    when calculating output boundaries for wl_surface
                    enter and leave events
    Classification: Plasma
           Product: kwin
           Version: 5.25.5
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: m...@bolhuis.dev
  Target Milestone: ---

SUMMARY
A wl_surface will receive enter and leave events based on a region that is the
output's physical resolution divided by the integer scaling factor, not the
fractional scaling factor.
For example, for a fractional scale of 1.25 the wl_output scale used is 2,
which means that for an output of 2560x1440 physical pixels the region that
triggers surface enter and leave events is 1280x720, anchored at the top left.
Instead the bounds should be calculated based on the physical size divided by
the fractional scale.

STEPS TO REPRODUCE
1. Configure a 2560x1440 physical pixel output to use 125% fractional scaling.
2. Create a small window (idealy less than 
3. Log wl_surface.{enter,leave} events of the window
4. Place the window at the top left corner of the output
5. Drag the window down, or horizontally and observe surface events

OBSERVED RESULT
Once the the entire surface is past 1280 logical pixels in the x axis or 720 in
the y the surface receives a leave event.

EXPECTED RESULT
The surface should receive a leave event once it fully passes 2048 logical
pixels in the x and 1152 in the y.

NOTES
The bug applies equally for different output resolutions and fractional scaling
factors, not just the example values I've used above. The bug does not appear
when outputs use integer scaling.

SOFTWARE/OS VERSIONS
Linux: Arch
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
NVIDIA Driver: 515.76
Wayland Version: 1.21

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

Reply via email to