mirror of
https://github.com/0intro/wmii
synced 2025-01-24 11:02:06 +03:00
s/draw_clients/draw_frames/, eliminated some compiler warnings (signedness warnings)
This commit is contained in:
parent
fd29525e4a
commit
9eac7936bd
@ -131,7 +131,7 @@ select_area(Area *a, char *arg)
|
||||
v->sel = new;
|
||||
if(a != v->area)
|
||||
v->revert = a;
|
||||
draw_clients();
|
||||
draw_frames();
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -717,17 +717,6 @@ client_of_win(Window w)
|
||||
return c;
|
||||
}
|
||||
|
||||
void
|
||||
draw_clients()
|
||||
{
|
||||
Client *c;
|
||||
for(c=client; c; c=c->next)
|
||||
if(c->sel && (c->sel->area->view == sel)) {
|
||||
update_frame_widget_colors(c->sel);
|
||||
draw_frame(c->sel);
|
||||
}
|
||||
}
|
||||
|
||||
static Bool
|
||||
permit_tag(const char *tag)
|
||||
{
|
||||
|
@ -214,7 +214,7 @@ handle_enternotify(XEvent *e)
|
||||
}
|
||||
else if(ev->window == root) {
|
||||
sel_screen = True;
|
||||
draw_clients();
|
||||
draw_frames();
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ handle_leavenotify(XEvent *e)
|
||||
|
||||
if((ev->window == root) && !ev->same_screen) {
|
||||
sel_screen = True;
|
||||
draw_clients();
|
||||
draw_frames();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,3 +192,15 @@ draw_frame(Frame *f)
|
||||
f->titlebar->draw(f->titlebar);
|
||||
f->posbar->draw(f->posbar);
|
||||
}
|
||||
|
||||
void
|
||||
draw_frames()
|
||||
{
|
||||
Client *c;
|
||||
for(c=client; c; c=c->next)
|
||||
if(c->sel && (c->sel->area->view == sel)) {
|
||||
update_frame_widget_colors(c->sel);
|
||||
draw_frame(c->sel);
|
||||
}
|
||||
}
|
||||
|
||||
|
10
cmd/wm/fs.c
10
cmd/wm/fs.c
@ -256,7 +256,7 @@ void
|
||||
respond_event(Req *r) {
|
||||
FileId *f = r->fid->aux;
|
||||
if(f->buf) {
|
||||
r->ofcall.data = f->buf;
|
||||
r->ofcall.data = (void *)f->buf;
|
||||
r->ofcall.count = strlen(f->buf);
|
||||
respond(r, nil);
|
||||
f->buf = nil;
|
||||
@ -679,7 +679,7 @@ fs_write(Req *r) {
|
||||
i = r->ifcall.count;
|
||||
if((errstr = parse_colors((char **)&buf, (int *)&i, f->col)))
|
||||
return respond(r, errstr);
|
||||
draw_clients();
|
||||
draw_frames();
|
||||
r->ofcall.count = r->ifcall.count - i;
|
||||
return respond(r, nil);
|
||||
case FsFCctl:
|
||||
@ -703,7 +703,7 @@ fs_write(Req *r) {
|
||||
data_to_cstring(r);
|
||||
if(!r->ifcall.data || r->ifcall.count == 0)
|
||||
return respond(r, nil);
|
||||
if((errstr = message_root(r->ifcall.data)))
|
||||
if((errstr = message_root((char *)r->ifcall.data)))
|
||||
return respond(r, errstr);
|
||||
r->ofcall.count = r->ifcall.count;
|
||||
return respond(r, nil);
|
||||
@ -720,11 +720,11 @@ fs_write(Req *r) {
|
||||
/* XXX: This is too long/specific; it needs to be moved */
|
||||
{
|
||||
unsigned long mod;
|
||||
mod = mod_key_of_str(r->ifcall.data);
|
||||
mod = mod_key_of_str((char *)r->ifcall.data);
|
||||
if((mod != Mod1Mask) && (mod != Mod2Mask) && (mod != Mod3Mask)
|
||||
&& (mod != Mod4Mask) && (mod != Mod5Mask))
|
||||
return respond(r, Ebadvalue);
|
||||
cext_strlcpy(def.grabmod, r->ifcall.data, sizeof(def.grabmod));
|
||||
cext_strlcpy(def.grabmod, (char *)r->ifcall.data, sizeof(def.grabmod));
|
||||
def.mod = mod;
|
||||
if(view)
|
||||
restack_view(sel);
|
||||
|
@ -112,7 +112,7 @@ focus_view(View *v)
|
||||
if((c = sel_client()))
|
||||
focus_client(c, True);
|
||||
|
||||
draw_clients();
|
||||
draw_frames();
|
||||
XSync(dpy, False);
|
||||
XUngrabServer(dpy);
|
||||
flush_masked_events(EnterWindowMask);
|
||||
|
@ -257,7 +257,6 @@ 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 draw_clients();
|
||||
void update_client_grab(Client *c, Bool is_sel);
|
||||
void apply_rules(Client *c);
|
||||
void apply_tags(Client *c, const char *tags);
|
||||
@ -284,6 +283,7 @@ int idx_of_frame(Frame *f);
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user