rename focus() to client_focus()
This commit is contained in:
parent
30eba52596
commit
95d5fe299e
8
client.c
8
client.c
|
@ -169,7 +169,7 @@ client_ban(Client *c)
|
||||||
* \param screen Screen ID
|
* \param screen Screen ID
|
||||||
*/
|
*/
|
||||||
void
|
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);
|
int phys_screen = get_phys_screen(screen);
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ client_unmanage(Client *c)
|
||||||
untag_client(c, tag);
|
untag_client(c, tag);
|
||||||
|
|
||||||
if(globalconf.focus->client == c)
|
if(globalconf.focus->client == c)
|
||||||
focus(NULL, c->screen, False);
|
client_focus(NULL, c->screen, False);
|
||||||
|
|
||||||
XUngrabButton(globalconf.display, AnyButton, AnyModifier, c->win);
|
XUngrabButton(globalconf.display, AnyButton, AnyModifier, c->win);
|
||||||
window_setstate(c->win, WithdrawnState);
|
window_setstate(c->win, WithdrawnState);
|
||||||
|
@ -950,7 +950,7 @@ uicb_client_focusnext(int screen, char *arg __attribute__ ((unused)))
|
||||||
if(!c)
|
if(!c)
|
||||||
for(c = globalconf.clients; c && (c->skip || !client_isvisible(c, screen)); c = c->next);
|
for(c = globalconf.clients; c && (c->skip || !client_isvisible(c, screen)); c = c->next);
|
||||||
if(c)
|
if(c)
|
||||||
focus(c, screen, False);
|
client_focus(c, screen, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Send focus to previous client in stack
|
/** Send focus to previous client in stack
|
||||||
|
@ -964,7 +964,7 @@ uicb_client_focusprev(int screen, char *arg __attribute__ ((unused)))
|
||||||
Client *prev;
|
Client *prev;
|
||||||
|
|
||||||
if((prev = client_find_prev_visible(globalconf.focus->client)))
|
if((prev = client_find_prev_visible(globalconf.focus->client)))
|
||||||
focus(prev, screen, False);
|
client_focus(prev, screen, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Toggle floating state of a client
|
/** Toggle floating state of a client
|
||||||
|
|
2
client.h
2
client.h
|
@ -27,7 +27,7 @@
|
||||||
Bool client_isvisible(Client *, int);
|
Bool client_isvisible(Client *, int);
|
||||||
Client * get_client_bywin(Client *, Window);
|
Client * get_client_bywin(Client *, Window);
|
||||||
Client * get_client_byname(Client *, char *);
|
Client * get_client_byname(Client *, char *);
|
||||||
void focus(Client *, int, Bool);
|
void client_focus(Client *, int, Bool);
|
||||||
void client_ban(Client *);
|
void client_ban(Client *);
|
||||||
void client_unban(Client *);
|
void client_unban(Client *);
|
||||||
void client_manage(Window, XWindowAttributes *, int);
|
void client_manage(Window, XWindowAttributes *, int);
|
||||||
|
|
6
event.c
6
event.c
|
@ -117,7 +117,7 @@ handle_event_buttonpress(XEvent *e)
|
||||||
|
|
||||||
if((c = get_client_bywin(globalconf.clients, ev->window)))
|
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
|
if(CLEANMASK(ev->state) == NoSymbol
|
||||||
&& ev->button == Button1)
|
&& ev->button == Button1)
|
||||||
{
|
{
|
||||||
|
@ -230,7 +230,7 @@ handle_event_enternotify(XEvent * e)
|
||||||
{
|
{
|
||||||
window_grabbuttons(get_phys_screen(c->screen), c->win);
|
window_grabbuttons(get_phys_screen(c->screen), c->win);
|
||||||
if(globalconf.screens[c->screen].sloppy_focus)
|
if(globalconf.screens[c->screen].sloppy_focus)
|
||||||
focus(c, c->screen, True);
|
client_focus(c, c->screen, True);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for(screen = 0; screen < ScreenCount(e->xany.display); screen++)
|
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++)
|
for(screen = 0; screen < ScreenCount(e->xany.display); screen++)
|
||||||
if((ev->window == RootWindow(e->xany.display, screen)) && !ev->same_screen)
|
if((ev->window == RootWindow(e->xany.display, screen)) && !ev->same_screen)
|
||||||
focus(NULL, screen, False);
|
client_focus(NULL, screen, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
4
focus.c
4
focus.c
|
@ -120,7 +120,7 @@ uicb_focus_history(int screen, char *arg)
|
||||||
c = focus_get_latest_client_for_tags(curtags, i);
|
c = focus_get_latest_client_for_tags(curtags, i);
|
||||||
p_delete(&curtags);
|
p_delete(&curtags);
|
||||||
if(c)
|
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)))
|
if((c = get_client_byname(globalconf.clients, arg)))
|
||||||
for(tag = curtags; *tag; tag++)
|
for(tag = curtags; *tag; tag++)
|
||||||
if(is_client_tagged(c, *tag))
|
if(is_client_tagged(c, *tag))
|
||||||
focus(c, screen, False);
|
client_focus(c, screen, False);
|
||||||
p_delete(&curtags);
|
p_delete(&curtags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
layout.c
4
layout.c
|
@ -75,7 +75,7 @@ arrange(int screen)
|
||||||
c->newcomer = False;
|
c->newcomer = False;
|
||||||
client_unban(c);
|
client_unban(c);
|
||||||
if(globalconf.screens[screen].new_get_focus)
|
if(globalconf.screens[screen].new_get_focus)
|
||||||
focus(c, screen, False);
|
client_focus(c, screen, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
layout_raise_floatings(screen);
|
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
|
/* if we have a valid client that could be focused but currently no window
|
||||||
* are focused, then set the focus on this window */
|
* are focused, then set the focus on this window */
|
||||||
if((c = focus_get_current_client(screen)) && !globalconf.focus->client)
|
if((c = focus_get_current_client(screen)) && !globalconf.focus->client)
|
||||||
focus(c, screen, False);
|
client_focus(c, screen, False);
|
||||||
|
|
||||||
/* reset status */
|
/* reset status */
|
||||||
globalconf.screens[screen].need_arrange = False;
|
globalconf.screens[screen].need_arrange = False;
|
||||||
|
|
4
screen.c
4
screen.c
|
@ -353,7 +353,7 @@ uicb_screen_focus(int screen, char *arg)
|
||||||
if (new_screen > (globalconf.nscreen - 1))
|
if (new_screen > (globalconf.nscreen - 1))
|
||||||
new_screen = 0;
|
new_screen = 0;
|
||||||
|
|
||||||
focus(NULL, new_screen, False);
|
client_focus(NULL, new_screen, False);
|
||||||
|
|
||||||
move_mouse_pointer_to_screen(new_screen);
|
move_mouse_pointer_to_screen(new_screen);
|
||||||
}
|
}
|
||||||
|
@ -385,6 +385,6 @@ uicb_client_movetoscreen(int screen __attribute__ ((unused)), char *arg)
|
||||||
prev_screen = sel->screen;
|
prev_screen = sel->screen;
|
||||||
move_client_to_screen(sel, new_screen, True);
|
move_client_to_screen(sel, new_screen, True);
|
||||||
move_mouse_pointer_to_screen(new_screen);
|
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
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
|
@ -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++)
|
for(i = 0, tag = globalconf.screens[c->screen].tags; tag; tag = tag->next, i++)
|
||||||
if(is_client_tagged(c, tag))
|
if(is_client_tagged(c, tag))
|
||||||
tag_view_only_byindex(c->screen, i);
|
tag_view_only_byindex(c->screen, i);
|
||||||
focus(c, widget->statusbar->screen, False);
|
client_focus(c, widget->statusbar->screen, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue