diff options
| author | Craig Barnes <craigbarnes@protonmail.com> | 2021-01-16 20:16:00 +0000 |
|---|---|---|
| committer | Craig Barnes <craigbarnes@protonmail.com> | 2021-01-16 20:16:00 +0000 |
| commit | e56136ce1192d04a52b01ccb41284f0b7896430e (patch) | |
| tree | 10948eb4aface28e80d6a075fecf11fad3075618 /ime.c | |
| parent | Print stack trace on assert() failure or when calling fatal_error() (diff) | |
debug: rename assert() to xassert(), to avoid clashing with <assert.h>
Diffstat (limited to 'ime.c')
| -rw-r--r-- | ime.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -27,8 +27,8 @@ enter(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, /* The main grid is the *only* input-receiving surface we have */ /* TODO: can we receive text_input::enter() _before_ keyboard_enter()? */ struct terminal UNUSED *term = seat->kbd_focus; - assert(term != NULL); - assert(term_surface_kind(term, surface) == TERM_SURF_GRID); + xassert(term != NULL); + xassert(term_surface_kind(term, surface) == TERM_SURF_GRID); ime_enable(seat); } @@ -111,7 +111,7 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, return; } - assert(seat->kbd_focus); + xassert(seat->kbd_focus); struct terminal *term = seat->kbd_focus; /* 1. Delete existing pre-edit text */ @@ -272,11 +272,11 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, LOG_DBG("pre-edit cursor: begin=%d, end=%d", cell_begin, cell_end); - assert(cell_begin >= 0); - assert(cell_begin < cell_count); - assert(cell_begin <= cell_end); - assert(cell_end >= 0); - assert(cell_end <= cell_count); + xassert(cell_begin >= 0); + xassert(cell_begin < cell_count); + xassert(cell_begin <= cell_end); + xassert(cell_end >= 0); + xassert(cell_end <= cell_count); term->ime.preedit.cursor.hidden = false; term->ime.preedit.cursor.start = cell_begin; @@ -331,7 +331,7 @@ ime_enable(struct seat *seat) return; struct terminal *term = seat->kbd_focus; - assert(term != NULL); + xassert(term != NULL); if (!term->ime.enabled) return; |
