diff options
Diffstat (limited to 'src/xprivate.cpp')
-rw-r--r-- | src/xprivate.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/xprivate.cpp b/src/xprivate.cpp index 0233f5b..70c1a3f 100644 --- a/src/xprivate.cpp +++ b/src/xprivate.cpp @@ -60,7 +60,6 @@ XPrivate::~XPrivate() void XPrivate::freeResources() { - freeCrtcBackup(); // Clear the modemap (nothing to be freed, stored in screenResources) _modeMap.clear(); _resolutions.clear(); @@ -292,36 +291,6 @@ void XPrivate::disconnectAllCrtcs() } } -void XPrivate::freeCrtcBackup() -{ - for (auto entry : _crtcBackup) { - free(entry->outputs); - free(entry); - } - _crtcBackup.clear(); - qDebug() << "CRTC freed"; -} - -void XPrivate::createCrtcBackup() -{ - freeCrtcBackup(); - for (CrtcMap::iterator it = _crtcMap.begin(); it != _crtcMap.end(); ++it) { - const auto src = it.value(); - XRRCrtcInfo *copy = static_cast<XRRCrtcInfo*>(calloc(1, sizeof(XRRCrtcInfo))); - copy->outputs = static_cast<RROutput*>(calloc(size_t(src->noutput), sizeof(RROutput))); - copy->x = src->x; - copy->y = src->y; - copy->mode = src->mode; - copy->rotation = src->rotation; - copy->noutput = src->noutput; - for (int i = 0; i < src->noutput; ++i) { - copy->outputs[i] = src->outputs[i]; - } - _crtcBackup[it.key()] = copy; - } - qDebug() << "Created CRTC backup with entries:" << _crtcBackup.size(); -} - /** * Copy first "num" modes from output to all other outputs if they * dont have a suitable mode yet. |