iOS : mouseExit always on

I don’t get the same result with this simple example code in
MainComponent.cpp :

  • For OSX, it works
  • For iOS, the state of the mouse is always exit (except when dragged)

What can I do ?

MainContentComponent::MainContentComponent()
{
setSize (300, 400);
}
void MainContentComponent::paint (Graphics& g)
{
g.fillAll (Colours::cornflowerblue);
g.setColour (Colours::yellowgreen);
g.setFont (Font (24));
g.drawText (text, 0, 0, getWidth(), getHeight(),
Justification::centred, false);
g.setColour (Colours::yellow);
const float radius = 10.f;
g.fillEllipse (x - radius, y - radius,
radius * 2.f, radius * 2.f);
}

void MainContentComponent::mouseEnter (const MouseEvent& event)
{
text = “mouse enter”;
handleMouse (event);
}
void MainContentComponent::mouseMove (const MouseEvent& event)
{
text = “mouse move”;
handleMouse (event);
}
void MainContentComponent::mouseDown (const MouseEvent& event)
{
text = “mouse down”;
handleMouse (event);
}
void MainContentComponent::mouseDrag (const MouseEvent& event)
{
text = “mouse drag”;
handleMouse (event);
}
void MainContentComponent::mouseUp (const MouseEvent& event)
{
text = “mouse up”;
handleMouse (event);
}
void MainContentComponent::mouseExit (const MouseEvent& event)
{
text = “mouse exit”;
handleMouse (event);
}
void MainContentComponent::handleMouse (const MouseEvent& event)
{
x = event.x;
y = event.y;
repaint();
}

Well yes… iOS doesn’t have a mouse pointer, so it clearly doesn’t stay “over” something when the touch ends.

Well, that’s quite stupid from my part, my only excuse is that simulating an iOS device with a mouse can be somehow misleading. Thanks for answering.