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.
This commit is contained in:
Tom Englund 2024-08-21 12:52:40 +02:00 committed by GitHub
parent 946ed1f32a
commit 3e7325af57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,7 @@ void CWLOutputResource::updateState() {
if (resource->version() >= 2) if (resource->version() >= 2)
resource->sendScale(std::ceil(monitor->scale)); 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) if (resource->version() >= 2)
resource->sendDone(); resource->sendDone();