mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
Fix pointer types of winprop_t
Foolish of me to assume the returned window property items have the same number of bits their format says they have. Apparently, format = 32 means the return items are 64 bits long (on 64-bit machines). Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
dffde065b1
commit
733d5dcf54
2 changed files with 5 additions and 5 deletions
|
@ -235,10 +235,10 @@ typedef struct {
|
||||||
typedef struct winprop {
|
typedef struct winprop {
|
||||||
union {
|
union {
|
||||||
void *ptr;
|
void *ptr;
|
||||||
uint8_t *p8;
|
char *p8;
|
||||||
int16_t *p16;
|
short *p16;
|
||||||
int32_t *p32;
|
long *p32;
|
||||||
uint32_t *c32; // 32bit cardinal
|
unsigned long *c32; // 32bit cardinal
|
||||||
};
|
};
|
||||||
unsigned long nitems;
|
unsigned long nitems;
|
||||||
Atom type;
|
Atom type;
|
||||||
|
|
|
@ -1231,7 +1231,7 @@ win_update_frame_extents(session_t *ps, win *w, Window client) {
|
||||||
4L, XCB_ATOM_CARDINAL, 32);
|
4L, XCB_ATOM_CARDINAL, 32);
|
||||||
|
|
||||||
if (prop.nitems == 4) {
|
if (prop.nitems == 4) {
|
||||||
const uint32_t * const extents = prop.c32;
|
const unsigned long * const extents = prop.c32;
|
||||||
const bool changed = w->frame_extents.left != extents[0] ||
|
const bool changed = w->frame_extents.left != extents[0] ||
|
||||||
w->frame_extents.right != extents[1] ||
|
w->frame_extents.right != extents[1] ||
|
||||||
w->frame_extents.top != extents[2] ||
|
w->frame_extents.top != extents[2] ||
|
||||||
|
|
Loading…
Reference in a new issue