From d93da9db6877aac9c240bb5b566a327c58cb760f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 4 Dec 2022 01:23:46 -0300 Subject: [PATCH] WIP: fix way vrr --- patches/sway/fix-vrr.patch | 0 patches/wlroots/fix-vrr.patch | 24 ++++++++++++++++++++++++ user/sway.nix | 14 +++++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 patches/sway/fix-vrr.patch create mode 100644 patches/wlroots/fix-vrr.patch diff --git a/patches/sway/fix-vrr.patch b/patches/sway/fix-vrr.patch new file mode 100644 index 0000000..e69de29 diff --git a/patches/wlroots/fix-vrr.patch b/patches/wlroots/fix-vrr.patch new file mode 100644 index 0000000..9d000f2 --- /dev/null +++ b/patches/wlroots/fix-vrr.patch @@ -0,0 +1,24 @@ +diff --git a/backend/drm/drm.c b/backend/drm/drm.c +index 43de54e5..307a24ff 100644 +--- a/backend/drm/drm.c ++++ b/backend/drm/drm.c +@@ -769,6 +769,7 @@ struct wlr_output_mode *wlr_drm_connector_add_mode(struct wlr_output *output, + + static bool drm_connector_set_cursor(struct wlr_output *output, + struct wlr_buffer *buffer, int hotspot_x, int hotspot_y) { ++ wlr_log(WLR_DEBUG, "drm_connector_set_cursor"); + struct wlr_drm_connector *conn = get_drm_connector_from_output(output); + struct wlr_drm_backend *drm = conn->backend; + struct wlr_drm_crtc *crtc = conn->crtc; +@@ -843,6 +844,11 @@ static bool drm_connector_set_cursor(struct wlr_output *output, + + static bool drm_connector_move_cursor(struct wlr_output *output, + int x, int y) { ++ ++ wlr_log(WLR_DEBUG, "drm_connector_move_cursor"); ++ ++ return true; ++ + struct wlr_drm_connector *conn = get_drm_connector_from_output(output); + if (!conn->crtc) { + return false; diff --git a/user/sway.nix b/user/sway.nix index ddd4b33..6f72ed7 100644 --- a/user/sway.nix +++ b/user/sway.nix @@ -40,6 +40,19 @@ in { forEachMerge = list: func: mergeAttrsSet (lib.forEach list func); in { enable = true; + package = pkgs.sway.override { + sway-unwrapped = ((pkgs.sway-unwrapped.overrideAttrs (old: { + patches = old.patches ++ [ + ../patches/sway/fix-vrr.patch + ]; + })).override { + wlroots = pkgs.wlroots.overrideAttrs (_: { + patches = [ + ../patches/wlroots/fix-vrr.patch + ]; + }); + }); + }; config = { bars = [ ]; window.titlebar = false; @@ -412,7 +425,6 @@ in { # layer=overlay }; home.packages = with pkgs; [ - sway swaybg swaylock