chore: use popup desc to place popup

This commit is contained in:
ShootingStarDragons 2024-02-13 10:05:59 +08:00 committed by Access
parent b09db5b7a4
commit 14f6847cc0
3 changed files with 54 additions and 42 deletions

View file

@ -35,21 +35,6 @@ struct sway_input_method_relay {
struct wl_listener input_method_keyboard_grab_destroy;
};
struct sway_input_popup {
struct sway_input_method_relay *relay;
struct wlr_scene_tree *scene_tree;
struct wlr_input_popup_surface_v2 *popup_surface;
int x, y;
struct wl_list link;
struct wl_listener popup_destroy;
struct wl_listener popup_surface_commit;
struct wl_listener focused_surface_unmap;
};
struct sway_text_input {
struct sway_input_method_relay *relay;

View file

@ -0,0 +1,22 @@
#ifndef _SWAY_INPUT_TEXT_INPUT_POPUP_H
#define _SWAY_INPUT_TEXT_INPUT_POPUP_H
#include "sway/tree/view.h"
struct sway_input_popup {
struct sway_input_method_relay *relay;
struct wlr_scene_tree *scene_tree;
struct sway_popup_desc desc;
struct wlr_input_popup_surface_v2 *popup_surface;
int x, y;
struct wl_list link;
struct wl_listener popup_destroy;
struct wl_listener popup_surface_commit;
struct wl_listener focused_surface_unmap;
};
#endif