#include <DSSeat.h>
#include <DSPolicyArea.h>
#include <DSDisplayArea.h>
+#include "DSDebugLog.h"
using namespace display_server;
int width = __displayArea->getWidth();
int height = __displayArea->getHeight();
+ __seat = std::make_shared<DSSeat>(this, "default");
+ DSLOG_INF("MyCompositor", "DSSeat has been created. (%p)", __seat.get());
+
+ __input = std::make_shared<DSInput>(__seat);
+ DSLOG_INF("MyCompositor", "DSInput has been created. (%p)", __input.get());
+
+ __seat->addInput(__input);
+ __input->init();
+
__policyArea = std::make_shared<DSPolicyArea>();
__policyArea->setPosition(0, 0);
__policyArea->setSize(width, height);
void _onInputAdded(std::shared_ptr<DSInput> input) override
{
- __seat = std::make_shared<DSSeat>();
- __seat->addInput(input); // add an input device to a seat
}
void _onInputRemoved(std::shared_ptr<DSInput> input) override
{
- __seat->removeInput(input); // remove an input device from a seat
- __seat.reset(); // delete shared_ptr
}
private:
std::shared_ptr<DSCanvas> __canvas;
std::shared_ptr<DSSeat> __seat;
+ std::shared_ptr<DSInput> __input;
std::shared_ptr<DSPolicyArea> __policyArea;
std::shared_ptr<DSDisplayArea> __displayArea;
};