mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-29 16:05:59 +01:00
xwayland/xwm: use initializer for props in xsurface_set_wm_state
This avoids uninitialized items and makes it clear where the magic number 2 is coming from.
This commit is contained in:
parent
13f35139d3
commit
c72efcd1ce
1 changed files with 2 additions and 5 deletions
|
@ -913,10 +913,7 @@ static void xwm_handle_configure_notify(struct wlr_xwm *xwm,
|
|||
static void xsurface_set_wm_state(struct wlr_xwayland_surface *xsurface,
|
||||
int32_t state) {
|
||||
struct wlr_xwm *xwm = xsurface->xwm;
|
||||
uint32_t property[2];
|
||||
|
||||
property[0] = state;
|
||||
property[1] = XCB_WINDOW_NONE;
|
||||
uint32_t property[] = { state, XCB_WINDOW_NONE };
|
||||
|
||||
xcb_change_property(xwm->xcb_conn,
|
||||
XCB_PROP_MODE_REPLACE,
|
||||
|
@ -924,7 +921,7 @@ static void xsurface_set_wm_state(struct wlr_xwayland_surface *xsurface,
|
|||
xwm->atoms[WM_STATE],
|
||||
xwm->atoms[WM_STATE],
|
||||
32, // format
|
||||
2, property);
|
||||
sizeof(property) / sizeof(property[0]), property);
|
||||
}
|
||||
|
||||
static void xwm_handle_map_request(struct wlr_xwm *xwm,
|
||||
|
|
Loading…
Reference in a new issue