Commit 60e66798 authored by Alexandru Nechita's avatar Alexandru Nechita
Browse files

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
parent d8954dfb
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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