compositor_wayland: don't commit cursor changes if the layer wasn't actually enabled

The drm backend doesn't handle changes that do this well, as it requests a pageflip event and the
kernel can't give us a pageflip event for an already-disabled plane.

BUG: 495843
wilder/Plasma/6.3
Xaver Hugl 1 year ago
parent d90c64bc7c
commit 769c896cdb
  1. 7
      src/compositor_wayland.cpp

@ -537,13 +537,16 @@ void WaylandCompositor::addOutput(Output *output)
outputLayer->setEnabled(true);
return output->updateCursorLayer();
};
const bool wasHardwareCursor = outputLayer && outputLayer->isEnabled();
if (renderHardwareCursor()) {
cursorLayer->setVisible(false);
return true;
} else {
if (outputLayer && outputLayer->isEnabled()) {
if (outputLayer) {
outputLayer->setEnabled(false);
output->updateCursorLayer();
if (wasHardwareCursor) {
output->updateCursorLayer();
}
}
cursorLayer->setVisible(cursor->isOnOutput(output));
cursorLayer->setGeometry(outputLocalRect);

Loading…
Cancel
Save