wayland/output: send geometry in updateState

This commit is contained in:
Vaxry 2024-09-30 17:42:36 +01:00
parent 6bd3397141
commit 5c6c300abf

View file

@ -21,8 +21,6 @@ CWLOutputResource::CWLOutputResource(SP<CWlOutput> resource_, SP<CMonitor> pMoni
PROTO::outputs.at(monitor->szName)->destroyResource(this); PROTO::outputs.at(monitor->szName)->destroyResource(this);
}); });
resource->sendGeometry(0, 0, monitor->output->physicalSize.x, monitor->output->physicalSize.y, (wl_output_subpixel)monitor->output->subpixel, monitor->output->make.c_str(),
monitor->output->model.c_str(), monitor->transform);
if (resource->version() >= 4) { if (resource->version() >= 4) {
resource->sendName(monitor->szName.c_str()); resource->sendName(monitor->szName.c_str());
resource->sendDescription(monitor->szDescription.c_str()); resource->sendDescription(monitor->szDescription.c_str());
@ -57,6 +55,9 @@ void CWLOutputResource::updateState() {
resource->sendMode((wl_output_mode)(WL_OUTPUT_MODE_CURRENT), 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);
resource->sendGeometry(0, 0, monitor->output->physicalSize.x, monitor->output->physicalSize.y, (wl_output_subpixel)monitor->output->subpixel, monitor->output->make.c_str(),
monitor->output->model.c_str(), monitor->transform);
if (resource->version() >= 2) if (resource->version() >= 2)
resource->sendDone(); resource->sendDone();
} }