MCPcopy Create free account
hub / github.com/deskflow/deskflow / handleDisableTimer

Method handleDisableTimer

src/lib/platform/XWindowsScreenSaver.cpp:450–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448}
449
450void XWindowsScreenSaver::handleDisableTimer()
451{
452 // send fake mouse motion directly to xscreensaver
453 if (m_xscreensaver != None) {
454 XEvent event;
455 event.xmotion.type = MotionNotify;
456 event.xmotion.display = m_display;
457 event.xmotion.window = m_xscreensaver;
458 event.xmotion.root = DefaultRootWindow(m_display);
459 event.xmotion.subwindow = None;
460 event.xmotion.time = CurrentTime;
461 event.xmotion.x = m_disablePos;
462 event.xmotion.y = 0;
463 event.xmotion.x_root = m_disablePos;
464 event.xmotion.y_root = 0;
465 event.xmotion.state = 0;
466 event.xmotion.is_hint = NotifyNormal;
467 event.xmotion.same_screen = True;
468
469 XWindowsUtil::ErrorLock lock(m_display);
470 XSendEvent(m_display, m_xscreensaver, False, 0, &event);
471
472 m_disablePos = 20 - m_disablePos;
473 }
474}
475
476void XWindowsScreenSaver::activateDPMS(bool activate)
477{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected