Fix i3bar Xorg memory leak (#4140)
The `*_free_*` calls in this branch:
51b0583578/i3bar/src/xcb.c (L1854)
are never called when we remove the output from the tailq during a
refresh.
Fixes #4123
This commit is contained in:
parent
51b0583578
commit
025743eaf9
@ -45,3 +45,4 @@ working. Please reach out to us in that case!
|
||||
• set _NET_DESKTOP_VIEWPORT after randr changes
|
||||
• fix a bug with i3-nagbar not starting after it has already started once
|
||||
• fix conflict when moving parent of fullscreen window to workspace
|
||||
• fix Xorg memory leak with i3bar
|
||||
|
@ -1609,16 +1609,19 @@ void kick_tray_clients(i3_output *output) {
|
||||
*
|
||||
*/
|
||||
void destroy_window(i3_output *output) {
|
||||
if (output == NULL) {
|
||||
return;
|
||||
}
|
||||
if (output->bar.id == XCB_NONE) {
|
||||
if (output == NULL || output->bar.id == XCB_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
kick_tray_clients(output);
|
||||
draw_util_surface_free(xcb_connection, &(output->bar));
|
||||
draw_util_surface_free(xcb_connection, &(output->buffer));
|
||||
draw_util_surface_free(xcb_connection, &(output->statusline_buffer));
|
||||
xcb_destroy_window(xcb_connection, output->bar.id);
|
||||
xcb_free_pixmap(xcb_connection, output->buffer.id);
|
||||
xcb_free_pixmap(xcb_connection, output->statusline_buffer.id);
|
||||
output->bar.id = XCB_NONE;
|
||||
|
||||
kick_tray_clients(output);
|
||||
}
|
||||
|
||||
/* Strut partial tells i3 where to reserve space for i3bar. This is determined
|
||||
|
Loading…
x
Reference in New Issue
Block a user