summaryrefslogtreecommitdiff
path: root/src/tofi.h
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2023-03-06 21:27:16 +0000
committerPhil Jones <philj56@gmail.com>2023-03-06 21:27:16 +0000
commit582825eda792c2612ab6f43a14ccb2bea3aee5d4 (patch)
tree413aed213ce35d91a69a6bd073a6461cc26dad8e /src/tofi.h
parentc4c32f63617f612e91e5a4b3b0012d922e5104df (diff)
Add fractional scaling support.
The main change is that we now always have to set up the dummy surface which was previously only used when multiple monitors were present. This is because there's no way to determine an output's fractional scale factor without displaying a surface on it, and we need to know the scale factor before we create our main window surface. The extra compositor round-trips lead to a slight slowdown for single monitor setups (to the same speed as multi-monitor setups), but it's currently unavoidable as far as I know.
Diffstat (limited to 'src/tofi.h')
-rw-r--r--src/tofi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tofi.h b/src/tofi.h
index 0b1560e..3e799c7 100644
--- a/src/tofi.h
+++ b/src/tofi.h
@@ -10,6 +10,7 @@
#include "entry.h"
#include "surface.h"
#include "wlr-layer-shell-unstable-v1.h"
+#include "wp-fractional-scale-v1.h"
#define MAX_OUTPUT_NAME_LEN 256
#define MAX_TERMINAL_NAME_LEN 256
@@ -35,6 +36,7 @@ struct tofi {
struct wl_data_device_manager *wl_data_device_manager;
struct wl_data_device *wl_data_device;
struct wp_viewporter *wp_viewporter;
+ struct wp_fractional_scale_manager_v1 *wp_fractional_scale_manager;
struct zwlr_layer_shell_v1 *zwlr_layer_shell;
struct wl_list output_list;
struct output_list_element *default_output;
@@ -63,6 +65,7 @@ struct tofi {
uint32_t width;
uint32_t height;
uint32_t scale;
+ uint32_t fractional_scale;
int32_t transform;
int32_t exclusive_zone;
int32_t margin_top;