term: move per-window wayland objects from wayland struct to terminal struct

Short term, we want to break out the wayland backend from the terminal
struct. Long term, we might want to support multiple windows.

One step towards both the above is separating global wayland objects
from per-window objects.
This commit is contained in:
Daniel Eklöf 2019-10-27 12:57:37 +01:00
parent 5fefb950b3
commit f63458ef33
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 84 additions and 80 deletions

View file

@ -67,22 +67,8 @@ struct wayland {
char *theme_name;
} pointer;
/* Main window */
struct wl_surface *surface;
struct xdg_wm_base *shell;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct zxdg_decoration_manager_v1 *xdg_decoration_manager;
struct zxdg_toplevel_decoration_v1 *xdg_toplevel_decoration;
/* Scrollback search */
struct wl_surface *search_surface;
struct wl_subsurface *search_sub_surface;
bool have_argb8888;
tll(struct monitor) monitors; /* All available outputs */
tll(const struct monitor *) on_outputs; /* Outputs we're mapped on */
};
struct rgb { float r, g, b; };
@ -375,6 +361,22 @@ struct terminal {
} fextents;
struct wayland wl;
struct {
struct wl_surface *surface;
struct xdg_wm_base *shell;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct zxdg_decoration_manager_v1 *xdg_decoration_manager;
struct zxdg_toplevel_decoration_v1 *xdg_toplevel_decoration;
/* Scrollback search */
struct wl_surface *search_surface;
struct wl_subsurface *search_sub_surface;
tll(const struct monitor *) on_outputs; /* Outputs we're mapped on */
} window;
struct {
int scrollback_lines;
struct wl_callback *frame_callback;