Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xwayland: support HiDPI scale #6446

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

moetayuko
Copy link

@moetayuko moetayuko commented Jun 12, 2024

Describe your PR, what does it fix/add?

This supports the xorg-xwayland patch at https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/733

Ported from https://gitlab.freedesktop.org/lilydjwg/wlroots/-/commit/5a7c65cab11c9f3c3dc79f9c4cfb8a6acf6cbaae

See #6281 for motivation.

AUR package hyprland-hidpi-xprop-git applies this patch on top of hyprland mainline. After installing, do the following to enable (scaling factor 2 in this example):

  1. Add exec-once = systemctl --user start xsettingsd.service && echo "Xft.dpi: 192" | xrdb -merge && xprop -root -format _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 to hyprland configuration.
  2. Add the following to ~/.config/xsettingsd/xsettingsd.conf
    Gdk/UnscaledDPI 98304
    Gdk/WindowScalingFactor 2
    
  3. Remove GDK_SCALE, QT_SCALE_FACTOR, and other per-application scaling options.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

N/A

Is it ready for merging, or does it need work?

No, for cherry-pick only

@vaxerski
Copy link
Member

what advantages does this have over force_zero_scaling?

@moetayuko
Copy link
Author

what advantages does this have over force_zero_scaling?

Quoting from my description in #6281:

The official Xwayland scaling solution xwayland:force_zero_scaling does not support multi-monitor with different scale factors. Specifically, when having two monitors of scale factors 2 and 1, Xwayland apps look good on the one of scale factor 2, but 2x larger on the one of scale factor 1.

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

Successfully merging this pull request may close these issues.

2 participants