wayland: plumbing for wp-fractional-scale

* Bind the wp-viewporter and wp-fractional-scale-manager globals.
* Create a viewport and fractional-scale when instantiating a window.
* Add fractional-scale listener (that does nothing at the moment).
* Destroy everything on teardown.
This commit is contained in:
Daniel Eklöf 2023-03-08 10:44:03 +01:00
parent 1e6204e1ac
commit a9ecf1449e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 77 additions and 0 deletions

View file

@ -20,6 +20,11 @@
#include <xdg-activation-v1.h>
#endif
#if defined(HAVE_FRACTIONAL_SCALE)
#include <viewporter.h>
#include <fractional-scale-v1.h>
#endif
#include <fcft/fcft.h>
#include <tllist.h>
@ -326,9 +331,15 @@ struct wl_window {
#if defined(HAVE_XDG_ACTIVATION)
tll(struct xdg_activation_token_context *) xdg_tokens;
bool urgency_token_is_pending;
#endif
#if defined(HAVE_FRACTIONAL_SCALE)
struct wp_viewport *viewport;
struct wp_fractional_scale_v1 *fractional_scale;
#endif
bool unmapped;
float scale;
struct zxdg_toplevel_decoration_v1 *xdg_toplevel_decoration;
enum csd_mode csd_mode;
@ -414,6 +425,11 @@ struct wayland {
struct zwp_text_input_manager_v3 *text_input_manager;
#endif
#if defined(HAVE_FRACTIONAL_SCALE)
struct wp_viewporter *viewporter;
struct wp_fractional_scale_manager_v1 *fractional_scale_manager;
#endif
bool have_argb8888;
tll(struct monitor) monitors; /* All available outputs */
tll(struct seat) seats;