i3
sighandler.c File Reference
#include "all.h"
#include <signal.h>
#include <sys/wait.h>
#include <unistd.h>
Include dependency graph for sighandler.c:

Go to the source code of this file.

Data Structures

struct  dialog_t
 

Typedefs

typedef struct dialog_t dialog_t
 

Functions

static TAILQ_HEAD (dialogs_head, dialog_t)
 
static void sighandler_setup (void)
 
static void sighandler_create_dialogs (void)
 
static void sighandler_destroy_dialogs (void)
 
static void sighandler_handle_expose (void)
 
static void sighandler_draw_dialog (dialog_t *dialog)
 
static void sighandler_handle_key_press (xcb_key_press_event_t *event)
 
static void handle_signal (int sig, siginfo_t *info, void *data)
 
void setup_signal_handler (void)
 Configured a signal handler to gracefully handle crashes and allow the user to generate a backtrace and rescue their session.
 

Typedef Documentation

◆ dialog_t

typedef struct dialog_t dialog_t

Function Documentation

◆ handle_signal()

static void handle_signal ( int sig,
siginfo_t * info,
void * data )
static

Definition at line 296 of file sighandler.c.

References conn, DLOG, sighandler_create_dialogs(), sighandler_handle_expose(), sighandler_handle_key_press(), and sighandler_setup().

Referenced by setup_signal_handler().

Here is the call graph for this function:

◆ setup_signal_handler()

void setup_signal_handler ( void )

Configured a signal handler to gracefully handle crashes and allow the user to generate a backtrace and rescue their session.

Definition at line 335 of file sighandler.c.

References ELOG, and handle_signal().

Referenced by main().

Here is the call graph for this function:

◆ sighandler_create_dialogs()

◆ sighandler_destroy_dialogs()

static void sighandler_destroy_dialogs ( void )
static

Definition at line 210 of file sighandler.c.

References dialog_t::colormap, conn, draw_util_surface_free(), dialog_t::id, dialog_t::surface, TAILQ_EMPTY, TAILQ_FIRST, and TAILQ_REMOVE.

Referenced by sighandler_handle_key_press().

Here is the call graph for this function:

◆ sighandler_draw_dialog()

static void sighandler_draw_dialog ( dialog_t * dialog)
static

◆ sighandler_handle_expose()

static void sighandler_handle_expose ( void )
static

Definition at line 225 of file sighandler.c.

References conn, sighandler_draw_dialog(), and TAILQ_FOREACH.

Referenced by handle_signal(), sighandler_create_dialogs(), and sighandler_handle_key_press().

Here is the call graph for this function:

◆ sighandler_handle_key_press()

static void sighandler_handle_key_press ( xcb_key_press_event_t * event)
static

Definition at line 270 of file sighandler.c.

References DLOG, i3_restart(), keysyms, sighandler_destroy_dialogs(), sighandler_handle_expose(), and state.

Referenced by handle_signal().

Here is the call graph for this function:

◆ sighandler_setup()

static void sighandler_setup ( void )
static

Definition at line 133 of file sighandler.c.

References config, Config::font, Font::height, i3string_from_utf8(), logical_px(), and predict_text_width().

Referenced by handle_signal().

Here is the call graph for this function:

◆ TAILQ_HEAD()

static TAILQ_HEAD ( dialogs_head ,
dialog_t  )
static

Definition at line 22 of file sighandler.c.