changeset: 1885:371e88690d83
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Thu Feb 15 16:46:31 2007 -0500
summary: Renamed selcolors back to focuscolors. Fixed an early free().
diff -r b9dd0e4cae0e -r 371e88690d83 frame.c
--- a/frame.c Thu Feb 15 13:57:57 2007 -0500
+++ b/frame.c Thu Feb 15 16:46:31 2007 -0500
@@ -227,7 +227,7 @@ void
void
update_frame_widget_colors(Frame *f) {
if(sel_screen && (f->client == sel_client()))
- f->grabbox.color = f->tile.color = f->titlebar.color = def.selcolor;
+ f->grabbox.color = f->tile.color = f->titlebar.color = def.focuscolor;
else
f->grabbox.color = f->tile.color = f->titlebar.color = def.normcolor;
if(f->client->urgent)
diff -r b9dd0e4cae0e -r 371e88690d83 fs.c
--- a/fs.c Thu Feb 15 13:57:57 2007 -0500
+++ b/fs.c Thu Feb 15 16:46:31 2007 -0500
@@ -238,9 +238,12 @@ message_root(char *message)
else if(!strncmp(message, "view ", 5))
select_view(&message[5]);
else if(!strncmp(message, "selcolors ", 10)) {
+ fprintf(stderr, "wmiiwm: warning: selcolors have been removed\n");
+ return Ebadcmd;
+ }else if(!strncmp(message, "focuscolors ", 10)) {
message += 10;
n = strlen(message);
- return parse_colors(&message, (int *)&n, &def.selcolor);
+ return parse_colors(&message, (int *)&n, &def.focuscolor);
}
else if(!strncmp(message, "normcolors ", 11)) {
message += 11;
@@ -282,7 +285,7 @@ read_root_ctl() {
uint i = 0;
if(screen->sel)
i += snprintf(&buffer[i], (BUFFER_SIZE - i), "view %s\n", screen->sel->name);
- i += snprintf(&buffer[i], (BUFFER_SIZE - i), "selcolors %s\n", def.selcolor.colstr);
+ i += snprintf(&buffer[i], (BUFFER_SIZE - i), "focuscolors %s\n", def.focuscolor.colstr);
i += snprintf(&buffer[i], (BUFFER_SIZE - i), "normcolors %s\n", def.normcolor.colstr);
i += snprintf(&buffer[i], (BUFFER_SIZE - i), "font %s\n", def.font.fontstr);
i += snprintf(&buffer[i], (BUFFER_SIZE - i), "grabmod %s\n", def.grabmod);
diff -r b9dd0e4cae0e -r 371e88690d83 main.c
--- a/main.c Thu Feb 15 13:57:57 2007 -0500
+++ b/main.c Thu Feb 15 16:46:31 2007 -0500
@@ -307,8 +307,8 @@ main(int argc, char *argv[]) {
def.font.fontstr = estrdup(BLITZ_FONT);
def.border = 1;
def.colmode = Coldefault;
- strncpy(def.selcolor.colstr, BLITZ_SELCOLORS, sizeof(def.selcolor.colstr));
- loadcolor(&blz, &def.selcolor);
+ strncpy(def.focuscolor.colstr, BLITZ_FOCUSCOLORS, sizeof(def.focuscolor.colstr));
+ loadcolor(&blz, &def.focuscolor);
strncpy(def.normcolor.colstr, BLITZ_NORMCOLORS, sizeof(def.normcolor.colstr));
loadcolor(&blz, &def.normcolor);
strncpy(def.grabmod, "Mod1", sizeof(def.grabmod));
diff -r b9dd0e4cae0e -r 371e88690d83 mouse.c
--- a/mouse.c Thu Feb 15 13:57:57 2007 -0500
+++ b/mouse.c Thu Feb 15 16:46:31 2007 -0500
@@ -413,10 +413,8 @@ do_mouse_resize(Client *c, Bool grabbox,
}else
map_client(c);
- if(rects) {
+ if(rects)
free(rects);
- rects = nil;
- }
XUngrabPointer(blz.dpy, CurrentTime);
XSync(blz.dpy, False);
diff -r b9dd0e4cae0e -r 371e88690d83 rc/wmiirc
--- a/rc/wmiirc Thu Feb 15 13:57:57 2007 -0500
+++ b/rc/wmiirc Thu Feb 15 16:46:31 2007 -0500
@@ -21,7 +21,6 @@ WMII_FONT='-*-fixed-medium-r-normal-*-13
WMII_FONT='-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*'
# Colors tuples are "<text> <background> <border>"
WMII_NORMCOLORS='#222222 #eeeeee #666666'
-WMII_SELCOLORS='#444444 #bbbbbb #556088'
WMII_FOCUSCOLORS='#ffffff #335577 #447799'
WMII_BACKGROUND='#333333'
@@ -34,7 +33,6 @@ wmiir write /ctl << EOF
wmiir write /ctl << EOF
font $WMII_FONT
focuscolors $WMII_FOCUSCOLORS
-selcolors $WMII_SELCOLORS
normcolors $WMII_NORMCOLORS
grabmod $MODKEY
border 1
diff -r b9dd0e4cae0e -r 371e88690d83 view.c
--- a/view.c Thu Feb 15 13:57:57 2007 -0500
+++ b/view.c Thu Feb 15 16:46:31 2007 -0500
@@ -77,7 +77,7 @@ void
void
destroy_view(View *v) {
Area *a;
- View **i;
+ View **i, *tv;
while((a = v->area)) {
v->area = a->next;
@@ -87,13 +87,13 @@ destroy_view(View *v) {
if(*i == v) break;
*i = v->next;
write_event("DestroyTag %s\n", v->name);
+ if(v == screen->sel) {
+ for(tv=view; tv && tv->next; tv=tv->next)
+ if(tv->next == *i) break;
+ if(tv)
+ focus_view(screen, tv);
+ }
free(v);
- if(v == screen->sel) {
- for(v=view; v && v->next; v=v->next)
- if(v->next == *i) break;
- if(v)
- focus_view(screen, v);
- }
}
static void
diff -r b9dd0e4cae0e -r 371e88690d83 wmii.h
--- a/wmii.h Thu Feb 15 13:57:57 2007 -0500
+++ b/wmii.h Thu Feb 15 16:46:31 2007 -0500
@@ -27,7 +27,7 @@ typedef long long vlong;
typedef long long vlong;
#define BLITZ_FONT "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
-#define BLITZ_SELCOLORS "#ffffff #335577 #447799"
+#define BLITZ_FOCUSCOLORS "#ffffff #335577 #447799"
#define BLITZ_NORMCOLORS "#222222 #eeeeee #666666"
typedef struct Blitz Blitz;
@@ -204,7 +204,7 @@ struct Ruleset {
/* global variables */
struct {
- BlitzColor selcolor;
+ BlitzColor focuscolor;
BlitzColor normcolor;
BlitzFont font;
uint border;
diff -r b9dd0e4cae0e -r 371e88690d83 wmiir
--- a/wmiir Thu Feb 15 13:57:57 2007 -0500
+++ b/wmiir Thu Feb 15 16:46:31 2007 -0500
@@ -1,12 +1,2 @@
#!/bin/sh
-export IXP_ADDRESS="$WMII_ADDRESS"
-flag=
-if [ "$1" = -v ]; then
- flag=-v; shift
-fi
-if [ "$1" = xwrite ]; then
- file="$2"; shift 2
- echo "$@" | ixpc $flag write $file
-else
- exec ixpc $flag $@
-fi
+exec ixpc -a "$WMII_ADDRESS" $@
Received on Thu Feb 15 2007 - 22:51:37 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:21 UTC