Commit faa006d7 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

backends/x11: Manage X11WindowedQPainterOutput using std::unique_ptr

parent c74fa4b5
Pipeline #206723 passed with stage
in 12 minutes and 3 seconds
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment