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 segfault on some applications due to desktop not being set up properly managereply() #179

Merged
merged 1 commit into from
Jun 20, 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: 3 additions & 5 deletions dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1783,10 +1783,12 @@ managereply(XCBWindow win, XCBCookie requests[ManageCookieLAST])
goto FAILURE;
}

/* this sets up the desktop which is quite important for some operations */
clientinittrans(c, trans);

clientinitgeom(c, wg);
clientinitwtype(c, wtypeunused);
clientinitwstate(c, stateunused);
clientinittrans(c, trans);
updatewindowprotocol(c, wmprotocolsstatus ? &wmprotocols : NULL);
getnamefromreply(netwmnamereply, &netwmname);
getnamefromreply(wmnamereply, &wmname);
Expand All @@ -1807,10 +1809,6 @@ managereply(XCBWindow win, XCBCookie requests[ManageCookieLAST])
XCBSelectInput(_wm.dpy, win, inputmask);
grabbuttons(c, 0);

if(!c->desktop)
{ c->desktop = _wm.selmon->desksel;
}

m = c->desktop->mon;

attach(c);
Expand Down