[hackers] [st] cursor is hid when unfocused. || Aurélien Aptel

From: <hg_AT_suckless.org>
Date: Mon, 30 Aug 2010 13:28:42 +0000 (UTC)

changeset: 112:495e992cf5ae
tag: tip
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Mon Aug 30 15:28:29 2010 +0200
files: config.h st.c
description:
cursor is hid when unfocused.

diff -r a17b1629b1b2 -r 495e992cf5ae config.h
--- a/config.h Mon Aug 30 13:04:19 2010 +0200
+++ b/config.h Mon Aug 30 15:28:29 2010 +0200
@@ -1,7 +1,7 @@
 #define TAB 8
 #define TNAME "st-256color"
 #define FONT "6x13"
-#define BOLDFONT FONT"bold"
+#define BOLDFONT "6x13bold"
 #define BORDER 2
 
 /* Terminal colors */
diff -r a17b1629b1b2 -r 495e992cf5ae st.c
--- a/st.c Mon Aug 30 13:04:19 2010 +0200
+++ b/st.c Mon Aug 30 15:28:29 2010 +0200
@@ -1129,7 +1129,7 @@
                 xclear(oldx, oldy, oldx, oldy);
         
         /* draw the new one */
- if(!(term.c.state & CURSOR_HIDE)) {
+ if(!(term.c.state & CURSOR_HIDE) && xw.hasfocus) {
                 xdraws(&g.c, g, term.c.x, term.c.y, 1);
                 oldx = term.c.x, oldy = term.c.y;
         }
@@ -1216,6 +1216,7 @@
 focus(XEvent *ev) {
         if((xw.hasfocus = ev->type == FocusIn))
                 xseturgency(0);
+ draw(SCREEN_UPDATE);
 }
 
 char*
Received on Mon Aug 30 2010 - 15:28:42 CEST

This archive was generated by hypermail 2.2.0 : Mon Aug 30 2010 - 15:36:04 CEST