Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (4657bfce3098fdd052686361f84293f03d444d79)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (4657bfce3098fdd052686361f84293f03d444d79)
  • Date: Wed, 9 Mar 2016 19:52:28 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

shell-term-fm/st/DETAILS | 4
shell-term-fm/st/HISTORY | 5 +
shell-term-fm/st/patches/st-0.5-hidexcursor.diff | 96
-----------------------
shell-term-fm/st/patches/st-0.6-hidecursor.diff | 92
++++++++++++++++++++++
4 files changed, 99 insertions(+), 98 deletions(-)

New commits:
commit 4657bfce3098fdd052686361f84293f03d444d79
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

st: Update the "hide X cursor when typing" patch

commit 604194e0fc573659e199338383c1022c38cc1834
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

st 0.6

diff --git a/shell-term-fm/st/DETAILS b/shell-term-fm/st/DETAILS
index 632936e..fa12081 100755
--- a/shell-term-fm/st/DETAILS
+++ b/shell-term-fm/st/DETAILS
@@ -1,9 +1,9 @@
SPELL=st
- VERSION=0.5
+ VERSION=0.6
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE_URL[0]=http://dl.suckless.org/st/$SOURCE
-
SOURCE_HASH=sha512:fb5d3b6dfb56f35c60a83164d0da2aef67d9fc23b81fdd7c26b9a618c92524a601db5fc4149a3a5054ca3306ecc80e104fa629ecb1516c047a726012237c83d5
+
SOURCE_HASH=sha512:31e4b6d2b27d6cea79d6a31dabd7ff4e08a8ab376f06c113123810c05eab25e3964482a6429eecd65c369983cc8ee3694f367e3894ed2cc740c67738c1898d29
WEB_SITE=http://st.suckless.org/
ENTERED=20130208
LICENSE[0]=MIT
diff --git a/shell-term-fm/st/HISTORY b/shell-term-fm/st/HISTORY
index 4255bf0..3507c56 100644
--- a/shell-term-fm/st/HISTORY
+++ b/shell-term-fm/st/HISTORY
@@ -1,3 +1,8 @@
+2016-03-09 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: updated spell to 0.6
+ * patches/st-0.5-hidexcursor.diff, patches/st-0.6-hidecursor.diff:
+ Updated patch
+
2014-07-12 Ismael Luceno <ismael AT sourcemage.org>
* PRE_BUILD, patches/st-0.5-hidexcursor.diff:
Add patch to hide X cursor when typing.
diff --git a/shell-term-fm/st/patches/st-0.5-hidexcursor.diff
b/shell-term-fm/st/patches/st-0.5-hidexcursor.diff
deleted file mode 100644
index 3bbe602..0000000
--- a/shell-term-fm/st/patches/st-0.5-hidexcursor.diff
+++ /dev/null
@@ -1,96 +0,0 @@
-From d081963fc75e1656f5ee4305947384a00b9e5f39 Mon Sep 17 00:00:00 2001
-From: Colona <colona AT ycc.fr>
-Date: Mon, 9 Jun 2014 00:55:54 -0700
-Subject: [PATCH] Hide X cursor when typing.
-
-Hide the X cursor when typing in the terminal. The cursor is displayed again
-when the mouse is moved.
----
- st.c | 33 +++++++++++++++++++++++++++------
- 1 file changed, 27 insertions(+), 6 deletions(-)
-
-diff --git a/st.c b/st.c
-index 392f12d..52deb92 100644
---- a/st.c
-+++ b/st.c
-@@ -248,6 +248,8 @@ typedef struct {
- Draw draw;
- Visual *vis;
- XSetWindowAttributes attrs;
-+ Cursor cursor, bcursor; /* visible and blank cursors */
-+ bool cursorstate; /* is cursor currently visible */
- int scr;
- bool isfixed; /* is fixed geometry? */
- int fx, fy, fw, fh; /* fixed geometry */
-@@ -1112,6 +1114,13 @@ void
- bmotion(XEvent *e) {
- int oldey, oldex, oldsby, oldsey;
-
-+ if(!xw.cursorstate) {
-+ XDefineCursor(xw.dpy, xw.win, xw.cursor);
-+ xw.cursorstate = true;
-+ if(!IS_SET(MODE_MOUSEMANY))
-+ xsetpointermotion(0);
-+ }
-+
- if(IS_SET(MODE_MOUSE)) {
- mousereport(e);
- return;
-@@ -2984,10 +2993,12 @@ xzoom(const Arg *arg) {
- void
- xinit(void) {
- XGCValues gcvalues;
-- Cursor cursor;
- Window parent;
- int sw, sh;
- pid_t thispid = getpid();
-+ XColor xcwhite = {.red = 0xffff, .green = 0xffff, .blue = 0xffff};
-+ XColor xcblack = {.red = 0x0000, .green = 0x0000, .blue = 0x0000};
-+ Pixmap blankpm;
-
- if(!(xw.dpy = XOpenDisplay(NULL)))
- die("Can't open display\n");
-@@ -3071,11 +3082,13 @@ xinit(void) {
- die("XCreateIC failed. Could not obtain input method.\n");
-
- /* white cursor, black outline */
-- cursor = XCreateFontCursor(xw.dpy, XC_xterm);
-- XDefineCursor(xw.dpy, xw.win, cursor);
-- XRecolorCursor(xw.dpy, cursor,
-- &(XColor){.red = 0xffff, .green = 0xffff, .blue = 0xffff},
-- &(XColor){.red = 0x0000, .green = 0x0000, .blue = 0x0000});
-+ xw.cursor = XCreateFontCursor(xw.dpy, XC_xterm);
-+ XDefineCursor(xw.dpy, xw.win, xw.cursor);
-+ XRecolorCursor(xw.dpy, xw.cursor, &xcwhite, &xcblack);
-+ xw.cursorstate = true;
-+ blankpm = XCreateBitmapFromData(xw.dpy, xw.win, &(char){0}, 1, 1);
-+ xw.bcursor = XCreatePixmapCursor(xw.dpy, blankpm, blankpm,
-+
&xcblack, &xcblack, 0, 0);
-
- xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
- xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False);
-@@ -3537,6 +3550,8 @@ unmap(XEvent *ev) {
-
- void
- xsetpointermotion(int set) {
-+ if(!set && !xw.cursorstate)
-+ return;
- MODBIT(xw.attrs.event_mask, set, PointerMotionMask);
- XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, &xw.attrs);
- }
-@@ -3630,6 +3645,12 @@ kpress(XEvent *ev) {
- Status status;
- Shortcut *bp;
-
-+ if(xw.cursorstate) {
-+ XDefineCursor(xw.dpy, xw.win, xw.bcursor);
-+ xsetpointermotion(1);
-+ xw.cursorstate = false;
-+ }
-+
- if(IS_SET(MODE_KBDLOCK))
- return;
-
---
-2.0.0
-
diff --git a/shell-term-fm/st/patches/st-0.6-hidecursor.diff
b/shell-term-fm/st/patches/st-0.6-hidecursor.diff
new file mode 100644
index 0000000..519cc45
--- /dev/null
+++ b/shell-term-fm/st/patches/st-0.6-hidecursor.diff
@@ -0,0 +1,92 @@
+From d081963fc75e1656f5ee4305947384a00b9e5f39 Mon Sep 17 00:00:00 2001
+From: Colona <colona AT ycc.fr>
+Subject: [PATCH] Hide X cursor when typing.
+
+Hide the X cursor when typing in the terminal. The cursor is displayed again
+when the mouse is moved.
+---
+
+diff --git a/st.c b/st.c
+index b89d094..d2979ff 100644
+--- a/st.c
++++ b/st.c
+@@ -257,6 +257,11 @@ typedef struct {
+ Draw draw;
+ Visual *vis;
+ XSetWindowAttributes attrs;
++ /* Here, we use the term *pointer* to differentiate the cursor
++ * one sees when hovering the mouse over the terminal from, e.g.,
++ * a green rectangle where text would be entered. */
++ Cursor vpointer, bpointer; /* visible and hidden pointers */
++ bool pointerisvisible;
+ int scr;
+ bool isfixed; /* is fixed geometry? */
+ int l, t; /* left and top offset */
+@@ -1181,6 +1186,13 @@ void
+ bmotion(XEvent *e) {
+ int oldey, oldex, oldsby, oldsey;
+
++ if(!xw.pointerisvisible) {
++ XDefineCursor(xw.dpy, xw.win, xw.vpointer);
++ xw.pointerisvisible = true;
++ if(!IS_SET(MODE_MOUSEMANY))
++ xsetpointermotion(0);
++ }
++
+ if(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
+ mousereport(e);
+ return;
+@@ -3182,9 +3194,11 @@ xzoomreset(const Arg *arg) {
+ void
+ xinit(void) {
+ XGCValues gcvalues;
+- Cursor cursor;
+ Window parent;
+ pid_t thispid = getpid();
++ XColor xcwhite = {.red = 0xffff, .green = 0xffff, .blue = 0xffff};
++ XColor xcblack = {.red = 0x0000, .green = 0x0000, .blue = 0x0000};
++ Pixmap blankpm;
+
+ if(!(xw.dpy = XOpenDisplay(NULL)))
+ die("Can't open display\n");
+@@ -3257,11 +3271,13 @@ xinit(void) {
+ die("XCreateIC failed. Could not obtain input method.\n");
+
+ /* white cursor, black outline */
+- cursor = XCreateFontCursor(xw.dpy, XC_xterm);
+- XDefineCursor(xw.dpy, xw.win, cursor);
+- XRecolorCursor(xw.dpy, cursor,
+- &(XColor){.red = 0xffff, .green = 0xffff, .blue = 0xffff},
+- &(XColor){.red = 0x0000, .green = 0x0000, .blue = 0x0000});
++ xw.vpointer = XCreateFontCursor(xw.dpy, XC_xterm);
++ XDefineCursor(xw.dpy, xw.win, xw.vpointer);
++ XRecolorCursor(xw.dpy, xw.vpointer, &xcwhite, &xcblack);
++ xw.pointerisvisible = true;
++ blankpm = XCreateBitmapFromData(xw.dpy, xw.win, &(char){0}, 1, 1);
++ xw.bpointer = XCreatePixmapCursor(xw.dpy, blankpm, blankpm,
++ &xcblack, &xcblack, 0, 0);
+
+ xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
+ xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False);
+@@ -3725,6 +3741,8 @@ unmap(XEvent *ev) {
+
+ void
+ xsetpointermotion(int set) {
++ if(!set && !xw.pointerisvisible)
++ return;
+ MODBIT(xw.attrs.event_mask, set, PointerMotionMask);
+ XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, &xw.attrs);
+ }
+@@ -3818,6 +3836,12 @@ kpress(XEvent *ev) {
+ Status status;
+ Shortcut *bp;
+
++ if(xw.pointerisvisible) {
++ XDefineCursor(xw.dpy, xw.win, xw.bpointer);
++ xsetpointermotion(1);
++ xw.pointerisvisible = false;
++ }
++
+ if(IS_SET(MODE_KBDLOCK))
+ return;
+



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (4657bfce3098fdd052686361f84293f03d444d79), Ismael Luceno, 03/09/2016

Archive powered by MHonArc 2.6.24.

Top of Page