Introduce fractional scaling

This commit is contained in:
emersion 2017-12-15 01:00:03 +01:00
parent 23fb663ea4
commit 51db087210
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
10 changed files with 24 additions and 20 deletions

View file

@ -9,7 +9,7 @@ struct roots_output_config {
char *name;
enum wl_output_transform transform;
int x, y;
int scale;
float scale;
struct wl_list link;
struct {
int width, height;

View file

@ -68,7 +68,7 @@ void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev,
*/
void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
int32_t stride, uint32_t width, uint32_t height, int32_t hotspot_x,
int32_t hotspot_y, uint32_t scale);
int32_t hotspot_y, float scale);
/**
* Set the cursor surface. The surface can be committed to update the cursor

View file

@ -45,7 +45,7 @@ struct wlr_output {
char make[48];
char model[16];
char serial[16];
uint32_t scale;
float scale;
int32_t width, height;
int32_t phys_width, phys_height; // mm
enum wl_output_subpixel subpixel;
@ -92,7 +92,7 @@ bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width,
void wlr_output_set_transform(struct wlr_output *output,
enum wl_output_transform transform);
void wlr_output_set_position(struct wlr_output *output, int32_t lx, int32_t ly);
void wlr_output_set_scale(struct wlr_output *output, uint32_t scale);
void wlr_output_set_scale(struct wlr_output *output, float scale);
void wlr_output_destroy(struct wlr_output *output);
void wlr_output_effective_resolution(struct wlr_output *output,
int *width, int *height);

View file

@ -9,7 +9,7 @@
* A scaled XCursor theme.
*/
struct wlr_xcursor_manager_theme {
uint32_t scale;
float scale;
struct wlr_xcursor_theme *theme;
struct wl_list link;
};
@ -38,10 +38,10 @@ struct wlr_xcursor_manager *wlr_xcursor_manager_create(const char *name,
void wlr_xcursor_manager_destroy(struct wlr_xcursor_manager *manager);
int wlr_xcursor_manager_load(struct wlr_xcursor_manager *manager,
uint32_t scale);
float scale);
struct wlr_xcursor *wlr_xcursor_manager_get_xcursor(
struct wlr_xcursor_manager *manager, const char *name, uint32_t scale);
struct wlr_xcursor_manager *manager, const char *name, float scale);
/**
* Set a `wlr_cursor` image. The manager uses all currently loaded scaled