diff --git a/client.c b/client.c index 5fbc8be58..32512026c 100644 --- a/client.c +++ b/client.c @@ -39,11 +39,11 @@ * \return client */ Client * -get_client_bywin(Client **list, Window w) +get_client_bywin(Client *list, Window w) { Client *c; - for(c = *list; c && c->win != w; c = c->next); + for(c = list; c && c->win != w; c = c->next); return c; } @@ -328,7 +328,7 @@ client_detach(Client **head, Client *c) * \param awesomeconf awesome config */ void -focus(Client * c, Bool selscreen, awesome_config *awesomeconf) +focus(Client *c, Bool selscreen, awesome_config *awesomeconf) { /* if c is NULL or invisible, take next client in the stack */ if((!c && selscreen) || (c && !isvisible(c, awesomeconf->screen, awesomeconf->tags, awesomeconf->ntags))) @@ -461,7 +461,7 @@ manage(Display *disp, Window w, XWindowAttributes *wa, awesome_config *awesomeco updatetitle(c); move_client_to_screen(c, awesomeconf, False); if((rettrans = XGetTransientForHint(disp, w, &trans) == Success) - && (t = get_client_bywin(awesomeconf->clients, trans))) + && (t = get_client_bywin(*awesomeconf->clients, trans))) for(i = 0; i < awesomeconf->ntags; i++) c->tags[i] = t->tags[i]; if(!loadprops(c, awesomeconf->ntags)) diff --git a/client.h b/client.h index 9eebbdeb2..f5689db78 100644 --- a/client.h +++ b/client.h @@ -27,7 +27,7 @@ /** Mask shorthands, used in event.c and client.c */ #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask) -Client * get_client_bywin(Client **, Window); +Client * get_client_bywin(Client *, Window); void grabbuttons(Client *, Bool, Bool, KeySym, unsigned int); inline void client_attach(Client **, Client *); inline void client_detach(Client **, Client *); diff --git a/event.c b/event.c index 36b110544..c375d49cc 100644 --- a/event.c +++ b/event.c @@ -186,7 +186,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf) return; } - if((c = get_client_bywin(awesomeconf->clients, ev->window))) + if((c = get_client_bywin(*awesomeconf->clients, ev->window))) { XAllowEvents(c->display, ReplayPointer, CurrentTime); focus(c, ev->same_screen, &awesomeconf[c->screen]); @@ -253,7 +253,7 @@ handle_event_configurerequest(XEvent * e, awesome_config *awesomeconf) XConfigureRequestEvent *ev = &e->xconfigurerequest; XWindowChanges wc; - if((c = get_client_bywin(awesomeconf->clients, ev->window))) + if((c = get_client_bywin(*awesomeconf->clients, ev->window))) { c->ismax = False; if(ev->value_mask & CWBorderWidth) @@ -338,7 +338,7 @@ handle_event_destroynotify(XEvent * e, awesome_config *awesomeconf) Client *c; XDestroyWindowEvent *ev = &e->xdestroywindow; - if((c = get_client_bywin(awesomeconf->clients, ev->window))) + if((c = get_client_bywin(*awesomeconf->clients, ev->window))) unmanage(c, WithdrawnState, &awesomeconf[c->screen]); } @@ -351,7 +351,7 @@ handle_event_enternotify(XEvent * e, awesome_config *awesomeconf) if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) return; - if((c = get_client_bywin(awesomeconf->clients, ev->window))) + if((c = get_client_bywin(*awesomeconf->clients, ev->window))) { if(!*awesomeconf->client_sel || *awesomeconf->client_sel != c) { @@ -447,7 +447,7 @@ handle_event_maprequest(XEvent * e, awesome_config *awesomeconf) return; if(wa.override_redirect) return; - if(!get_client_bywin(awesomeconf->clients, ev->window)) + if(!get_client_bywin(*awesomeconf->clients, ev->window)) { for(screen = 0; wa.screen != ScreenOfDisplay(e->xany.display, screen); screen++); if(screen == 0) @@ -472,13 +472,13 @@ handle_event_propertynotify(XEvent * e, awesome_config *awesomeconf) if(ev->state == PropertyDelete) return; /* ignore */ - if((c = get_client_bywin(awesomeconf->clients, ev->window))) + if((c = get_client_bywin(*awesomeconf->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(awesomeconf->clients, trans) != NULL))) + if(!c->isfloating && (c->isfloating = (get_client_bywin(*awesomeconf->clients, trans) != NULL))) arrange(&awesomeconf[c->screen]); break; case XA_WM_NORMAL_HINTS: @@ -500,7 +500,7 @@ handle_event_unmapnotify(XEvent * e, awesome_config *awesomeconf) Client *c; XUnmapEvent *ev = &e->xunmap; - if((c = get_client_bywin(awesomeconf->clients, ev->window)) + if((c = get_client_bywin(*awesomeconf->clients, ev->window)) && ev->event == RootWindow(e->xany.display, c->phys_screen) && (ev->send_event || !c->unmapped)) unmanage(c, WithdrawnState, &awesomeconf[c->screen]); } @@ -510,7 +510,7 @@ handle_event_shape(XEvent * e, awesome_config *awesomeconf __attribute__ ((unused))) { XShapeEvent *ev = (XShapeEvent *) e; - Client *c = get_client_bywin(awesomeconf->clients, ev->window); + Client *c = get_client_bywin(*awesomeconf->clients, ev->window); if(c) set_shape(c); diff --git a/tab.c b/tab.c index f2cb55f4a..01bed7711 100644 --- a/tab.c +++ b/tab.c @@ -76,7 +76,7 @@ uicb_tab(awesome_config *awesomeconf, RootWindow(awesomeconf->display, awesomeconf->phys_screen), &dummy, &child, &x1, &y1, &di, &di, &dui); - if((c = get_client_bywin(awesomeconf->clients, child)) + if((c = get_client_bywin(*awesomeconf->clients, child)) && c != sel && !c->isfloating) { /* take the last tabbed window */