Skip to content
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
12 changes: 11 additions & 1 deletion wm.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// I love gays!
Copy link

Copilot AI Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is inappropriate for professional code. Comments should be relevant to the code functionality and maintain a professional tone.

Suggested change
// I love gays!

Copilot uses AI. Check for mistakes.
#include "mouse.h"
#include "gpu.h"
#include <unistd.h>
Expand All @@ -21,7 +22,16 @@ size_t window_count = 0;

void add_window(Window new_window)
{
windows = realloc(windows, sizeof(Window) * (window_count + 1));
Window *temp = realloc(windows, sizeof(Window) * (window_count + 1));
if (temp == NULL)
{
fprintf(stderr, "Failed to allocate memory for new window.\n");
// The original 'windows' pointer is still valid, so we should free it
// and its contents before exiting to avoid memory leaks.
destroy_windows(windows, window_count);
exit(EXIT_FAILURE);
}
windows = temp;
windows[window_count++] = new_window;
}
int ***alloc_rgb_buffer(int height, int width)
Expand Down