hyprland-wiki/pages/Configuring/XWayland.md
Shailesh Aanand 03cc9f64ac
Fix broken link to xwayland-hidpi.patch & wlroots-hidpi.patch (#278)
This commit fixes the broken links to `wlroots-hidpi.patch` and `xwayland-hidpi.patch` on the XWayland page.

The files were moved to patches subdirectory in 91e3c654d3
2023-07-24 11:04:37 +02:00

1.8 KiB

XWayland is the bridging mechanism between legacy Xorg programs and Wayland compositors.

HiDPI XWayland

XWayland currently looks pixelated/blurry on HiDPI screens, due to Xorg's inability to scale. There are attempts to add a standard scaling mechanism, such as MR 733.

You can use this MR's wlroots implementation in Hyprland by making a few changes.

{{< hint >}} The following instructions assume you know how to patch programs, either manually or using your favourite package manager.

See instructions for manual patching and Pacman patching. {{< /hint >}}

  1. Have the latest xwayland package patched with at least the HiDPI patch (based on the MR's implementation, but updated).

  2. Make sure you have the required Hyprland wlroots, patched with the HiDPI xwayland patch and this commit reverted. This is important, as not reverting it will make opening XWayland programs crash Hyprland.

  3. Add these lines to your configuration:

    
    # change monitor to hires, the last argument is the scale factor
    monitor=,highres,auto,2
    
    # sets xwayland scale
    exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
    
    # toolkit-specific scale
    env = GDK_SCALE,2
    env = XCURSOR_SIZE,32
    

    {{< hint >}} The GDK_SCALE variable won't conflict with wayland-native GTK programs. {{< /hint >}}