mirror of https://github.com/0intro/wmii
Renamed selcolors back to focuscolors. Fixed an early free().
This commit is contained in:
parent
ea55c5d3f7
commit
d8e827bc21
2
frame.c
2
frame.c
|
@ -227,7 +227,7 @@ frame_delta_h() {
|
|||
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)
|
||||
|
|
7
fs.c
7
fs.c
|
@ -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);
|
||||
|
|
4
main.c
4
main.c
|
@ -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));
|
||||
|
|
4
mouse.c
4
mouse.c
|
@ -413,10 +413,8 @@ do_mouse_resize(Client *c, Bool grabbox, BlitzAlign align) {
|
|||
}else
|
||||
map_client(c);
|
||||
|
||||
if(rects) {
|
||||
if(rects)
|
||||
free(rects);
|
||||
rects = nil;
|
||||
}
|
||||
|
||||
XUngrabPointer(blz.dpy, CurrentTime);
|
||||
XSync(blz.dpy, False);
|
||||
|
|
|
@ -21,7 +21,6 @@ RIGHT=l
|
|||
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 @@ export DMENU WMII_FONT WMII_FOCUSCOLORS WMII_SELCOLORS WMII_NORMCOLORS WMII_TERM
|
|||
wmiir write /ctl << EOF
|
||||
font $WMII_FONT
|
||||
focuscolors $WMII_FOCUSCOLORS
|
||||
selcolors $WMII_SELCOLORS
|
||||
normcolors $WMII_NORMCOLORS
|
||||
grabmod $MODKEY
|
||||
border 1
|
||||
|
|
12
view.c
12
view.c
|
@ -77,7 +77,7 @@ create_view(const char *name) {
|
|||
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);
|
||||
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);
|
||||
for(tv=view; tv && tv->next; tv=tv->next)
|
||||
if(tv->next == *i) break;
|
||||
if(tv)
|
||||
focus_view(screen, tv);
|
||||
}
|
||||
free(v);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
4
wmii.h
4
wmii.h
|
@ -27,7 +27,7 @@ typedef unsigned long long uvlong;
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue