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

Nix: add XWayland hidpi option #591

Merged
merged 1 commit into from
Aug 29, 2022
Merged

Conversation

fufexan
Copy link
Member

@fufexan fufexan commented Aug 28, 2022

Describe your PR, what does it fix/add?

Adds hidpiXWayland flag and the required logic to get it working.
Based on https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/733
The flag will be enabled by default, as I haven't had any issues with it in the past few days.

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

Users will have to adjust their config files accordingly, possibly having to add

exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2

in order for XWL to scale. This will make XWL programs look as if they were unscaled. To fix this, users have to export different environment variables to make the specific toolkits render at the proper scaling. For example

export GDK_SCALE=2
export XCURSOR_SIZE=32

The GDK_SCALE variable won't conflict with wayland-native GTK programs.

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

I'm still not sure whether we should go with this approach, or rather having a separate package.

@viperML @Misterio77 @nix guys for reviews

@viperML
Copy link
Contributor

viperML commented Aug 28, 2022

I would add another job to the CI action to build this

@viperML
Copy link
Contributor

viperML commented Aug 28, 2022

And also move the patching into its own wlroots.nix file

@fufexan fufexan force-pushed the xwayland_hidpi branch 2 times, most recently from a5c41bf to f00e213 Compare August 29, 2022 13:20
@fufexan
Copy link
Member Author

fufexan commented Aug 29, 2022

@viperML I updated the HM module as well. Do you think I should also add a mkRenamedModule entry? Essentially it's xwayland -> xwayland.enable.

@viperML
Copy link
Contributor

viperML commented Aug 29, 2022

Sure. I don't even think anyone would use that option to disable xwayland

@fufexan
Copy link
Member Author

fufexan commented Aug 29, 2022

Done. Mergeable?

@viperML
Copy link
Contributor

viperML commented Aug 29, 2022

Yes merge

@fufexan fufexan merged commit bdd20c4 into hyprwm:main Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants