tablet: Show a default cursor when the cursor has not been set

In this context, the cursor will (almost) always be defined as we set it
as soon as an application is bound to it. We need to show the default
cursor if set_cursor hasn't been called yet. The way to do that is to
check whether the serial is still.
This commit is contained in:
Aleix Pol 2021-04-15 02:35:54 +02:00 committed by Aleix Pol Gonzalez
parent bd7300215e
commit a8867e292d

View file

@ -1687,7 +1687,7 @@ public:
return ret;
};
static const auto defaultCursor = createDefaultCursor();
if (!tcursor) {
if (!tcursor || tcursor->enteredSerial() == 0) {
cursor->updateCursor(defaultCursor.image, defaultCursor.hotspot);
return;
}