fix a rare segfault

This commit is contained in:
vaxerski 2021-12-21 19:30:54 +01:00
parent ce85980675
commit 5ce8b37382
2 changed files with 7 additions and 0 deletions

View file

@ -86,12 +86,16 @@ void removeAtom(const int& window, xcb_atom_t prop, xcb_atom_t atom) {
if (!REPLY || xcb_get_property_value_length(REPLY) == 0) { if (!REPLY || xcb_get_property_value_length(REPLY) == 0) {
free(REPLY); free(REPLY);
xcb_ungrab_server(DisplayConnection); xcb_ungrab_server(DisplayConnection);
return;
} }
xcb_atom_t* atomsList = (xcb_atom_t*)xcb_get_property_value(REPLY); xcb_atom_t* atomsList = (xcb_atom_t*)xcb_get_property_value(REPLY);
if (!atomsList) { if (!atomsList) {
free(REPLY); free(REPLY);
xcb_ungrab_server(DisplayConnection); xcb_ungrab_server(DisplayConnection);
return;
} }
int valuesnum = 0; int valuesnum = 0;

View file

@ -1770,6 +1770,9 @@ void CWindowManager::moveWindowToMapped(int64_t id) {
} }
windows[windows.size() - 1].setUnderFullscreen(false); windows[windows.size() - 1].setUnderFullscreen(false);
windows[windows.size() - 1].setDirty(true);
windows[windows.size() - 1].setLastUpdatePosition(Vector2D(0,0));
windows[windows.size() - 1].setLastUpdateSize(Vector2D(0,0));
return; return;
} }