From 60e667982d26f650e56f0e33e27e3867ba51f413 Mon Sep 17 00:00:00 2001 From: Alexandru Nechita Date: Sat, 12 Jul 2025 08:54:14 +0200 Subject: [PATCH] jetbrains: add forceWayland flag forceWayland makes the jetbrains IDEs to use WLToolkit if Wayland is detected, allowing to use Wayland natively instead of using XWayland --- pkgs/applications/editors/jetbrains/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index 71eaaa2e9ba2..ba84e12d14b3 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -37,6 +37,7 @@ in libX11, vmopts ? null, + forceWayland ? false, }: let @@ -83,9 +84,13 @@ let inherit pname jdk - extraWrapperArgs extraBuildInputs ; + extraWrapperArgs = + extraWrapperArgs + ++ lib.optionals (stdenv.hostPlatform.isLinux && forceWayland) [ + ''--add-flags "\''${WAYLAND_DISPLAY:+-Dawt.toolkit.name=WLToolkit}"'' + ]; extraLdPath = extraLdPath ++ lib.optionals (stdenv.hostPlatform.isLinux) [ libGL ]; src = if fromSource then