rename some client functions

This commit is contained in:
Julien Danjou 2008-01-29 08:21:05 +01:00
parent 9c7bbad840
commit ee1214846e
6 changed files with 20 additions and 20 deletions

View File

@ -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;

View File

@ -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 *);

18
event.c
View File

@ -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);

4
ewmh.c
View File

@ -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])

View File

@ -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);

View File

@ -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);