{
DSOutputImpl::DSOutputImpl(std::shared_ptr<IDSDisplayDeviceOutput> displayDeviceOutput)
- : __resolutionWidth{0},
- __resolutionHeight{0},
- __displayDeviceOutput{displayDeviceOutput}
+ : __displayDeviceOutput{displayDeviceOutput}
{}
DSOutputImpl::~DSOutputImpl()
int DSOutputImpl::getResolutionWidth()
{
- return __resolutionWidth;
+ return __displayDeviceOutput->getResolutionWidth();
}
int DSOutputImpl::getResolutionHeight()
{
- return __resolutionHeight;
+ return __displayDeviceOutput->getResolutionHeight();
}
bool DSOutputImpl::applyResolutionAuto()
return false;
}
+ // TODO: get more information from DSOutputImpl to set them toDSWaylandOutput.
+ __waylandOutput = std::make_shared<DSWaylandOutput>(DSWaylandCompositor::getInstance(),
+ __displayDeviceOutput->getName(), "tm1", "tm1",
+ 0, 0, __displayDeviceOutput->getResolutionWidth(), __displayDeviceOutput->getResolutionHeight(),
+ __displayDeviceOutput->getPhysicalMMWidth(), __displayDeviceOutput->getPhysicalMMHeight(),
+ __displayDeviceOutput->getRefreshRate(), 0, 0);
+ DSWaylandCompositor::releaseInstance();
+
+ // send output information
+ __waylandOutput->sendWaylandOutputInfo();
+
return true;
}
#include "IDSOutput.h"
#include "IDSDisplayDeviceOutput.h"
+#include "DSWaylandOutput.h"
namespace display_server
{
std::shared_ptr<IDSDisplayDeviceOutput> getDisplayDeviceOutput();
private:
- int __resolutionWidth;
- int __resolutionHeight;
std::shared_ptr<IDSDisplayDeviceOutput> __displayDeviceOutput;
+ std::shared_ptr<DSWaylandOutput> __waylandOutput;
};
}