From 95d5fe299e27d739a06088426ae4d94dbbd75513 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 27 Jan 2008 19:07:39 +0100 Subject: [PATCH] rename focus() to client_focus() --- client.c | 8 ++++---- client.h | 2 +- event.c | 6 +++--- focus.c | 4 ++-- layout.c | 4 ++-- screen.c | 4 ++-- widgets/tasklist.c | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/client.c b/client.c index ebc5957a..1ec4b4e1 100644 --- a/client.c +++ b/client.c @@ -169,7 +169,7 @@ client_ban(Client *c) * \param screen Screen ID */ void -focus(Client *c, int screen, Bool from_mouse) +client_focus(Client *c, int screen, Bool from_mouse) { int phys_screen = get_phys_screen(screen); @@ -506,7 +506,7 @@ client_unmanage(Client *c) untag_client(c, tag); if(globalconf.focus->client == c) - focus(NULL, c->screen, False); + client_focus(NULL, c->screen, False); XUngrabButton(globalconf.display, AnyButton, AnyModifier, c->win); window_setstate(c->win, WithdrawnState); @@ -950,7 +950,7 @@ uicb_client_focusnext(int screen, char *arg __attribute__ ((unused))) if(!c) for(c = globalconf.clients; c && (c->skip || !client_isvisible(c, screen)); c = c->next); if(c) - focus(c, screen, False); + client_focus(c, screen, False); } /** Send focus to previous client in stack @@ -964,7 +964,7 @@ uicb_client_focusprev(int screen, char *arg __attribute__ ((unused))) Client *prev; if((prev = client_find_prev_visible(globalconf.focus->client))) - focus(prev, screen, False); + client_focus(prev, screen, False); } /** Toggle floating state of a client diff --git a/client.h b/client.h index 0f3222c2..fc061875 100644 --- a/client.h +++ b/client.h @@ -27,7 +27,7 @@ Bool client_isvisible(Client *, int); Client * get_client_bywin(Client *, Window); Client * get_client_byname(Client *, char *); -void focus(Client *, int, Bool); +void client_focus(Client *, int, Bool); void client_ban(Client *); void client_unban(Client *); void client_manage(Window, XWindowAttributes *, int); diff --git a/event.c b/event.c index d768d4cc..6b3a2f8b 100644 --- a/event.c +++ b/event.c @@ -117,7 +117,7 @@ handle_event_buttonpress(XEvent *e) if((c = get_client_bywin(globalconf.clients, ev->window))) { - focus(c, c->screen, False); + client_focus(c, c->screen, False); if(CLEANMASK(ev->state) == NoSymbol && ev->button == Button1) { @@ -230,7 +230,7 @@ handle_event_enternotify(XEvent * e) { window_grabbuttons(get_phys_screen(c->screen), c->win); if(globalconf.screens[c->screen].sloppy_focus) - focus(c, c->screen, True); + client_focus(c, c->screen, True); } else for(screen = 0; screen < ScreenCount(e->xany.display); screen++) @@ -297,7 +297,7 @@ handle_event_leavenotify(XEvent * e) for(screen = 0; screen < ScreenCount(e->xany.display); screen++) if((ev->window == RootWindow(e->xany.display, screen)) && !ev->same_screen) - focus(NULL, screen, False); + client_focus(NULL, screen, False); } void diff --git a/focus.c b/focus.c index 8da4dd2c..94aa137a 100644 --- a/focus.c +++ b/focus.c @@ -120,7 +120,7 @@ uicb_focus_history(int screen, char *arg) c = focus_get_latest_client_for_tags(curtags, i); p_delete(&curtags); if(c) - focus(c, screen, False); + client_focus(c, screen, False); } } } @@ -137,7 +137,7 @@ uicb_focus_client_byname(int screen, char *arg) if((c = get_client_byname(globalconf.clients, arg))) for(tag = curtags; *tag; tag++) if(is_client_tagged(c, *tag)) - focus(c, screen, False); + client_focus(c, screen, False); p_delete(&curtags); } } diff --git a/layout.c b/layout.c index 2de63aea..51355718 100644 --- a/layout.c +++ b/layout.c @@ -75,7 +75,7 @@ arrange(int screen) c->newcomer = False; client_unban(c); if(globalconf.screens[screen].new_get_focus) - focus(c, screen, False); + client_focus(c, screen, False); } layout_raise_floatings(screen); @@ -83,7 +83,7 @@ arrange(int screen) /* if we have a valid client that could be focused but currently no window * are focused, then set the focus on this window */ if((c = focus_get_current_client(screen)) && !globalconf.focus->client) - focus(c, screen, False); + client_focus(c, screen, False); /* reset status */ globalconf.screens[screen].need_arrange = False; diff --git a/screen.c b/screen.c index fc61056a..7a89cd1a 100644 --- a/screen.c +++ b/screen.c @@ -353,7 +353,7 @@ uicb_screen_focus(int screen, char *arg) if (new_screen > (globalconf.nscreen - 1)) new_screen = 0; - focus(NULL, new_screen, False); + client_focus(NULL, new_screen, False); move_mouse_pointer_to_screen(new_screen); } @@ -385,6 +385,6 @@ uicb_client_movetoscreen(int screen __attribute__ ((unused)), char *arg) prev_screen = sel->screen; move_client_to_screen(sel, new_screen, True); move_mouse_pointer_to_screen(new_screen); - focus(sel, sel->screen, False); + client_focus(sel, sel->screen, False); } // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/widgets/tasklist.c b/widgets/tasklist.c index 280965f0..aa74e321 100644 --- a/widgets/tasklist.c +++ b/widgets/tasklist.c @@ -209,7 +209,7 @@ tasklist_button_press(Widget *widget, XButtonPressedEvent *ev) for(i = 0, tag = globalconf.screens[c->screen].tags; tag; tag = tag->next, i++) if(is_client_tagged(c, tag)) tag_view_only_byindex(c->screen, i); - focus(c, widget->statusbar->screen, False); + client_focus(c, widget->statusbar->screen, False); } return;