[home] [readme] [integration] [getting-started] [manual] [more]
Installing the XOrg XWayland Patch
ArchLinux
You can install the xorg-xwayland-hidpi-xprop package from AUR.
Other distros
You will need to patch xorg-xwayland yourself, and then compile it. Depending on your distro, there might be a package out there so you don’t have to recompile, but compiling xorg-xwayland is pretty fast. The steps should be as follows:
- Find out what version of xorg-server you have installed.
- If it’s 23.1.1 (or similar), download the patch from AUR.
- Apply the patch -
patch -Np1 -i hidpi.patch
- Build xorg-xwayland as you normally would.
Installing the Wlroots Patch
ArchLinux
You can install the wlroots-hidpi-xprop-git package from AUR.
NOTE: If you wish, you can compile labwc with wlroots as a subproject, with the patch applied. This makes it easier to try the scaling without having to install the
wlroots-hidpi-xprop-git
AUR package globally. See below for details on how to do this.
Other distros
You can compile wlroots as you normally would:
git clone https://gitlab.freedesktop.org/wlroots/wlroots.git
cd wlroots
- Revert 18595000f3a21502fd60bf213122859cc348f9af, as it can cause issues with certain XWayland apps:
git revert -n 18595000f3a21502fd60bf213122859cc348f9af
meson setup build/
ninja -C build/
- To install it globally:
sudo ninja -C build/ install
As a subproject in labwc
A convenient way to test scaling without installing the patched version of wlroots globally is to compile labwc with wlroots as a subproject. This does require compiling Labwc with an in-progress Pull Request which adds support for wlroots 0.17.
You can compile labwc with wlroots as a subproject as follows:
git clone https://github.com/labwc/labwc --branch=master
cd labwc
- Download the
wlroots-0.17
patch, and apply it:
wget https://patch-diff.githubusercontent.com/raw/labwc/labwc/pull/626.patch patch -p1 < 626.patch
- Download the required wlroots patches:
mkdir subprojects/packagefiles
wget https://raw.githubusercontent.com/joshuataylor/wlroots-hidpi-xprop-git/8f14904f40f22b5ad247f022de21875c5a4d1050/0001-xwayland-support-HiDPI-scale.patch -P subprojects/packagefiles
wget https://raw.githubusercontent.com/joshuataylor/wlroots-hidpi-xprop-git/8f14904f40f22b5ad247f022de21875c5a4d1050/0002-Fix-configure_notify-event.patch -P subprojects/packagefiles
- If you are using Meson 0.63 or above, you can use the diff_files feature to apply this patch for you, and keep the subproject up to date. If you are using an older version of Meson, you will have to apply the patch manually, and update it when you want to update the subproject.
To find out which version of Meson you are using, run meson --version
.
Meson 0.63 and above: Add the following to the subprojects/wrap/wlroots.wrap
file, as the last option in [wrap-git]
:
diff_files = 0001-xwayland-support-HiDPI-scale.patch 0002-Fix-configure_notify-event.patch
Meson 0.62 and below, follow the steps until step 6, where you will need to apply the patch manually.
- Delete the current
build
directory, and subprojects/wlroots directory:
rm -rf build
rm -rf subprojects/wlroots
- Run
meson setup
, forcing the fallback for wlroots:
meson setup build --force-fallback-for=wlroots
If you are using Meson 0.63 or above, you can skip this next step, as the patch will be applied automatically.
7a. If you are on Meson 0.62 and below, you will need to apply the patch manually:
cd subprojects/wlroots
patch -p1 < ../packagefiles/0001-xwayland-support-HiDPI-scale.patch
patch -p1 < ../packagefiles/0002-Fix-configure_notify-event.patch
- Configure meson with a directory prefix (replacing the below with your own directory):
meson configure build -Dprefix=/opt/labwc/hidpi
- Compile:
meson compile -C build
- Install:
sudo meson install --skip-subprojects -C ./build
--skip-subprojects
prevents installing the wlroots headers.