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

            Bug ID: 452938
           Summary: pointer confinement regions misapplied to libdecor
                    decorations
           Product: kwin
           Version: 5.24.4
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: da...@ingeniumdigital.com
  Target Milestone: ---

SUMMARY

If an application uses client side decorations as implemented by libdecor[1],
when it sets a pointer confinement region using
zwp_pointer_constraints_v1_confine_pointer() on the content surface, that
region includes the titlebar, not just the content surface. (i.e., location
(0,0) is the top-left of the parent surface, not the child surface).

This means that the pointer can escape into the titlebar (which was not
intended), and the bottom, titlebar-sized area of the window is inaccessible.

Weston shows the expected behaviour.

Note that libdecor does not use client-side decorations when SSDs are
available: the recently-added LIBDECOR_FORCE_CSD=1 environment variable should
be used, and hence a recent git version of libdecor.


STEPS TO REPRODUCE
1. Get the latest git versions of SDL and libdecor, and build them (and their
tests).
2. Set the following environment variables: SDL_VIDEODRIVER=wayland
SDL_VIDEO_WAYLAND_PREFER_LIBDECOR=1 LIBDECOR_FORCE_CSD=1
3. Run a program which confines the mouse cursor. For example: ./test/testgl2
--confine-cursor 0,0,640,480

OBSERVED RESULT

The pointer is confined to a 640×480 region which includes the titlebar, but
not the bottom of the content area.

EXPECTED RESULT

The pointer is confined to the 640×480-sized content area, but cannot escape
into the titlebar. The bottom few pixels of the content area are accessible.
SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

See also bug #449620, which seems related.

I've also seen this occur on the Tomb Raider (2013) game.

[1]: https://gitlab.gnome.org/jadahl/libdecor
[2]: https://github.com/libsdl-org/SDL

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

Reply via email to