diff options
-rw-r--r-- | include/sway/server.h | 1 | ||||
-rw-r--r-- | sway/main.c | 2 | ||||
-rw-r--r-- | sway/server.c | 5 |
3 files changed, 8 insertions, 0 deletions
diff --git a/include/sway/server.h b/include/sway/server.h index 5df8a8e1..adb62cda 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -156,6 +156,7 @@ struct sway_debug { | |||
156 | bool noatomic; // Ignore atomic layout updates | 156 | bool noatomic; // Ignore atomic layout updates |
157 | bool txn_timings; // Log verbose messages about transactions | 157 | bool txn_timings; // Log verbose messages about transactions |
158 | bool txn_wait; // Always wait for the timeout before applying | 158 | bool txn_wait; // Always wait for the timeout before applying |
159 | bool legacy_wl_drm; // Enable the legacy wl_drm interface | ||
159 | }; | 160 | }; |
160 | 161 | ||
161 | extern struct sway_debug debug; | 162 | extern struct sway_debug debug; |
diff --git a/sway/main.c b/sway/main.c index 21f19fc4..73254dc2 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -162,6 +162,8 @@ void enable_debug_flag(const char *flag) { | |||
162 | debug.txn_timings = true; | 162 | debug.txn_timings = true; |
163 | } else if (strncmp(flag, "txn-timeout=", 12) == 0) { | 163 | } else if (strncmp(flag, "txn-timeout=", 12) == 0) { |
164 | server.txn_timeout_ms = atoi(&flag[12]); | 164 | server.txn_timeout_ms = atoi(&flag[12]); |
165 | } else if (strcmp(flag, "legacy-wl-drm") == 0) { | ||
166 | debug.legacy_wl_drm = true; | ||
165 | } else { | 167 | } else { |
166 | sway_log(SWAY_ERROR, "Unknown debug flag: %s", flag); | 168 | sway_log(SWAY_ERROR, "Unknown debug flag: %s", flag); |
167 | } | 169 | } |
diff --git a/sway/server.c b/sway/server.c index 33b25000..73bf9d70 100644 --- a/sway/server.c +++ b/sway/server.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <wlr/types/wlr_content_type_v1.h> | 13 | #include <wlr/types/wlr_content_type_v1.h> |
14 | #include <wlr/types/wlr_cursor_shape_v1.h> | 14 | #include <wlr/types/wlr_cursor_shape_v1.h> |
15 | #include <wlr/types/wlr_data_control_v1.h> | 15 | #include <wlr/types/wlr_data_control_v1.h> |
16 | #include <wlr/types/wlr_drm.h> | ||
16 | #include <wlr/types/wlr_export_dmabuf_v1.h> | 17 | #include <wlr/types/wlr_export_dmabuf_v1.h> |
17 | #include <wlr/types/wlr_fractional_scale_v1.h> | 18 | #include <wlr/types/wlr_fractional_scale_v1.h> |
18 | #include <wlr/types/wlr_gamma_control_v1.h> | 19 | #include <wlr/types/wlr_gamma_control_v1.h> |
@@ -191,6 +192,10 @@ bool server_init(struct sway_server *server) { | |||
191 | server->linux_dmabuf_v1 = wlr_linux_dmabuf_v1_create_with_renderer( | 192 | server->linux_dmabuf_v1 = wlr_linux_dmabuf_v1_create_with_renderer( |
192 | server->wl_display, 4, server->renderer); | 193 | server->wl_display, 4, server->renderer); |
193 | } | 194 | } |
195 | if (wlr_renderer_get_dmabuf_texture_formats(server->renderer) != NULL && | ||
196 | debug.legacy_wl_drm) { | ||
197 | wlr_drm_create(server->wl_display, server->renderer); | ||
198 | } | ||
194 | 199 | ||
195 | server->allocator = wlr_allocator_autocreate(server->backend, | 200 | server->allocator = wlr_allocator_autocreate(server->backend, |
196 | server->renderer); | 201 | server->renderer); |