MCPcopy Create free account
hub / github.com/SFML/SFML / updateLastInputTime

Method updateLastInputTime

src/SFML/Window/Unix/WindowImplX11.cpp:1741–1766  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1739
1740////////////////////////////////////////////////////////////
1741void WindowImplX11::updateLastInputTime(::Time time)
1742{
1743 if (time && (time != m_lastInputTime))
1744 {
1745 static const auto supported = WindowImplX11Impl::isFeatureSupported("_NET_WM_USER_TIME");
1746
1747 if (supported)
1748 {
1749 static const auto netWmUserTime = getAtom("_NET_WM_USER_TIME");
1750
1751 if (netWmUserTime)
1752 {
1753 XChangeProperty(m_display.get(),
1754 m_window,
1755 netWmUserTime,
1756 XA_CARDINAL,
1757 32,
1758 PropModeReplace,
1759 reinterpret_cast<const unsigned char*>(&time),
1760 1);
1761 }
1762 }
1763
1764 m_lastInputTime = time;
1765 }
1766}
1767
1768
1769////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 3

isFeatureSupportedFunction · 0.85
getAtomFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected