|
i3
|
#include <ev.h>#include <fcntl.h>#include <sys/types.h>#include <sys/socket.h>#include <sys/un.h>#include <sys/time.h>#include <sys/resource.h>#include <sys/mman.h>#include <sys/stat.h>#include <libgen.h>#include "all.h"#include "shmlog.h"#include "sd-daemon.h"#include "atoms.xmacro"
Go to the source code of this file.
Macros | |
| #define | I3__FILE__ "main.c" |
| #define | xmacro(atom) xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom); |
| #define | xmacro(name) |
Functions | |
| static void | xcb_got_event (EV_P_ struct ev_io *w, int revents) |
| static void | xcb_prepare_cb (EV_P_ ev_prepare *w, int revents) |
| static void | xcb_check_cb (EV_P_ ev_check *w, int revents) |
| void | main_set_x11_cb (bool enable) |
| Enable or disable the main X11 event handling function. More... | |
| static void | i3_exit (void) |
| static void | handle_signal (int sig, siginfo_t *info, void *data) |
| int | main (int argc, char *argv[]) |
Variables | |
| struct rlimit | original_rlimit_core |
| The original value of RLIMIT_CORE when i3 was started. More... | |
| int | listen_fds |
| The number of file descriptors passed via socket activation. More... | |
| static struct ev_check * | xcb_check |
| Con * | focused |
| char ** | start_argv |
| xcb_connection_t * | conn |
| int | conn_screen |
| SnDisplay * | sndisplay |
| xcb_timestamp_t | last_timestamp = XCB_CURRENT_TIME |
| The last timestamp we got from X11 (timestamps are included in some events and are used for some things, like determining a unique ID in startup notification). More... | |
| xcb_screen_t * | root_screen |
| xcb_window_t | root |
| uint8_t | root_depth |
| xcb_visualid_t | visual_id |
| xcb_colormap_t | colormap |
| struct ev_loop * | main_loop |
| xcb_key_symbols_t * | keysyms |
| const int | default_shmlog_size = 25 * 1024 * 1024 |
| struct bindings_head * | bindings |
| struct autostarts_head | autostarts = TAILQ_HEAD_INITIALIZER(autostarts) |
| struct autostarts_always_head | autostarts_always = TAILQ_HEAD_INITIALIZER(autostarts_always) |
| struct assignments_head | assignments = TAILQ_HEAD_INITIALIZER(assignments) |
| struct ws_assignments_head | ws_assignments = TAILQ_HEAD_INITIALIZER(ws_assignments) |
| bool | xcursor_supported = true |
| #define xmacro | ( | atom | ) | xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom); |
| #define xmacro | ( | name | ) |
|
static |
|
static |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 188 of file main.c.
References __attribute__, aio_get_mod_mask_for(), autostarts, autostarts_always, barconfigs, check_error(), colormap, Autostart::command, xoutput::con, con_descend_focused(), con_focus(), config, conn, conn_screen, current_socketpath, default_shmlog_size, die, display_running_version(), DLOG, ELOG, ewmh_setup_hints(), ewmh_update_current_desktop(), ewmh_update_desktop_names(), ewmh_update_desktop_viewport(), ewmh_update_number_of_desktops(), ewmh_update_workarea(), Config::fake_outputs, fake_outputs_init(), Config::force_xinerama, FREE, get_first_output(), get_output_containing(), get_process_filename(), grab_all_keys(), handle_event(), handle_signal(), height, i3_exit(), Barconfig::i3bar_command, Barconfig::id, init_logging(), ipc_create_socket(), ipc_new_client(), ipc_recv_message(), ipc_send_message(), Config::ipc_socket_path, is_debug_build(), keysyms, listen_fds, load_configuration(), LOG, logical_px(), main_loop, manage_existing_windows(), Autostart::no_startup_id, only_check_config, original_rlimit_core, output_get_content(), parse_configuration(), pixmap, property_handlers_init(), randr_base, randr_init(), restore_connect(), root, root_atom_contents(), root_depth, ROOT_EVENT_MASK, root_screen, sasprintf(), scalloc(), scratchpad_fix_resolution(), sd_listen_fds(), SD_LISTEN_FDS_START, set_debug_logging(), set_verbosity(), setup_signal_handler(), shmlog_size, smalloc(), sndisplay, srealloc(), sstrdup(), start_application(), start_argv, TAILQ_FOREACH, translate_keysyms(), tree_init(), tree_render(), tree_restore(), visual_id, width, x_set_i3_atoms(), xcb_check, xcb_check_cb(), xcb_got_event(), XCB_NUM_LOCK, xcb_numlock_mask, xcb_prepare_cb(), xcb_set_root_cursor(), XCURSOR_CURSOR_POINTER, xcursor_load_cursors(), xcursor_set_root_cursor(), xcursor_supported, xinerama_init(), and xkb_base.
| void main_set_x11_cb | ( | bool | enable | ) |
Enable or disable the main X11 event handling function.
This is used by drag_pointer() which has its own, modal event handler, which takes precedence over the normal event handler.
Definition at line 144 of file main.c.
References DLOG, main_loop, and xcb_check.
Referenced by drag_pointer().
|
static |
Definition at line 113 of file main.c.
References conn, DLOG, event_is_ignored(), and handle_event().
Referenced by main().

