[wayland] Add protected AbstractBackend::repaint(const QRect&)

Allows to trigger a repaint in the Compositor. This way the
implementation does not need to call into Compositor.
icc-effect-5.14.5
Martin Gräßlin 2015-05-05 10:54:13 +02:00
parent 8be38dc4f6
commit 79b5685b7a
3 changed files with 10 additions and 5 deletions

View File

@ -292,4 +292,12 @@ void AbstractBackend::touchUp(qint32 id, quint32 time)
input()->processTouchUp(id, time);
}
void AbstractBackend::repaint(const QRect &rect)
{
if (!Compositor::self()) {
return;
}
Compositor::self()->addRepaint(rect);
}
}

View File

@ -88,6 +88,7 @@ protected:
void handleOutputs() {
m_handlesOutputs = true;
}
void repaint(const QRect &rect);
private Q_SLOTS:
void installThemeCursor(quint32 id, const QPoint &hotspot);

View File

@ -18,7 +18,6 @@ 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 "x11windowed_backend.h"
#include "composite.h"
#include "scene_qpainter.h"
#include "screens_x11windowed.h"
#include "utils.h"
@ -241,10 +240,7 @@ void X11WindowedBackend::handleButtonPress(xcb_button_press_event_t *event)
void X11WindowedBackend::handleExpose(xcb_expose_event_t *event)
{
if (!Compositor::self()) {
return;
}
Compositor::self()->addRepaint(QRect(event->x, event->y, event->width, event->height));
repaint(QRect(event->x, event->y, event->width, event->height));
}
void X11WindowedBackend::updateSize(xcb_configure_notify_event_t *event)