Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KDE GTK Configurator KDE GTK Configurator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • KDE GTK ConfiguratorKDE GTK Configurator
  • Merge requests
  • !56

Add support for XWayland client scaling

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Luca Bacci requested to merge lucabacci/kde-gtk-config:add-support-for-xwayland-client-scaling into master Feb 18, 2023
  • Overview 42
  • Commits 4
  • Pipelines 10
  • Changes 5

This is very important e.g for Chromium or Electron apps.

How to test:

  • Set up a multi monitor system with mixed DPI scaling
  • Ensure to run on plasma-workspace tip as of plasma-workspace@cdf2e1a9, or alternatively unset the GDK_SCALE, GDK_DPI_SCALE environment variables when launching test applications.

What to test:

  • Test both Plasma/X11 and Plasma/Wayland sessions
  • Test the following applications: gtk3-demo-application, gtk4-demo-application, code (or any other Electron app)
  • On Wayland, open System Settings > Display and Monitor > Display Configuration and change Legacy Applications (X11) options

This should fix the regressions introduced by me in 5.27.0 with !49 (merged), which are all about not taking XWayland client scaling in consideration (sorry!) 😔, while continuing to have non-double-scaled GTK4 applications


This MR does the following:

  • Renames the ConfigValueProvider::globalScaleFactor() method to x11GlobalScaleFactor()
  • Removes the ConfigValueProvider::globalScaleFactorAsPercent(), ConfigValueProvider::globalScaleFactorFloor() methods as those are now useless
  • The global scale factor for XWayland apps is read from kwinrc under the Xwayland group.
  • Read the base Xft.dpi resource value from the kdeglobals config file

All in all the code is much cleaner, yay! 🙂

CCBUG: 465733
CCBUG: 442901

Edited Feb 20, 2023 by Luca Bacci
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: add-support-for-xwayland-client-scaling