mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
ime: ime_reset_pending_{preedit,commit} is not used outside ime.c
This commit is contained in:
parent
9dc4f48e7a
commit
d852178540
2 changed files with 34 additions and 36 deletions
68
ime.c
68
ime.c
|
|
@ -17,6 +17,40 @@
|
|||
#include "wayland.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
static void
|
||||
ime_reset_pending_preedit(struct seat *seat)
|
||||
{
|
||||
free(seat->ime.preedit.pending.text);
|
||||
seat->ime.preedit.pending.text = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
ime_reset_pending_commit(struct seat *seat)
|
||||
{
|
||||
free(seat->ime.commit.pending.text);
|
||||
seat->ime.commit.pending.text = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
ime_reset_pending(struct seat *seat)
|
||||
{
|
||||
ime_reset_pending_preedit(seat);
|
||||
ime_reset_pending_commit(seat);
|
||||
}
|
||||
|
||||
void
|
||||
ime_reset_preedit(struct seat *seat)
|
||||
{
|
||||
if (seat->ime.preedit.cells == NULL)
|
||||
return;
|
||||
|
||||
free(seat->ime.preedit.text);
|
||||
free(seat->ime.preedit.cells);
|
||||
seat->ime.preedit.text = NULL;
|
||||
seat->ime.preedit.cells = NULL;
|
||||
seat->ime.preedit.count = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
enter(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
|
||||
struct wl_surface *surface)
|
||||
|
|
@ -324,40 +358,6 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ime_reset_pending_preedit(struct seat *seat)
|
||||
{
|
||||
free(seat->ime.preedit.pending.text);
|
||||
seat->ime.preedit.pending.text = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
ime_reset_pending_commit(struct seat *seat)
|
||||
{
|
||||
free(seat->ime.commit.pending.text);
|
||||
seat->ime.commit.pending.text = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
ime_reset_pending(struct seat *seat)
|
||||
{
|
||||
ime_reset_pending_preedit(seat);
|
||||
ime_reset_pending_commit(seat);
|
||||
}
|
||||
|
||||
void
|
||||
ime_reset_preedit(struct seat *seat)
|
||||
{
|
||||
if (seat->ime.preedit.cells == NULL)
|
||||
return;
|
||||
|
||||
free(seat->ime.preedit.text);
|
||||
free(seat->ime.preedit.cells);
|
||||
seat->ime.preedit.text = NULL;
|
||||
seat->ime.preedit.cells = NULL;
|
||||
seat->ime.preedit.count = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
ime_send_cursor_rect(struct seat *seat)
|
||||
{
|
||||
|
|
|
|||
2
ime.h
2
ime.h
|
|
@ -15,7 +15,5 @@ void ime_enable(struct seat *seat);
|
|||
void ime_disable(struct seat *seat);
|
||||
void ime_update_cursor_rect(struct seat *seat);
|
||||
|
||||
void ime_reset_pending_preedit(struct seat *seat);
|
||||
void ime_reset_pending_commit(struct seat *seat);
|
||||
void ime_reset_pending(struct seat *seat);
|
||||
void ime_reset_preedit(struct seat *seat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue