From ee1214846e35f786b6681c4c4546a9723629d2d5 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 29 Jan 2008 08:21:05 +0100 Subject: [PATCH] rename some client functions --- client.c | 10 +++++----- client.h | 4 ++-- event.c | 18 +++++++++--------- ewmh.c | 4 ++-- focus.c | 2 +- mouse.c | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/client.c b/client.c index 57a074fbd..caaf5c5d6 100644 --- a/client.c +++ b/client.c @@ -85,7 +85,7 @@ client_loadprops(Client * c, int screen) * \return True if client has WM_DELETE_WINDOW */ static Bool -isprotodel(Display *disp, Window win) +client_isprotodel(Display *disp, Window win) { int i, n; Atom *protocols; @@ -107,7 +107,7 @@ isprotodel(Display *disp, Window win) * \return client */ Client * -get_client_bywin(Client *list, Window w) +client_get_bywin(Client *list, Window w) { Client *c; @@ -121,7 +121,7 @@ get_client_bywin(Client *list, Window w) * \return first matching client */ Client * -get_client_byname(Client *list, char *name) +client_get_byname(Client *list, char *name) { Client *c; @@ -345,7 +345,7 @@ client_manage(Window w, XWindowAttributes *wa, int screen) * XGetTransientForHint returns 1 on success */ if((rettrans = XGetTransientForHint(globalconf.display, w, &trans)) - && (t = get_client_bywin(globalconf.clients, trans))) + && (t = client_get_bywin(globalconf.clients, trans))) for(tag = globalconf.screens[c->screen].tags; tag; tag = tag->next) if(is_client_tagged(t, tag)) tag_client(c, tag); @@ -840,7 +840,7 @@ client_kill(Client *c) { XEvent ev; - if(isprotodel(globalconf.display, c->win)) + if(client_isprotodel(globalconf.display, c->win)) { ev.type = ClientMessage; ev.xclient.window = c->win; diff --git a/client.h b/client.h index fc0618754..898289ed0 100644 --- a/client.h +++ b/client.h @@ -25,8 +25,8 @@ #include "structs.h" Bool client_isvisible(Client *, int); -Client * get_client_bywin(Client *, Window); -Client * get_client_byname(Client *, char *); +Client * client_get_bywin(Client *, Window); +Client * client_get_byname(Client *, char *); void client_focus(Client *, int, Bool); void client_ban(Client *); void client_unban(Client *); diff --git a/event.c b/event.c index 6b3a2f8ba..d70b120c0 100644 --- a/event.c +++ b/event.c @@ -115,7 +115,7 @@ handle_event_buttonpress(XEvent *e) return; } - if((c = get_client_bywin(globalconf.clients, ev->window))) + if((c = client_get_bywin(globalconf.clients, ev->window))) { client_focus(c, c->screen, False); if(CLEANMASK(ev->state) == NoSymbol @@ -151,7 +151,7 @@ handle_event_configurerequest(XEvent * e) int old_screen; Area geometry; - if((c = get_client_bywin(globalconf.clients, ev->window))) + if((c = client_get_bywin(globalconf.clients, ev->window))) { geometry = c->geometry; @@ -212,7 +212,7 @@ handle_event_destroynotify(XEvent * e) Client *c; XDestroyWindowEvent *ev = &e->xdestroywindow; - if((c = get_client_bywin(globalconf.clients, ev->window))) + if((c = client_get_bywin(globalconf.clients, ev->window))) client_unmanage(c); } @@ -226,7 +226,7 @@ handle_event_enternotify(XEvent * e) if(ev->mode != NotifyNormal) return; - if((c = get_client_bywin(globalconf.clients, ev->window))) + if((c = client_get_bywin(globalconf.clients, ev->window))) { window_grabbuttons(get_phys_screen(c->screen), c->win); if(globalconf.screens[c->screen].sloppy_focus) @@ -325,7 +325,7 @@ handle_event_maprequest(XEvent *e) return; if(wa.override_redirect) return; - if(!get_client_bywin(globalconf.clients, ev->window)) + if(!client_get_bywin(globalconf.clients, ev->window)) { for(screen = 0; wa.screen != ScreenOfDisplay(e->xany.display, screen); screen++); if(screen == 0 && XQueryPointer(e->xany.display, RootWindow(e->xany.display, screen), @@ -344,14 +344,14 @@ handle_event_propertynotify(XEvent * e) if(ev->state == PropertyDelete) return; /* ignore */ - if((c = get_client_bywin(globalconf.clients, ev->window))) + if((c = client_get_bywin(globalconf.clients, ev->window))) { switch (ev->atom) { case XA_WM_TRANSIENT_FOR: XGetTransientForHint(e->xany.display, c->win, &trans); if(!c->isfloating - && (c->isfloating = (get_client_bywin(globalconf.clients, trans) != NULL))) + && (c->isfloating = (client_get_bywin(globalconf.clients, trans) != NULL))) globalconf.screens[c->screen].need_arrange = True; break; case XA_WM_NORMAL_HINTS: @@ -372,7 +372,7 @@ handle_event_unmapnotify(XEvent * e) Client *c; XUnmapEvent *ev = &e->xunmap; - if((c = get_client_bywin(globalconf.clients, ev->window)) + if((c = client_get_bywin(globalconf.clients, ev->window)) && ev->event == RootWindow(e->xany.display, get_phys_screen(c->screen)) && ev->send_event && window_getstate(c->win) == NormalState) client_unmanage(c); @@ -382,7 +382,7 @@ void handle_event_shape(XEvent * e) { XShapeEvent *ev = (XShapeEvent *) e; - Client *c = get_client_bywin(globalconf.clients, ev->window); + Client *c = client_get_bywin(globalconf.clients, ev->window); if(c) window_setshape(get_phys_screen(c->screen), c->win); diff --git a/ewmh.c b/ewmh.c index 70b205a6c..984a1779e 100644 --- a/ewmh.c +++ b/ewmh.c @@ -309,12 +309,12 @@ ewmh_process_client_message(XClientMessageEvent *ev) if(ev->message_type == net_close_window) { - if((c = get_client_bywin(globalconf.clients, ev->window))) + if((c = client_get_bywin(globalconf.clients, ev->window))) client_kill(c); } else if(ev->message_type == net_wm_state) { - if((c = get_client_bywin(globalconf.clients, ev->window))) + if((c = client_get_bywin(globalconf.clients, ev->window))) { ewmh_process_state_atom(c, (Atom) ev->data.l[1], ev->data.l[0]); if(ev->data.l[2]) diff --git a/focus.c b/focus.c index 94aa137ac..40a4232b6 100644 --- a/focus.c +++ b/focus.c @@ -134,7 +134,7 @@ uicb_focus_client_byname(int screen, char *arg) if(arg) { curtags = get_current_tags(screen); - if((c = get_client_byname(globalconf.clients, arg))) + if((c = client_get_byname(globalconf.clients, arg))) for(tag = curtags; *tag; tag++) if(is_client_tagged(c, *tag)) client_focus(c, screen, False); diff --git a/mouse.c b/mouse.c index 9706cec53..b7e5731b6 100644 --- a/mouse.c +++ b/mouse.c @@ -125,7 +125,7 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused))) globalconf.screens[newscreen].need_arrange = True; layout_refresh(); } - if((target = get_client_bywin(globalconf.clients, child)) + if((target = client_get_bywin(globalconf.clients, child)) && target != c) { client_list_swap(&globalconf.clients, c, target);