MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / mouseUpAt

Function mouseUpAt

cpp/webdriver-interactions/interactions_linux_mouse.cpp:389–416  ·  view source on GitHub ↗

* mouseUpAt */

Source from the content-addressed store, hash-verified

387 * mouseUpAt
388 */
389WD_RESULT mouseUpAt(WINDOW_HANDLE windowHandle, long x, long y, long button)
390{
391 init_logging();
392
393 const int timePerEvent = 10 /* ms */;
394
395 LOG(DEBUG) << "---------- starting mouseUpAt: " << windowHandle << "---------";
396 GdkDrawable* hwnd = (GdkDrawable*) windowHandle;
397
398 MouseEventsHandler mousep_handler(hwnd);
399
400 struct timespec sleep_time;
401 sleep_time.tv_sec = timePerEvent / 1000;
402 sleep_time.tv_nsec = (timePerEvent % 1000) * 1000000;
403 LOG(DEBUG) << "Sleep time is " << sleep_time.tv_sec << " seconds and " <<
404 sleep_time.tv_nsec << " nanoseconds.";
405
406 list<GdkEvent*> events_for_mouse = mousep_handler.CreateEventsForMouseUp(x, y, button);
407 submit_and_free_events_list(events_for_mouse, timePerEvent);
408
409
410 if (gLatestEventTime < mousep_handler.get_last_event_time()) {
411 gLatestEventTime = mousep_handler.get_last_event_time();
412 }
413
414 LOG(DEBUG) << "---------- Ending mouseUpAt ----------";
415 return 0;
416}
417
418bool pending_mouse_events()
419{

Callers

nothing calls this directly

Calls 5

init_loggingFunction · 0.85
LOGClass · 0.70
get_last_event_timeMethod · 0.45

Tested by

no test coverage detected