mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-05-31 03:44:26 +00:00
[client] wayland: improve fractional scaling
avoids the 24.8 quantisation without introducing floating-point equality/rounding behaviour throughout the Wayland state. Closes #1257
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
#include "wayland-xdg-output-unstable-v1-client-protocol.h"
|
||||
#include "wayland-xdg-activation-v1-client-protocol.h"
|
||||
|
||||
#include "scale.h"
|
||||
|
||||
typedef void (*WaylandPollCallback)(uint32_t events, void * opaque);
|
||||
|
||||
struct WaylandPoll
|
||||
@@ -62,7 +64,7 @@ struct WaylandPoll
|
||||
struct WaylandOutput
|
||||
{
|
||||
uint32_t name;
|
||||
wl_fixed_t scale;
|
||||
struct WaylandScale scale;
|
||||
int32_t scaleInt;
|
||||
int32_t logicalWidth;
|
||||
int32_t logicalHeight;
|
||||
@@ -108,7 +110,7 @@ struct WaylandDSState
|
||||
struct wl_shm * shm;
|
||||
struct wl_compositor * compositor;
|
||||
|
||||
wl_fixed_t scale;
|
||||
struct WaylandScale scale;
|
||||
bool fractionalScale;
|
||||
bool needsResize;
|
||||
bool configured;
|
||||
@@ -285,7 +287,7 @@ bool waylandOutputInit(void);
|
||||
void waylandOutputFree(void);
|
||||
void waylandOutputBind(uint32_t name, uint32_t version);
|
||||
void waylandOutputTryUnbind(uint32_t name);
|
||||
wl_fixed_t waylandOutputGetScale(struct wl_output * output);
|
||||
struct WaylandScale waylandOutputGetScale(struct wl_output * output);
|
||||
|
||||
// poll module
|
||||
bool waylandPollInit(void);
|
||||
|
||||
Reference in New Issue
Block a user