ewmh: change ewmh_update_client_strut() to ewmh_update_strut()
It takes window + strut as argument rather than a client. Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
47011cb324
commit
c57bef8332
2
client.c
2
client.c
|
@ -1605,7 +1605,7 @@ luaA_client_struts(lua_State *L)
|
|||
|
||||
c->strut = struts;
|
||||
|
||||
ewmh_update_client_strut(c);
|
||||
ewmh_update_strut(c->window, &c->strut);
|
||||
|
||||
hook_property(c, "struts");
|
||||
luaA_object_emit_signal(L, 1, "property::struts", 0);
|
||||
|
|
30
ewmh.c
30
ewmh.c
|
@ -474,26 +474,26 @@ ewmh_client_update_desktop(client_t *c)
|
|||
* \param c The client.
|
||||
*/
|
||||
void
|
||||
ewmh_update_client_strut(client_t *c)
|
||||
ewmh_update_strut(xcb_window_t window, strut_t *strut)
|
||||
{
|
||||
uint32_t state[] =
|
||||
const uint32_t state[] =
|
||||
{
|
||||
c->strut.left,
|
||||
c->strut.right,
|
||||
c->strut.top,
|
||||
c->strut.bottom,
|
||||
c->strut.left_start_y,
|
||||
c->strut.left_end_y,
|
||||
c->strut.right_start_y,
|
||||
c->strut.right_end_y,
|
||||
c->strut.top_start_x,
|
||||
c->strut.top_end_x,
|
||||
c->strut.bottom_start_x,
|
||||
c->strut.bottom_end_x
|
||||
strut->left,
|
||||
strut->right,
|
||||
strut->top,
|
||||
strut->bottom,
|
||||
strut->left_start_y,
|
||||
strut->left_end_y,
|
||||
strut->right_start_y,
|
||||
strut->right_end_y,
|
||||
strut->top_start_x,
|
||||
strut->top_end_x,
|
||||
strut->bottom_start_x,
|
||||
strut->bottom_end_x
|
||||
};
|
||||
|
||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||
c->window, _NET_WM_STRUT_PARTIAL, CARDINAL, 32, countof(state), state);
|
||||
window, _NET_WM_STRUT_PARTIAL, CARDINAL, 32, countof(state), state);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
3
ewmh.h
3
ewmh.h
|
@ -23,6 +23,7 @@
|
|||
#define AWESOME_EWMH_H
|
||||
|
||||
#include "structs.h"
|
||||
#include "strut.h"
|
||||
|
||||
void ewmh_init(int);
|
||||
void ewmh_update_net_client_list(int);
|
||||
|
@ -37,7 +38,7 @@ void ewmh_client_update_hints(client_t *);
|
|||
void ewmh_client_update_desktop(client_t *);
|
||||
void ewmh_update_workarea(int);
|
||||
void ewmh_process_client_strut(client_t *, xcb_get_property_reply_t *);
|
||||
void ewmh_update_client_strut(client_t *c);
|
||||
void ewmh_update_strut(xcb_window_t, strut_t *);
|
||||
xcb_get_property_cookie_t ewmh_window_icon_get_unchecked(xcb_window_t);
|
||||
int ewmh_window_icon_from_reply(xcb_get_property_reply_t *);
|
||||
int ewmh_window_icon_get_reply(xcb_get_property_cookie_t);
|
||||
|
|
Loading…
Reference in New Issue