window: rename functions according to the rest of code

This commit is contained in:
Arnaud Fontaine 2008-08-13 19:06:20 +02:00
parent 73c4415a0a
commit cc367647e7
6 changed files with 18 additions and 18 deletions

View File

@ -216,9 +216,9 @@ client_ban(client_t *c)
client_unfocus(c); client_unfocus(c);
xcb_unmap_window(globalconf.connection, c->win); xcb_unmap_window(globalconf.connection, c->win);
if(c->ishidden) if(c->ishidden)
window_setstate(c->win, XCB_WM_ICONIC_STATE); window_state_set(c->win, XCB_WM_ICONIC_STATE);
else else
window_setstate(c->win, XCB_WM_WITHDRAWN_STATE); window_state_set(c->win, XCB_WM_WITHDRAWN_STATE);
if(c->titlebar && c->titlebar->position && c->titlebar->sw) if(c->titlebar && c->titlebar->position && c->titlebar->sw)
xcb_unmap_window(globalconf.connection, c->titlebar->sw->window); xcb_unmap_window(globalconf.connection, c->titlebar->sw->window);
} }
@ -664,7 +664,7 @@ void
client_unban(client_t *c) client_unban(client_t *c)
{ {
xcb_map_window(globalconf.connection, c->win); xcb_map_window(globalconf.connection, c->win);
window_setstate(c->win, XCB_WM_NORMAL_STATE); window_state_set(c->win, XCB_WM_NORMAL_STATE);
if(c->titlebar && c->titlebar->sw && c->titlebar->position) if(c->titlebar && c->titlebar->sw && c->titlebar->position)
xcb_map_window(globalconf.connection, c->titlebar->sw->window); xcb_map_window(globalconf.connection, c->titlebar->sw->window);
} }
@ -693,7 +693,7 @@ client_unmanage(client_t *c)
xcb_ungrab_button(globalconf.connection, XCB_BUTTON_INDEX_ANY, c->win, xcb_ungrab_button(globalconf.connection, XCB_BUTTON_INDEX_ANY, c->win,
XUTIL_ANY_MODIFIER); XUTIL_ANY_MODIFIER);
window_setstate(c->win, XCB_WM_WITHDRAWN_STATE); window_state_set(c->win, XCB_WM_WITHDRAWN_STATE);
xcb_aux_sync(globalconf.connection); xcb_aux_sync(globalconf.connection);
xcb_ungrab_server(globalconf.connection); xcb_ungrab_server(globalconf.connection);
@ -1157,7 +1157,7 @@ luaA_client_newindex(lua_State *L)
case A_TK_OPACITY: case A_TK_OPACITY:
d = luaL_checknumber(L, 3); d = luaL_checknumber(L, 3);
if(d == -1 || (d >= 0 && d <= 1)) if(d == -1 || (d >= 0 && d <= 1))
window_settrans((*c)->win, d); window_trans_set((*c)->win, d);
break; break;
case A_TK_FLOATING: case A_TK_FLOATING:
client_setfloating(*c, luaA_checkboolean(L, 3)); client_setfloating(*c, luaA_checkboolean(L, 3));

View File

@ -337,7 +337,7 @@ event_handle_enternotify(void *data __attribute__ ((unused)),
if((c = client_getbytitlebarwin(ev->event)) if((c = client_getbytitlebarwin(ev->event))
|| (c = client_getbywin(ev->event))) || (c = client_getbywin(ev->event)))
{ {
window_grabbuttons(c->win, ev->root, c->buttons); window_buttons_grab(c->win, ev->root, c->buttons);
/* The idea behind saving pointer_x and pointer_y is Bob Marley powered. /* The idea behind saving pointer_x and pointer_y is Bob Marley powered.
* this will allow us top drop some EnterNotify events and thus not giving * this will allow us top drop some EnterNotify events and thus not giving
* focus to windows appering under the cursor without a cursor move */ * focus to windows appering under the cursor without a cursor move */
@ -352,7 +352,7 @@ event_handle_enternotify(void *data __attribute__ ((unused)),
xutil_screen_get(connection, emwin->phys_screen)->root, xutil_screen_get(connection, emwin->phys_screen)->root,
XUTIL_ANY_MODIFIER); XUTIL_ANY_MODIFIER);
else else
window_root_grabbuttons(ev->root); window_root_buttons_grab(ev->root);
return 0; return 0;
} }

View File

@ -58,9 +58,9 @@ arrange(int screen)
if((qp_r = xcb_query_pointer_reply(globalconf.connection, qp_c, NULL))) if((qp_r = xcb_query_pointer_reply(globalconf.connection, qp_c, NULL)))
{ {
if(qp_r->child == XCB_NONE || qp_r->root == qp_r->child) if(qp_r->child == XCB_NONE || qp_r->root == qp_r->child)
window_root_grabbuttons(qp_r->root); window_root_buttons_grab(qp_r->root);
else if ((c = client_getbywin(qp_r->child))) else if ((c = client_getbywin(qp_r->child)))
window_grabbuttons(c->win, qp_r->root, c->buttons); window_buttons_grab(c->win, qp_r->root, c->buttons);
globalconf.pointer_x = qp_r->root_x; globalconf.pointer_x = qp_r->root_x;
globalconf.pointer_y = qp_r->root_y; globalconf.pointer_y = qp_r->root_y;

View File

@ -109,7 +109,7 @@ systray_request_handle(xcb_window_t embed_win, int phys_screen, xembed_info_t *i
xcb_change_window_attributes(globalconf.connection, embed_win, XCB_CW_EVENT_MASK, xcb_change_window_attributes(globalconf.connection, embed_win, XCB_CW_EVENT_MASK,
select_input_val); select_input_val);
window_setstate(embed_win, XCB_WM_WITHDRAWN_STATE); window_state_set(embed_win, XCB_WM_WITHDRAWN_STATE);
em = p_new(xembed_window_t, 1); em = p_new(xembed_window_t, 1);
em->win = embed_win; em->win = embed_win;

View File

@ -35,7 +35,7 @@ extern awesome_t globalconf;
* \param state The state to set. * \param state The state to set.
*/ */
void void
window_setstate(xcb_window_t win, long state) window_state_set(xcb_window_t win, long state)
{ {
long data[] = { state, XCB_NONE }; long data[] = { state, XCB_NONE };
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE, win, xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE, win,
@ -105,7 +105,7 @@ window_configure(xcb_window_t win, area_t geometry, int border)
* \param buttons The buttons to grab. * \param buttons The buttons to grab.
*/ */
void void
window_grabbuttons(xcb_window_t win, xcb_window_t root, button_t *buttons) window_buttons_grab(xcb_window_t win, xcb_window_t root, button_t *buttons)
{ {
button_t *b; button_t *b;
@ -132,7 +132,7 @@ window_grabbuttons(xcb_window_t win, xcb_window_t root, button_t *buttons)
* \param root The root window. * \param root The root window.
*/ */
void void
window_root_grabbuttons(xcb_window_t root) window_root_buttons_grab(xcb_window_t root)
{ {
button_t *b; button_t *b;
@ -158,7 +158,7 @@ window_root_grabbuttons(xcb_window_t root)
* \param opacity Opacity of the window, between 0 and 1. * \param opacity Opacity of the window, between 0 and 1.
*/ */
void void
window_settrans(xcb_window_t win, double opacity) window_trans_set(xcb_window_t win, double opacity)
{ {
unsigned int real_opacity = 0xffffffff; unsigned int real_opacity = 0xffffffff;

View File

@ -24,13 +24,13 @@
#include "structs.h" #include "structs.h"
void window_setstate(xcb_window_t, long); void window_state_set(xcb_window_t, long);
xcb_get_property_cookie_t window_state_get_unchecked(xcb_window_t); xcb_get_property_cookie_t window_state_get_unchecked(xcb_window_t);
long window_state_get_reply(xcb_get_property_cookie_t); long window_state_get_reply(xcb_get_property_cookie_t);
void window_configure(xcb_window_t, area_t, int); void window_configure(xcb_window_t, area_t, int);
void window_grabbuttons(xcb_window_t, xcb_window_t, button_t *); void window_buttons_grab(xcb_window_t, xcb_window_t, button_t *);
void window_root_grabbuttons(xcb_window_t); void window_root_buttons_grab(xcb_window_t);
void window_settrans(xcb_window_t, double); void window_trans_set(xcb_window_t, double);
#endif #endif
// 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