mirror of https://github.com/davatorium/rofi.git
Issue 213: Memcpy the right size for atoms
This commit is contained in:
parent
3a781d6fb9
commit
cdd9f97072
|
@ -265,13 +265,13 @@ static client* window_client ( xcb_window_t win )
|
|||
xcb_ewmh_get_atoms_reply_t states;
|
||||
if ( xcb_ewmh_get_wm_state_reply ( &xcb->ewmh, cky, &states, NULL ) ) {
|
||||
c->states = MIN ( CLIENTSTATE, states.atoms_len );
|
||||
memcpy ( c->state, states.atoms, MIN ( CLIENTSTATE, states.atoms_len ) );
|
||||
memcpy ( c->state, states.atoms, MIN ( CLIENTSTATE, states.atoms_len )*sizeof(xcb_atom_t) );
|
||||
xcb_ewmh_get_atoms_reply_wipe ( &states );
|
||||
}
|
||||
cky = xcb_ewmh_get_wm_window_type ( &xcb->ewmh, win );
|
||||
if ( xcb_ewmh_get_wm_window_type_reply ( &xcb->ewmh, cky, &states, NULL ) ) {
|
||||
c->window_types = MIN ( CLIENTWINDOWTYPE, states.atoms_len );
|
||||
memcpy ( c->window_type, states.atoms, MIN ( CLIENTWINDOWTYPE, states.atoms_len ) );
|
||||
memcpy ( c->window_type, states.atoms, MIN ( CLIENTWINDOWTYPE, states.atoms_len )*sizeof(xcb_atom_t) );
|
||||
xcb_ewmh_get_atoms_reply_wipe ( &states );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue