Skip to content

Linux: pet chat/talk buttons clipped by the window shape at fractional display scaling #238

Description

@pinoybear

On KDE Plasma with the display at 115%, the chat button on the pet doesn't show at all, and the talk button is cut off along its top edge. At 100% both show normally, chat on top and talk below it. I got the same result with two different pets (the default and Purl) and at two pet sizes, so it looks like the scaling.

The buttons look like they're drawn but clipped by the X11 window shape from applyLinuxPetWindowShape: the talk button is cut along a straight edge even with the pet in the middle of the screen. At 115% Electron reports scaleFactor=1.15625, so my guess is the shape's pet hitbox and the pet hitbox in the page end up slightly out of line at fractional scale, and the top of the button column falls outside the shape. That would explain chat (the first slot) being completely gone and talk (the second) only partly cut.

From the log at 115% with pet scale 0.5:

linux window shape applied … scale=0.5 hudScale=1.1 scaleFactor=1.15625 shape=[{"x":"114","y":"311","width":"176","height":"185"}, …]

Reproduce

  1. KDE Plasma Wayland session (OpenPets on XWayland with the default --ozone-platform=x11), display scale set to 115%.
  2. Control Center → Assistant → Chat & Voice, turn on Chat button and Talk button.
  3. With no status bubble showing, the chat button isn't visible and the talk button is cut off at the top.
  4. Set the display scale to 100% and restart OpenPets: both buttons show.

Environment: CachyOS, kernel 7.2.7-1-cachyos, KDE Plasma 6.7.5 / KWin 6.7.5 (Wayland session), xorg-xwayland 24.1.13, OpenPets 4.0.0 (openpets-bin from the AUR, built from the v4.0.0 .deb), 2880x1920 display. My other laptop at 100% (main f24f934) shows both buttons fine.

Happy to test a fix at 115% if that helps.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions