[wayland] Allow the AbstractBackend subclasses to manage OutputInterfaces

This gives the backend more control without needing to provide all
information in Screens.
icc-effect-5.14.5
Martin Gräßlin 2015-04-24 12:00:19 +02:00
parent f775e13c6e
commit 603844cf98
2 changed files with 12 additions and 0 deletions

View File

@ -58,6 +58,10 @@ public:
}
void markCursorAsRendered();
bool handlesOutputs() const {
return m_handlesOutputs;
}
Q_SIGNALS:
void cursorChanged();
@ -66,6 +70,9 @@ protected:
void setSoftWareCursor(bool set);
void updateCursorFromServer();
void updateCursorImage(Qt::CursorShape shape);
void handleOutputs() {
m_handlesOutputs = true;
}
private Q_SLOTS:
void installThemeCursor(quint32 id, const QPoint &hotspot);
@ -79,6 +86,7 @@ private:
QPoint lastRenderedPosition;
} m_cursor;
Wayland::WaylandCursorTheme *m_cursorTheme = nullptr;
bool m_handlesOutputs = false;
};
}

View File

@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "wayland_server.h"
#include "abstract_backend.h"
#include "screens.h"
#include "toplevel.h"
#include "workspace.h"
@ -84,6 +85,9 @@ void WaylandServer::init(const QByteArray &socketName)
void WaylandServer::initOutputs()
{
if (m_backend && m_backend->handlesOutputs()) {
return;
}
Screens *s = screens();
Q_ASSERT(s);
for (int i = 0; i < s->count(); ++i) {