mirror of https://github.com/0intro/wmii
Removed other unused prototypes plus some other small fixes
This commit is contained in:
parent
2869e6429f
commit
8bbd3e810c
|
@ -101,8 +101,7 @@ draw_bar()
|
|||
|
||||
for(b=lbar, nb=2 ;nb; --nb && (b = rbar))
|
||||
for(; b; b=b->next) {
|
||||
b->brush.rect.x = 0;
|
||||
b->brush.rect.y = 0;
|
||||
b->brush.rect.x = b->brush.rect.y = 0;
|
||||
b->brush.rect.width = brect.height;
|
||||
if(b->text && strlen(b->text))
|
||||
b->brush.rect.width += blitz_textwidth(b->brush.font, b->text);
|
||||
|
@ -123,6 +122,7 @@ draw_bar()
|
|||
width -= tb->brush.rect.width;
|
||||
tw += tb->brush.rect.width;
|
||||
shrink = (brect.width - width) / (float)tw;
|
||||
if(tb->smaller)
|
||||
if(tb->brush.rect.width * shrink >= tb->smaller->brush.rect.width)
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
|
||||
#include "wm.h"
|
||||
|
||||
static char *Ebadcmd = "bad command",
|
||||
*Ebadvalue = "bad value";
|
||||
|
||||
#define CLIENT_MASK (StructureNotifyMask | PropertyChangeMask | EnterWindowMask)
|
||||
|
||||
static void
|
||||
|
@ -593,7 +596,6 @@ size_client(Client *c, char *arg)
|
|||
char *
|
||||
send_client(Frame *f, char *arg)
|
||||
{
|
||||
static char Ebadvalue[] = "bad value";
|
||||
Area *to, *a;
|
||||
Client *c;
|
||||
Frame *tf;
|
||||
|
@ -682,14 +684,6 @@ focus(Client *c, Bool restack)
|
|||
focus_view(v);
|
||||
}
|
||||
|
||||
Client *
|
||||
client_of_id(unsigned short id)
|
||||
{
|
||||
Client *c;
|
||||
for(c=client; c && c->id != id; c=c->next);
|
||||
return c;
|
||||
}
|
||||
|
||||
int
|
||||
idx_of_client(Client *c)
|
||||
{
|
||||
|
@ -707,11 +701,6 @@ client_of_win(Window w)
|
|||
return c;
|
||||
}
|
||||
|
||||
static int
|
||||
compare_tags(const void *a, const void *b) {
|
||||
return strcmp(*(char **)a, *(char **)b);
|
||||
}
|
||||
|
||||
void
|
||||
update_client_views(Client *c, char **tags)
|
||||
{
|
||||
|
@ -743,6 +732,11 @@ update_client_views(Client *c, char **tags)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
compare_tags(const void *a, const void *b) {
|
||||
return strcmp(*(char **)a, *(char **)b);
|
||||
}
|
||||
|
||||
void
|
||||
apply_tags(Client *c, const char *tags)
|
||||
{
|
||||
|
@ -766,6 +760,7 @@ apply_tags(Client *c, const char *tags)
|
|||
c->tags[0] = '\0';
|
||||
qsort(toks, j, sizeof(char *), compare_tags);
|
||||
|
||||
if(!j) toks[j++] = "nil";
|
||||
for(i=0, n=0; i < j; i++)
|
||||
if(!n || strcmp(toks[i], toks[n-1])) {
|
||||
if(n)
|
||||
|
@ -773,12 +768,9 @@ apply_tags(Client *c, const char *tags)
|
|||
cext_strlcat(c->tags, toks[i], sizeof(c->tags) - strlen(c->tags) - 1);
|
||||
toks[n++] = toks[i];
|
||||
}
|
||||
toks[i] = nil;
|
||||
toks[n] = nil;
|
||||
update_client_views(c, toks);
|
||||
|
||||
if(!strlen(c->tags))
|
||||
apply_tags(c, "nil");
|
||||
|
||||
XChangeProperty(blz.display, c->win, tags_atom, XA_STRING, 8,
|
||||
PropModeReplace, c->tags, strlen(c->tags));
|
||||
}
|
||||
|
@ -808,8 +800,6 @@ apply_rules(Client *c)
|
|||
char *
|
||||
message_client(Client *c, char *message)
|
||||
{
|
||||
static char Ebadcmd[] = "bad command";
|
||||
|
||||
if(!strncmp(message, "kill", 5)) {
|
||||
kill_client(c);
|
||||
return nil;
|
||||
|
|
|
@ -240,10 +240,7 @@ char * message_client(Client *c, char *message);
|
|||
void move_client(Client *c, char *arg);
|
||||
void size_client(Client *c, char *arg);
|
||||
void newcol_client(Client *c, char *arg);
|
||||
void resize_all_clients();
|
||||
Client *sel_client();
|
||||
Client *client_of_id(unsigned short id);
|
||||
int idx_of_client_id(unsigned short id);
|
||||
Client *client_of_win(Window w);
|
||||
int idx_of_client(Client *c);
|
||||
void update_client_grab(Client *c, Bool is_sel);
|
||||
|
@ -271,7 +268,6 @@ Frame *frame_of_id(Area *a, unsigned short id);
|
|||
Client *frame_of_win(Window w);
|
||||
void draw_frame(Frame *f);
|
||||
void draw_frames();
|
||||
void resize_frame(Frame *f);
|
||||
void update_frame_widget_colors(Frame *f);
|
||||
|
||||
/* fs.c */
|
||||
|
@ -319,12 +315,10 @@ void update_client_views(Client *c, char **tags);
|
|||
XRectangle *rects_of_view(View *v, unsigned int *num);
|
||||
View *view_of_id(unsigned short id);
|
||||
void select_view(const char *arg);
|
||||
void detach_from_view(View *v, Client *c);
|
||||
void attach_to_view(View *v, Frame *f);
|
||||
Client *sel_client_of_view(View *v);
|
||||
char *message_view(View *v, char *message);
|
||||
void restack_view(View *v);
|
||||
View *view_of_name(const char *name);
|
||||
unsigned char * view_index(View *v);
|
||||
void destroy_view(View *v);
|
||||
void update_views();
|
||||
|
|
Loading…
Reference in New Issue