Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed atoms being incorrectly assigned, when updating XServer Atoms #176

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2865,7 +2865,7 @@ setclientwtype(Client *c, XCBAtom atom, u8 state)
const u32 NO_BYTE_OFFSET = 0L;
const u32 REQUEST_MAX_NEEDED_ITEMS = UINT32_MAX;

XCBCookie cookie = XCBGetWindowPropertyCookie(_wm.dpy, win, netatom[NetWMState], NO_BYTE_OFFSET, REQUEST_MAX_NEEDED_ITEMS, False, XCB_ATOM_ATOM);
XCBCookie cookie = XCBGetWindowPropertyCookie(_wm.dpy, win, netatom[NetWMWindowType], NO_BYTE_OFFSET, REQUEST_MAX_NEEDED_ITEMS, False, XCB_ATOM_ATOM);
XCBWindowProperty *prop = XCBGetWindowPropertyReply(_wm.dpy, cookie);
void *data = NULL;
u32 len = 0;
Expand Down Expand Up @@ -2936,7 +2936,7 @@ setclientnetstate(Client *c, XCBAtom atom, u8 state)
const u32 NO_BYTE_OFFSET = 0L;
const u32 REQUEST_MAX_NEEDED_ITEMS = UINT32_MAX;

XCBCookie cookie = XCBGetWindowPropertyCookie(_wm.dpy, win, netatom[NetWMWindowType], NO_BYTE_OFFSET, REQUEST_MAX_NEEDED_ITEMS, False, XCB_ATOM_ATOM);
XCBCookie cookie = XCBGetWindowPropertyCookie(_wm.dpy, win, netatom[NetWMState], NO_BYTE_OFFSET, REQUEST_MAX_NEEDED_ITEMS, False, XCB_ATOM_ATOM);
XCBWindowProperty *prop = XCBGetWindowPropertyReply(_wm.dpy, cookie);
void *data = NULL;
u32 len = 0;
Expand Down Expand Up @@ -2970,7 +2970,7 @@ setclientnetstate(Client *c, XCBAtom atom, u8 state)
len = ATOM_LENGTH - 1;
}
else /* atom already exists do nothing */
{
{
free(prop);
return;
}
Expand All @@ -2995,7 +2995,7 @@ setclientnetstate(Client *c, XCBAtom atom, u8 state)
len = 1;
data = &atom;
}
XCBChangeProperty(_wm.dpy, win, netatom[NetWMWindowType], XCB_ATOM_ATOM, 32, propmode, (const char *)data, len);
XCBChangeProperty(_wm.dpy, win, netatom[NetWMState], XCB_ATOM_ATOM, 32, propmode, (const char *)data, len);
}

void
Expand Down