[client] wayland: keep track of wl_output scale information

This will later be used to control the size of the underlying EGL buffers
in order to handle high DPI.
This commit is contained in:
Quantum
2021-02-20 22:48:48 -05:00
committed by Geoffrey McRae
parent e46cadb211
commit 6b26089353
5 changed files with 152 additions and 2 deletions

View File

@@ -51,6 +51,14 @@ struct WaylandPoll
struct wl_list link;
};
struct WaylandOutput
{
uint32_t name;
int32_t scale;
struct wl_output * output;
struct wl_list link;
};
struct WaylandDSState
{
bool pointerGrabbed;
@@ -108,6 +116,8 @@ struct WaylandDSState
struct zwp_idle_inhibit_manager_v1 * idleInhibitManager;
struct zwp_idle_inhibitor_v1 * idleInhibitor;
struct wl_list outputs; // WaylandOutput::link
struct wl_list poll; // WaylandPoll::link
struct wl_list pollFree; // WaylandPoll::link
LG_Lock pollLock;
@@ -200,6 +210,13 @@ void waylandUngrabPointer(void);
void waylandRealignPointer(void);
void waylandWarpPointer(int x, int y, bool exiting);
// output module
bool waylandOutputInit(void);
void waylandOutputFree(void);
void waylandOutputBind(uint32_t name);
void waylandOutputTryUnbind(uint32_t name);
int32_t waylandOutputGetScale(struct wl_output * output);
// poll module
bool waylandPollInit(void);
void waylandWait(unsigned int time);