liminalOS/hosts/callisto/0015-output-dont-cast-enum-out-of-range-7448.patch

28 lines
1.1 KiB
Diff
Raw Normal View History

From 3e7325af57c4670ebea65d2669f49526819c2260 Mon Sep 17 00:00:00 2001
From: Tom Englund <tomenglund26@gmail.com>
Date: Wed, 21 Aug 2024 12:52:40 +0200
Subject: [PATCH 15/20] output: dont cast enum out of range (#7448)
avoid casting non typed enum out of range, looks like
WL_OUTPUT_MODE_CURRENT was the intention here.
---
src/protocols/core/Output.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/protocols/core/Output.cpp b/src/protocols/core/Output.cpp
index 878d1484..8d0b0121 100644
--- a/src/protocols/core/Output.cpp
+++ b/src/protocols/core/Output.cpp
@@ -55,7 +55,7 @@ void CWLOutputResource::updateState() {
if (resource->version() >= 2)
resource->sendScale(std::ceil(monitor->scale));
- resource->sendMode((wl_output_mode)(WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED), monitor->vecPixelSize.x, monitor->vecPixelSize.y, monitor->refreshRate * 1000.0);
+ resource->sendMode((wl_output_mode)(WL_OUTPUT_MODE_CURRENT), monitor->vecPixelSize.x, monitor->vecPixelSize.y, monitor->refreshRate * 1000.0);
if (resource->version() >= 2)
resource->sendDone();
--
2.45.2