[wiki] [sites] This patch removes the outlined rectangle when a st window is unfocused || endiexz

From: <git_AT_suckless.org>
Date: Wed, 28 Aug 2024 07:41:17 +0200

commit d85ba1891ed49d8f0f90527eb8f7cef16dce64a0
Author: endiexz <endiexz_AT_163.com>
Date: Wed Aug 28 13:39:57 2024 +0800

    This patch removes the outlined rectangle when a st window is unfocused

diff --git a/st.suckless.org/patches/unfocused_cursor/index.md b/st.suckless.org/patches/unfocused_cursor/index.md
new file mode 100644
index 00000000..1175403b
--- /dev/null
+++ b/st.suckless.org/patches/unfocused_cursor/index.md
_AT_@ -0,0 +1,13 @@
+## unfocused-cursor
+
+## Description
+
+By default, when an st window is unfocused, the cursor appears as an outlined rectangle. If you prefer a cleaner look, this patch removes the outlined rectangle, making the cursor invisible when the window is unfocused.
+
+## Download
+
+* [st-unfocused-cursor-0.1.diff](st-unfocused-cursor-0.1.diff)
+
+## Author
+
+* Endiexz [endiexz.top](endiexz.top)
\ No newline at end of file
diff --git a/st.suckless.org/patches/unfocused_cursor/st-unfocused-cursor-0.1.diff b/st.suckless.org/patches/unfocused_cursor/st-unfocused-cursor-0.1.diff
new file mode 100644
index 00000000..233914a5
--- /dev/null
+++ b/st.suckless.org/patches/unfocused_cursor/st-unfocused-cursor-0.1.diff
_AT_@ -0,0 +1,21 @@
+diff --git a/x.c b/x.c
+index d19bb3f..c9f2057 100644
+--- a/x.c
++++ b/x.c
+_AT_@ -1618,7 +1618,7 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
+ break;
+ }
+ } else {
+- XftDrawRect(xw.draw, &drawcol,
++/* XftDrawRect(xw.draw, &drawcol,
+ win.hborderpx + cx * win.cw,
+ win.vborderpx + cy * win.ch,
+ win.cw - 1, 1);
+_AT_@ -1634,6 +1634,7 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
+ win.hborderpx + cx * win.cw,
+ win.vborderpx + (cy + 1) * win.ch - 1,
+ win.cw, 1);
++*/
+ }
+ }
+
Received on Wed Aug 28 2024 - 07:41:17 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 28 2024 - 07:48:50 CEST