decompose wl_backend.c: extract wl_text_input.c
This commit is contained in:
parent
84a2be36c3
commit
52182fcbec
|
|
@ -190,6 +190,7 @@ wmaker_SOURCES += \
|
||||||
backend/wayland/wl_grab.c \
|
backend/wayland/wl_grab.c \
|
||||||
backend/wayland/wl_keyboard.c \
|
backend/wayland/wl_keyboard.c \
|
||||||
backend/wayland/wl_popup.c \
|
backend/wayland/wl_popup.c \
|
||||||
|
backend/wayland/wl_text_input.c \
|
||||||
backend/wayland/wl_output_mgmt.c \
|
backend/wayland/wl_output_mgmt.c \
|
||||||
backend/wayland/wl_output.c \
|
backend/wayland/wl_output.c \
|
||||||
backend/wayland/wl_xdg.c \
|
backend/wayland/wl_xdg.c \
|
||||||
|
|
|
||||||
|
|
@ -331,9 +331,9 @@ extern void handle_output_mgr_apply(struct wl_listener *listener, void *data);
|
||||||
extern void handle_output_mgr_test(struct wl_listener *listener, void *data);
|
extern void handle_output_mgr_test(struct wl_listener *listener, void *data);
|
||||||
extern void handle_output_power_set_mode(struct wl_listener *listener, void *data);
|
extern void handle_output_power_set_mode(struct wl_listener *listener, void *data);
|
||||||
/* Phase 34: text input, input method, virtual keyboard new-instance handlers. */
|
/* Phase 34: text input, input method, virtual keyboard new-instance handlers. */
|
||||||
static void handle_text_input_new(struct wl_listener *listener, void *data);
|
extern void handle_text_input_new(struct wl_listener *listener, void *data);
|
||||||
static void handle_input_method_new(struct wl_listener *listener, void *data);
|
extern void handle_input_method_new(struct wl_listener *listener, void *data);
|
||||||
static void handle_virtual_keyboard_new(struct wl_listener *listener, void *data);
|
extern void handle_virtual_keyboard_new(struct wl_listener *listener, void *data);
|
||||||
/* Phase 35: xdg_activation request_activate handler. */
|
/* Phase 35: xdg_activation request_activate handler. */
|
||||||
static void handle_xdg_activation_request(struct wl_listener *listener, void *data);
|
static void handle_xdg_activation_request(struct wl_listener *listener, void *data);
|
||||||
/* Phase 36: layer shell new_surface handler. */
|
/* Phase 36: layer shell new_surface handler. */
|
||||||
|
|
@ -1703,47 +1703,6 @@ handle_new_shortcuts_inhibitor(struct wl_listener *listener, void *data)
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
/* Phase 34: text input v3, input method v2, virtual keyboard v1 */
|
|
||||||
/* ------------------------------------------------------------------ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* handle_text_input_new — a client created a zwp_text_input_v3 object.
|
|
||||||
* Text input objects are managed entirely by wlroots; the compositor just
|
|
||||||
* needs to call wlr_text_input_v3_send_enter/leave to activate the IME
|
|
||||||
* for a focused surface. For now we log and do nothing — the IME framework
|
|
||||||
* will still register; full integration (enter on focus) can be added later.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
handle_text_input_new(struct wl_listener *listener, void *data)
|
|
||||||
{
|
|
||||||
(void)listener; (void)data;
|
|
||||||
wwarning("wl_backend: text input v3 object created");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* handle_input_method_new — an IME server (ibus, fcitx5) connected.
|
|
||||||
* The input method protocol is symmetric with text_input; wlroots handles
|
|
||||||
* the protocol exchange. We log its arrival.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
handle_input_method_new(struct wl_listener *listener, void *data)
|
|
||||||
{
|
|
||||||
(void)listener; (void)data;
|
|
||||||
wwarning("wl_backend: input method v2 connected");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* handle_virtual_keyboard_new — a client created a virtual keyboard device.
|
|
||||||
* wlroots has already created the wlr_virtual_keyboard_v1 and wired its
|
|
||||||
* input_device into the backend. We just log it; the seat will advertise
|
|
||||||
* the keyboard capability automatically via handle_backend_new_input.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
handle_virtual_keyboard_new(struct wl_listener *listener, void *data)
|
|
||||||
{
|
|
||||||
(void)listener; (void)data;
|
|
||||||
wwarning("wl_backend: virtual keyboard v1 created");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
/* Phase 35: foreign toplevel management + xdg_activation */
|
/* Phase 35: foreign toplevel management + xdg_activation */
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
#include <wayland-server-core.h>
|
||||||
|
#include <wlr/util/log.h>
|
||||||
|
#include "wl_types.h"
|
||||||
|
|
||||||
|
/* Phase 34: text input v3, input method v2, virtual keyboard v1 */
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* handle_text_input_new — a client created a zwp_text_input_v3 object.
|
||||||
|
* Text input objects are managed entirely by wlroots; the compositor just
|
||||||
|
* needs to call wlr_text_input_v3_send_enter/leave to activate the IME
|
||||||
|
* for a focused surface. For now we log and do nothing — the IME framework
|
||||||
|
* will still register; full integration (enter on focus) can be added later.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
handle_text_input_new(struct wl_listener *listener, void *data)
|
||||||
|
{
|
||||||
|
(void)listener; (void)data;
|
||||||
|
wwarning("wl_backend: text input v3 object created");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* handle_input_method_new — an IME server (ibus, fcitx5) connected.
|
||||||
|
* The input method protocol is symmetric with text_input; wlroots handles
|
||||||
|
* the protocol exchange. We log its arrival.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
handle_input_method_new(struct wl_listener *listener, void *data)
|
||||||
|
{
|
||||||
|
(void)listener; (void)data;
|
||||||
|
wwarning("wl_backend: input method v2 connected");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* handle_virtual_keyboard_new — a client created a virtual keyboard device.
|
||||||
|
* wlroots has already created the wlr_virtual_keyboard_v1 and wired its
|
||||||
|
* input_device into the backend. We just log it; the seat will advertise
|
||||||
|
* the keyboard capability automatically via handle_backend_new_input.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
handle_virtual_keyboard_new(struct wl_listener *listener, void *data)
|
||||||
|
{
|
||||||
|
(void)listener; (void)data;
|
||||||
|
wwarning("wl_backend: virtual keyboard v1 created");
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue