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

Method setStringImpl

src/SFML/Window/Unix/ClipboardImpl.cpp:158–168  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

156
157////////////////////////////////////////////////////////////
158void ClipboardImpl::setStringImpl(const String& text)
159{
160 m_clipboardContents = text;
161
162 // Set our window as the current owner of the selection
163 XSetSelectionOwner(m_display.get(), m_clipboard, m_window, CurrentTime);
164
165 // Check if setting the selection owner was successful
166 if (XGetSelectionOwner(m_display.get(), m_clipboard) != m_window)
167 err() << "Cannot set clipboard string: Unable to get ownership of X selection" << std::endl;
168}
169
170
171////////////////////////////////////////////////////////////

Callers 1

setStringMethod · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected