aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Gilg <subdiff@gmail.com>2020-09-03 14:42:35 +0200
committerSimon Ser <contact@emersion.fr>2020-09-04 21:21:18 +0200
commitbae8d7593c4ac9d72ddc90bded52e96056330ca2 (patch)
tree523c7a289d8caa3c00281747d0297c1575c08a6f
parente4a7075a9e197781526839a258fbfadb7d0f1e19 (diff)
output-management-v1: send head identifying information
With version 2 we send make, model and serial number to allow clients the identification of heads.
-rw-r--r--types/wlr_output_management_v1.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/types/wlr_output_management_v1.c b/types/wlr_output_management_v1.c
index 15a971f6..ae20e0d7 100644
--- a/types/wlr_output_management_v1.c
+++ b/types/wlr_output_management_v1.c
@@ -6,7 +6,7 @@
#include "util/signal.h"
#include "wlr-output-management-unstable-v1-protocol.h"
-#define OUTPUT_MANAGER_VERSION 1
+#define OUTPUT_MANAGER_VERSION 2
enum {
HEAD_STATE_ENABLED = 1 << 0,
@@ -761,6 +761,16 @@ static void manager_send_head(struct wlr_output_manager_v1 *manager,
output->phys_width, output->phys_height);
}
+ if (version >= ZWLR_OUTPUT_HEAD_V1_MAKE_SINCE_VERSION && output->make[0] != '\0') {
+ zwlr_output_head_v1_send_make(head_resource, output->make);
+ }
+ if (version >= ZWLR_OUTPUT_HEAD_V1_MODEL_SINCE_VERSION && output->model[0] != '\0') {
+ zwlr_output_head_v1_send_model(head_resource, output->model);
+ }
+ if (version >= ZWLR_OUTPUT_HEAD_V1_SERIAL_NUMBER_SINCE_VERSION && output->serial[0] != '\0') {
+ zwlr_output_head_v1_send_serial_number(head_resource, output->serial);
+ }
+
struct wlr_output_mode *mode;
wl_list_for_each(mode, &output->modes, link) {
head_send_mode(head, head_resource, mode);