|
static |
|
static |
| struct assignments_head assignments = TAILQ_HEAD_INITIALIZER(assignments) |
Definition at line 82 of file main.c.
Referenced by assignment_for(), CFGFUN(), load_configuration(), and run_assignments().
| struct autostarts_head autostarts = TAILQ_HEAD_INITIALIZER(autostarts) |
| struct autostarts_always_head autostarts_always = TAILQ_HEAD_INITIALIZER(autostarts_always) |
| struct bindings_head* bindings |
Definition at line 73 of file main.c.
Referenced by check_for_duplicate_bindings(), configure_binding(), create_workspace_on_output(), get_binding(), grab_all_keys(), load_configuration(), parse_configuration(), switch_mode(), and translate_keysyms().
| xcb_colormap_t colormap |
Definition at line 63 of file main.c.
Referenced by main(), and x_con_init().
| xcb_connection_t* conn |
Definition at line 43 of file main.c.
Referenced by cmd_exit(), cmd_reload(), con_move_to_workspace(), con_set_fullscreen_mode(), display_running_version(), drag_pointer(), DRAGGING_CB(), ewmh_setup_hints(), ewmh_update_active_window(), ewmh_update_client_list(), ewmh_update_client_list_stacking(), ewmh_update_current_desktop(), ewmh_update_desktop_names(), ewmh_update_desktop_viewport(), ewmh_update_number_of_desktops(), ewmh_update_workarea(), fake_absolute_configure_notify(), handle_button_press(), handle_configure_request(), handle_map_request(), handle_mapping_notify(), handle_screen_change(), handle_signal(), handle_unmap_notify_event(), main(), manage_existing_windows(), manage_window(), open_popups(), randr_init(), randr_query_outputs(), resize_graphical_handler(), restore_geometry(), route_click(), send_take_focus(), sig_draw_window(), startup_sequence_get(), switch_mode(), translate_keysyms(), tree_close(), update_shmlog_atom(), window_supports_protocol(), x_con_init(), x_con_kill(), x_deco_recurse(), x_draw_decoration(), x_mask_event_mask(), x_push_changes(), x_push_node(), x_push_node_unmaps(), x_set_i3_atoms(), x_window_kill(), xcb_check_cb(), xcb_drag_check_cb(), xcb_prepare_cb(), xcb_set_root_cursor(), xcursor_load_cursors(), xcursor_set_root_cursor(), and xinerama_init().
| int conn_screen |
Definition at line 45 of file main.c.
Referenced by display_running_version(), main(), property_handlers_init(), and start_application().
| const int default_shmlog_size = 25 * 1024 * 1024 |
Definition at line 70 of file main.c.
Referenced by cmd_shmlog(), and main().
| Con* focused |
Definition at line 15 of file tree.c.
Referenced by _workspace_show(), attach_to_workspace(), CFGFUN(), check_crossing_screen_boundary(), cmd_append_layout(), cmd_focus(), cmd_focus_level(), cmd_focus_window_mode(), cmd_layout(), cmd_layout_toggle(), cmd_move_con_to_workspace(), cmd_move_con_to_workspace_name(), cmd_move_con_to_workspace_number(), cmd_move_direction(), cmd_move_window_to_center(), cmd_rename_workspace(), cmd_split(), con_attach(), con_descend_direction(), con_descend_focused(), con_descend_tiling_focused(), con_detach(), con_enable_fullscreen(), con_focus(), con_fullscreen_permits_focusing(), con_inside_focused(), con_move_to_workspace(), con_next_focused(), con_set_urgency(), dump_node(), ewmh_update_current_desktop(), floating_disable(), floating_enable(), handle_button_press(), handle_enter_notify(), handle_focus_in(), handle_strut_partial_change(), init_ws_for_output(), insert_con_into(), IPC_HANDLER(), json_end_array(), manage_window(), maybe_auto_back_and_forth_workspace(), maybe_back_and_forth(), randr_query_outputs(), render_con(), route_click(), scratchpad_move(), scratchpad_show(), start_application(), tree_move(), workspace_get(), workspace_next(), workspace_next_on_output(), workspace_prev(), workspace_prev_on_output(), x_draw_decoration(), x_push_changes(), x_push_node(), and xcb_drag_check_cb().
| xcb_key_symbols_t* keysyms |
Definition at line 67 of file main.c.
Referenced by handle_event(), handle_mapping_notify(), main(), sig_handle_key_press(), and translate_keysyms().
| xcb_timestamp_t last_timestamp = XCB_CURRENT_TIME |
The last timestamp we got from X11 (timestamps are included in some events and are used for some things, like determining a unique ID in startup notification).
Definition at line 53 of file main.c.
Referenced by handle_button_press(), handle_client_message(), handle_enter_notify(), handle_event(), handle_key_press(), handle_motion_notify(), start_application(), and x_push_changes().
| int listen_fds |
The number of file descriptors passed via socket activation.
Definition at line 33 of file main.c.
Referenced by main(), and start_application().
| struct ev_loop* main_loop |
Definition at line 65 of file main.c.
Referenced by _workspace_show(), drag_pointer(), i3_exit(), main(), main_set_x11_cb(), restore_connect(), start_application(), start_nagbar(), tree_close(), and workspace_defer_update_urgent_hint_cb().
| struct rlimit original_rlimit_core |
The original value of RLIMIT_CORE when i3 was started.
We need to restore this before starting any other process, since we set RLIMIT_CORE to RLIM_INFINITY for i3 debugging versions.
Definition at line 30 of file main.c.
Referenced by main(), and start_application().
| xcb_window_t root |
Definition at line 56 of file main.c.
Referenced by create_window(), drag_pointer(), ewmh_setup_hints(), ewmh_update_active_window(), ewmh_update_client_list(), ewmh_update_client_list_stacking(), ewmh_update_current_desktop(), ewmh_update_desktop_names(), ewmh_update_desktop_viewport(), ewmh_update_number_of_desktops(), ewmh_update_workarea(), handle_button_press(), handle_screen_change(), main(), manage_window(), open_input_window(), randr_init(), randr_query_outputs(), restore_geometry(), tree_close(), ungrab_all_keys(), update_shmlog_atom(), x_con_init(), x_push_changes(), x_set_i3_atoms(), xcb_set_root_cursor(), xcb_warp_pointer_rect(), and xcursor_set_root_cursor().
| uint8_t root_depth |
Definition at line 61 of file main.c.
Referenced by configure_notify(), main(), open_placeholder_window(), open_popups(), x_con_init(), and x_push_node().
| xcb_screen_t* root_screen |
Definition at line 55 of file main.c.
Referenced by disable_randr(), get_visual_depth(), get_visualid_by_depth(), main(), x_con_init(), and xcursor_load_cursors().
| SnDisplay* sndisplay |
Definition at line 48 of file main.c.
Referenced by handle_client_message(), main(), property_handlers_init(), and start_application().
| char** start_argv |
Definition at line 41 of file main.c.
Referenced by backtrace(), exec_i3_utility(), i3_restart(), and main().
| struct ws_assignments_head ws_assignments = TAILQ_HEAD_INITIALIZER(ws_assignments) |
Definition at line 86 of file main.c.
Referenced by CFGFUN(), cmd_rename_workspace(), create_workspace_on_output(), init_ws_for_output(), workspace_get(), and workspace_move_to_output().
|
static |
Definition at line 37 of file main.c.
Referenced by main(), main_set_x11_cb(), and restore_connect().
| bool xcursor_supported = true |
Definition at line 89 of file main.c.
Referenced by create_window(), drag_pointer(), main(), start_application(), startup_monitor_event(), and xcursor_load_cursors().
1.8.9.1