<commit_before>#include <stdlib.h>

#include "util.h"
#include "wayland.h"
#include "wm.h"

void
new_screen(struct swc_screen *swc)
{
	struct screen *screen = malloc(sizeof(struct screen));
	if (!screen)
		die("Failed to allocate screen");

	screen->swc = swc;
	wl_list_init(&screen->windows);
	swc_screen_set_handler(swc, &screen_handler, screen);
}

void
screen_usable_geometry_changed(void *data)
{
	struct screen *screen = data;

	if (screen) {} /* FIXME shut up the compiler */
	/*
	 * TODO
	 * - perhaps rearrange windows
	 */
}

void
screen_entered(void *data)
{
	struct screen *screen = data;

	wm.active_screen = screen;
}

void
screen_add_window(struct screen *screen, struct window *window)
{
	window->screen = screen;
	wl_list_insert(&screen->windows, &window->link);
	++screen->num_windows;
	swc_window_show(window->swc);
}
<commit_msg>add some explicit initializations to new_screen()<commit_after>#include <stdlib.h>

#include "util.h"
#include "wayland.h"
#include "wm.h"

void
new_screen(struct swc_screen *swc)
{
	struct screen *screen = malloc(sizeof(struct screen));
	if (!screen)
		die("Failed to allocate screen");

	screen->swc = swc;
	screen->num_windows = 0;
	wl_list_init(&screen->windows);
	swc_screen_set_handler(swc, &screen_handler, screen);
	wm.active_screen = screen;
}

void
screen_usable_geometry_changed(void *data)
{
	struct screen *screen = data;

	if (screen) {} /* FIXME shut up the compiler */
	/*
	 * TODO
	 * - perhaps rearrange windows
	 */
}

void
screen_entered(void *data)
{
	struct screen *screen = data;

	wm.active_screen = screen;
}

void
screen_add_window(struct screen *screen, struct window *window)
{
	window->screen = screen;
	wl_list_insert(&screen->windows, &window->link);
	++screen->num_windows;
	swc_window_show(window->swc);
}

{'fraction_non_alphanumeric': 0.13926174496644295, 'fraction_numerical': 0.0005592841163310962, 'mean_word_length': 5.126712328767123, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2167609', 'n_tokens_mistral': 655, 'n_tokens_neox': 631, 'n_words': 147}