} text, bg, whitelines;
};
+#ifdef PIPE_OS_UNIX
static void
signal_visible_handler(int sig, siginfo_t *siginfo, void *context)
{
huds_visible = !huds_visible;
}
+#endif
static void
hud_draw_colored_prims(struct hud_context *hud, unsigned prim,
unsigned i;
const char *env = debug_get_option("GALLIUM_HUD", NULL);
unsigned signo = debug_get_num_option("GALLIUM_HUD_TOGGLE_SIGNAL", 0);
+#ifdef PIPE_OS_UNIX
static boolean sig_handled = FALSE;
struct sigaction action = {};
+#endif
huds_visible = debug_get_bool_option("GALLIUM_HUD_VISIBLE", TRUE);
if (!env || !*env)
LIST_INITHEAD(&hud->pane_list);
/* setup sig handler once for all hud contexts */
+#ifdef PIPE_OS_UNIX
if (!sig_handled && signo != 0) {
action.sa_sigaction = &signal_visible_handler;
action.sa_flags = SA_SIGINFO;
sig_handled = TRUE;
}
+#endif
hud_parse_env_var(hud, env);
return hud;