Skip to Content.
Sympa Menu

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

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 (2852300ccc8dcc41c6518337ecb2751728488e45)
  • Date: Thu, 10 Nov 2016 03:32:18 +0000

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

shell-term-fm/st/DETAILS | 4
shell-term-fm/st/HISTORY | 6
shell-term-fm/st/patches/st-0.6-hidecursor.diff | 92
-----------
shell-term-fm/st/patches/st-hidecursor-20160727-308bfbf.diff | 87
++++++++++
4 files changed, 95 insertions(+), 94 deletions(-)

New commits:
commit 2852300ccc8dcc41c6518337ecb2751728488e45
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

st: Update hidecursor patch

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

st 0.7

diff --git a/shell-term-fm/st/DETAILS b/shell-term-fm/st/DETAILS
index fa12081..baeeec1 100755
--- a/shell-term-fm/st/DETAILS
+++ b/shell-term-fm/st/DETAILS
@@ -1,9 +1,9 @@
SPELL=st
- VERSION=0.6
+ VERSION=0.7
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE_URL[0]=http://dl.suckless.org/st/$SOURCE
-
SOURCE_HASH=sha512:31e4b6d2b27d6cea79d6a31dabd7ff4e08a8ab376f06c113123810c05eab25e3964482a6429eecd65c369983cc8ee3694f367e3894ed2cc740c67738c1898d29
+
SOURCE_HASH=sha512:9384820d373bfaaef1887290351d8c34abeef26cd7d50ddbae56ffb865864bcca9be798c6238bf1ce595ba7c317f2c1d97653055da0aa302e322eeee822768d4
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 3507c56..36f2029 100644
--- a/shell-term-fm/st/HISTORY
+++ b/shell-term-fm/st/HISTORY
@@ -1,3 +1,9 @@
+2016-10-19 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: updated spell to 0.7
+ * patches/st-0.6-hidecursor.diff,
+ patches/st-hidecursor-20160727-308bfbf.diff: Updated patch
+
+
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:
diff --git a/shell-term-fm/st/patches/st-0.6-hidecursor.diff
b/shell-term-fm/st/patches/st-0.6-hidecursor.diff
deleted file mode 100644
index 519cc45..0000000
--- a/shell-term-fm/st/patches/st-0.6-hidecursor.diff
+++ /dev/null
@@ -1,92 +0,0 @@
-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;
-
diff --git a/shell-term-fm/st/patches/st-hidecursor-20160727-308bfbf.diff
b/shell-term-fm/st/patches/st-hidecursor-20160727-308bfbf.diff
new file mode 100644
index 0000000..3b731aa
--- /dev/null
+++ b/shell-term-fm/st/patches/st-hidecursor-20160727-308bfbf.diff
@@ -0,0 +1,87 @@
+diff --git a/st.c b/st.c
+index 2594c65..2a031f0 100644
+--- a/st.c
++++ b/st.c
+@@ -260,6 +260,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 */
++ int pointerisvisible;
+ int scr;
+ int isfixed; /* is fixed geometry? */
+ int l, t; /* left and top offset */
+@@ -1291,6 +1296,13 @@ bmotion(XEvent *e)
+ {
+ int oldey, oldex, oldsby, oldsey;
+
++ if(!xw.pointerisvisible) {
++ XDefineCursor(xw.dpy, xw.win, xw.vpointer);
++ xw.pointerisvisible = 1;
++ if(!IS_SET(MODE_MOUSEMANY))
++ xsetpointermotion(0);
++ }
++
+ if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
+ mousereport(e);
+ return;
+@@ -3435,10 +3447,10 @@ void
+ xinit(void)
+ {
+ XGCValues gcvalues;
+- Cursor cursor;
+ Window parent;
+ pid_t thispid = getpid();
+ XColor xmousefg, xmousebg;
++ Pixmap blankpm;
+
+ if (!(xw.dpy = XOpenDisplay(NULL)))
+ die("Can't open display\n");
+@@ -3511,8 +3523,9 @@ xinit(void)
+ die("XCreateIC failed. Could not obtain input method.\n");
+
+ /* white cursor, black outline */
+- cursor = XCreateFontCursor(xw.dpy, mouseshape);
+- XDefineCursor(xw.dpy, xw.win, cursor);
++ xw.pointerisvisible = 1;
++ xw.vpointer = XCreateFontCursor(xw.dpy, mouseshape);
++ XDefineCursor(xw.dpy, xw.win, xw.vpointer);
+
+ if (XParseColor(xw.dpy, xw.cmap, colorname[mousefg], &xmousefg) == 0)
{
+ xmousefg.red = 0xffff;
+@@ -3526,7 +3539,10 @@ xinit(void)
+ xmousebg.blue = 0x0000;
+ }
+
+- XRecolorCursor(xw.dpy, cursor, &xmousefg, &xmousebg);
++ XRecolorCursor(xw.dpy, xw.vpointer, &xmousefg, &xmousebg);
++ blankpm = XCreateBitmapFromData(xw.dpy, xw.win, &(char){0}, 1, 1);
++ xw.bpointer = XCreatePixmapCursor(xw.dpy, blankpm, blankpm,
++ &xmousefg, &xmousebg, 0, 0);
+
+ xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
+ xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False);
+@@ -4026,6 +4042,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);
+ }
+@@ -4125,6 +4143,12 @@ kpress(XEvent *ev)
+ Status status;
+ Shortcut *bp;
+
++ if(xw.pointerisvisible) {
++ XDefineCursor(xw.dpy, xw.win, xw.bpointer);
++ xsetpointermotion(1);
++ xw.pointerisvisible = 0;
++ }
++
+ if (IS_SET(MODE_KBDLOCK))
+ return;



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (2852300ccc8dcc41c6518337ecb2751728488e45), Ismael Luceno, 11/09/2016

Archive powered by MHonArc 2.6.24.

Top of Page