I'm developing an C++ program with an integrated OSR. I use the following code do simple left clicks...
Bizarrely I've to call this function twice on the same coordinates to get one single click (on those coords).
Is there something wrong with my little function?
- Code: Select all
void leftClickOn(int x, int y) {
CefMouseEvent cme;
cme.x = x;
cme.y = y;
offscreen_client->GetBrowser()->GetHost()->SendMouseClickEvent(cme, MBT_LEFT, true, 1);
offscreen_client->GetBrowser()->GetHost()->SendMouseClickEvent(cme, MBT_LEFT, false, 1);
}
It looks like the first call of my function only moves the "cursor" and the second call actually performs the click.
Thanks in advance for any suggestion/hint/help.