From ccb7e8975055195d1611eac29e2e33521ea8f7d0 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 15 Oct 2007 18:23:05 +0200 Subject: [PATCH] arrange() does not need Display as arg --- client.c | 8 ++++---- event.c | 4 ++-- layout.c | 12 ++++++------ layout.h | 2 +- layouts/tile.c | 6 +++--- screen.c | 4 ++-- statusbar.c | 2 +- tab.c | 8 ++++---- tag.c | 16 ++++++++-------- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/client.c b/client.c index 5d5209c2a..4f4577802 100644 --- a/client.c +++ b/client.c @@ -441,7 +441,7 @@ manage(Display *disp, Window w, XWindowAttributes *wa, awesome_config *awesomeco attach(awesomeconf->clients, c); XMoveResizeWindow(disp, c->win, c->x, c->y, c->w, c->h); /* some windows require this */ c->isbanned = True; - arrange(disp, awesomeconf); + arrange(awesomeconf); } void @@ -573,7 +573,7 @@ unmanage(Client * c, long state, awesome_config *awesomeconf) XSetErrorHandler(xerror); XUngrabServer(c->display); if(state != NormalState) - arrange(c->display, awesomeconf); + arrange(awesomeconf); p_delete(&c->tags); p_delete(&c); } @@ -732,7 +732,7 @@ uicb_swapnext(awesome_config *awesomeconf, if(next) { client_swap(awesomeconf->clients, *awesomeconf->client_sel, next); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } } @@ -749,7 +749,7 @@ uicb_swapprev(awesome_config *awesomeconf, if(prev) { client_swap(awesomeconf->clients, prev, *awesomeconf->client_sel); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } } diff --git a/event.c b/event.c index 33c6fda2d..82f5c8262 100644 --- a/event.c +++ b/event.c @@ -328,7 +328,7 @@ handle_event_configurenotify(XEvent * e, awesome_config *awesomeconf) awesomeconf[screen].statusbar.height); updatebarpos(e->xany.display, awesomeconf[screen].statusbar); - arrange(e->xany.display, &awesomeconf[screen]); + arrange(&awesomeconf[screen]); } } @@ -476,7 +476,7 @@ handle_event_propertynotify(XEvent * e, awesome_config *awesomeconf) case XA_WM_TRANSIENT_FOR: XGetTransientForHint(e->xany.display, c->win, &trans); if(!c->isfloating && (c->isfloating = (get_client_bywin(awesomeconf->clients, trans) != NULL))) - arrange(e->xany.display, &awesomeconf[c->screen]); + arrange(&awesomeconf[c->screen]); break; case XA_WM_NORMAL_HINTS: updatesizehints(c); diff --git a/layout.c b/layout.c index 3d6273d94..2e781dbbf 100644 --- a/layout.c +++ b/layout.c @@ -34,7 +34,7 @@ * \param awesomeconf awesome config */ void -arrange(Display * disp, awesome_config *awesomeconf) +arrange(awesome_config *awesomeconf) { Client *c; @@ -47,8 +47,8 @@ arrange(Display * disp, awesome_config *awesomeconf) ban(c); } awesomeconf->current_layout->arrange(awesomeconf); - focus(disp, NULL, True, awesomeconf); - restack(disp, awesomeconf); + focus(awesomeconf->display, NULL, True, awesomeconf); + restack(awesomeconf->display, awesomeconf); } void @@ -193,7 +193,7 @@ uicb_setlayout(awesome_config * awesomeconf, c->ftview = True; if(*awesomeconf->client_sel) - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); else drawstatusbar(awesomeconf); @@ -230,7 +230,7 @@ maximize(int x, int y, int w, int h, awesome_config *awesomeconf) else (*awesomeconf->client_sel)->isfloating = False; - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } void @@ -286,7 +286,7 @@ uicb_zoom(awesome_config *awesomeconf, detach(awesomeconf->clients, *awesomeconf->client_sel); attach(awesomeconf->clients, *awesomeconf->client_sel); focus(awesomeconf->display, *awesomeconf->client_sel, True, awesomeconf); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 diff --git a/layout.h b/layout.h index 2046967dd..1f8bce151 100644 --- a/layout.h +++ b/layout.h @@ -29,7 +29,7 @@ #define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False) -void arrange(Display *, awesome_config *); /* arranges all windows depending on the layout in use */ +void arrange(awesome_config *); /* arranges all windows depending on the layout in use */ void restack(Display *, awesome_config *); /* restores z layers of all clients */ void loadawesomeprops(awesome_config *); void saveawesomeprops(awesome_config *); diff --git a/layouts/tile.c b/layouts/tile.c index 265af20f3..10fbb6772 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -39,7 +39,7 @@ uicb_setnmaster(awesome_config *awesomeconf, if((awesomeconf->nmaster = (int) compute_new_value_from_arg(arg, (double) awesomeconf->nmaster)) < 0) awesomeconf->nmaster = 0; - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } void @@ -52,7 +52,7 @@ uicb_setncol(awesome_config *awesomeconf, if((awesomeconf->ncol = (int) compute_new_value_from_arg(arg, (double) awesomeconf->ncol)) < 1) awesomeconf->ncol = 1; - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } void @@ -78,7 +78,7 @@ uicb_setmwfact(awesome_config * awesomeconf, else if(awesomeconf->mwfact > 0.9) awesomeconf->mwfact = 0.9; - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); p_delete(&newarg); } diff --git a/screen.c b/screen.c index b16ee926a..6c49e71f8 100644 --- a/screen.c +++ b/screen.c @@ -246,7 +246,7 @@ uicb_movetoscreen(awesome_config * awesomeconf, prev_screen = (*awesomeconf->client_sel)->screen; move_client_to_screen(*awesomeconf->client_sel, &awesomeconf[new_screen - awesomeconf->screen], True); move_mouse_pointer_to_screen(awesomeconf->display, new_screen); - arrange(awesomeconf->display, &awesomeconf[prev_screen - awesomeconf->screen]); - arrange(awesomeconf->display, &awesomeconf[new_screen - awesomeconf->screen]); + arrange(&awesomeconf[prev_screen - awesomeconf->screen]); + arrange(&awesomeconf[new_screen - awesomeconf->screen]); } // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 diff --git a/statusbar.c b/statusbar.c index 1a080a6f6..ff889b74a 100644 --- a/statusbar.c +++ b/statusbar.c @@ -247,7 +247,7 @@ uicb_togglebar(awesome_config *awesomeconf, else awesomeconf->statusbar.position = BarOff; updatebarpos(awesomeconf->display, awesomeconf->statusbar); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } diff --git a/tab.c b/tab.c index 929ca1054..30fe04641 100644 --- a/tab.c +++ b/tab.c @@ -85,7 +85,7 @@ uicb_tab(awesome_config *awesomeconf, c->tab.prev = tmp; c->tab.isvisible = False; - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); focus(awesomeconf->display, sel, True, awesomeconf); } } @@ -100,7 +100,7 @@ uicb_untab(awesome_config *awesomeconf, return; client_untab(sel); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); focus(awesomeconf->display, sel, True, awesomeconf); } @@ -115,7 +115,7 @@ uicb_viewnexttab(awesome_config *awesomeconf, sel->tab.isvisible = False; sel->tab.next->tab.isvisible = True; - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); focus(awesomeconf->display, sel->tab.next, True, awesomeconf); } @@ -130,7 +130,7 @@ uicb_viewprevtab(awesome_config *awesomeconf, sel->tab.isvisible = False; sel->tab.prev->tab.isvisible = True; - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); focus(awesomeconf->display, sel->tab.prev, True, awesomeconf); } diff --git a/tag.c b/tag.c index 5bec92fa7..17e7f0f84 100644 --- a/tag.c +++ b/tag.c @@ -158,7 +158,7 @@ uicb_tag(awesome_config *awesomeconf, if(i >= 0 && i < awesomeconf->ntags) (*awesomeconf->client_sel)->tags[i] = True; saveprops(*awesomeconf->client_sel, awesomeconf->ntags); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } /** Toggle floating state of a client @@ -190,7 +190,7 @@ uicb_togglefloating(awesome_config * awesomeconf, } client_untab(*awesomeconf->client_sel); saveprops(*awesomeconf->client_sel, awesomeconf->ntags); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } /** Toggle tag view @@ -212,7 +212,7 @@ uicb_toggletag(awesome_config *awesomeconf, if(j == awesomeconf->ntags) (*awesomeconf->client_sel)->tags[i] = True; saveprops(*awesomeconf->client_sel, awesomeconf->ntags); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } /** Add a tag to viewed tags @@ -232,7 +232,7 @@ uicb_toggleview(awesome_config *awesomeconf, if(j == awesomeconf->ntags) awesomeconf->tags[i].selected = True; saveawesomeprops(awesomeconf); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } /** View tag @@ -258,7 +258,7 @@ uicb_view(awesome_config *awesomeconf, awesomeconf->current_layout = awesomeconf->tags[i].layout; } saveawesomeprops(awesomeconf); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } /** View previously selected tags @@ -279,7 +279,7 @@ uicb_tag_prev_selected(awesome_config *awesomeconf, awesomeconf->tags[i].selected = awesomeconf->tags[i].was_selected; awesomeconf->tags[i].was_selected = t; } - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } /** View next tag @@ -304,7 +304,7 @@ uicb_tag_viewnext(awesome_config *awesomeconf, awesomeconf->tags[firsttag].selected = True; awesomeconf->current_layout = awesomeconf->tags[firsttag].layout; saveawesomeprops(awesomeconf); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } /** View previous tag @@ -329,6 +329,6 @@ uicb_tag_viewprev(awesome_config *awesomeconf, awesomeconf->tags[firsttag].selected = True; awesomeconf->current_layout = awesomeconf->tags[firsttag].layout; saveawesomeprops(awesomeconf); - arrange(awesomeconf->display, awesomeconf); + arrange(awesomeconf); } // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99