backends/x11: Manage X11WindowedQPainterOutput using std::unique_ptr
This commit is contained in:
parent
c74fa4b571
commit
faa006d76f
2 changed files with 4 additions and 4 deletions
|
@ -70,12 +70,12 @@ X11WindowedQPainterBackend::~X11WindowedQPainterBackend()
|
|||
|
||||
void X11WindowedQPainterBackend::addOutput(Output *output)
|
||||
{
|
||||
m_outputs[output] = std::make_shared<X11WindowedQPainterOutput>(output, m_backend->windowForScreen(output));
|
||||
m_outputs[output] = std::make_unique<X11WindowedQPainterOutput>(output, m_backend->windowForScreen(output));
|
||||
}
|
||||
|
||||
void X11WindowedQPainterBackend::removeOutput(Output *output)
|
||||
{
|
||||
m_outputs.remove(output);
|
||||
m_outputs.erase(output);
|
||||
}
|
||||
|
||||
void X11WindowedQPainterBackend::present(Output *output)
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
#include "qpainterbackend.h"
|
||||
|
||||
#include <QImage>
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QVector>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
|
@ -55,7 +55,7 @@ private:
|
|||
|
||||
xcb_gcontext_t m_gc = XCB_NONE;
|
||||
X11WindowedBackend *m_backend;
|
||||
QMap<Output *, std::shared_ptr<X11WindowedQPainterOutput>> m_outputs;
|
||||
std::map<Output *, std::unique_ptr<X11WindowedQPainterOutput>> m_outputs;
|
||||
};
|
||||
|
||||
} // namespace KWin
|
||||
|
|
Loading…
Reference in a new issue