xwindow_set_state(): Use uint32_t instead of long
This function calls xcb_change_property() with format==32 which means that it is called with a 32-bit integer. However, on 64-bit machines, sizeof(long) == 64 which means that this code did the wrong thing. This wasn't noticed before because it only causes a real difference on big-endian machines. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
470c2e20d0
commit
0c393c8f39
|
@ -34,9 +34,9 @@
|
|||
* \param state The state to set.
|
||||
*/
|
||||
void
|
||||
xwindow_set_state(xcb_window_t win, long state)
|
||||
xwindow_set_state(xcb_window_t win, uint32_t state)
|
||||
{
|
||||
long data[] = { state, XCB_NONE };
|
||||
uint32_t data[] = { state, XCB_NONE };
|
||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE, win,
|
||||
WM_STATE, WM_STATE, 32, 2, data);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "globalconf.h"
|
||||
#include "draw.h"
|
||||
|
||||
void xwindow_set_state(xcb_window_t, long);
|
||||
void xwindow_set_state(xcb_window_t, uint32_t);
|
||||
xcb_get_property_cookie_t xwindow_get_state_unchecked(xcb_window_t);
|
||||
uint32_t xwindow_get_state_reply(xcb_get_property_cookie_t);
|
||||
void xwindow_configure(xcb_window_t, area_t, int);
|
||||
|
|
Loading…
Reference in New Issue