File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -237,12 +237,16 @@ bool GLEngineGLFW::isKeyPressed(char c) {
237237 return false ;
238238}
239239
240+
241+ // For some reason the ImGui::SetClipboardText() didn't work here, on linux
242+ // it would not actually write to system clipboard. Calling glfw directly seems to work.
243+
240244std::string GLEngineGLFW::getClipboardText () {
241- std::string clipboardData = ImGui::GetClipboardText ( );
245+ std::string clipboardData = glfwGetClipboardString ( nullptr );
242246 return clipboardData;
243247}
244248
245- void GLEngineGLFW::setClipboardText (std::string text) { ImGui::SetClipboardText ( text.c_str ()); }
249+ void GLEngineGLFW::setClipboardText (std::string text) { glfwSetClipboardString ( nullptr , text.c_str ()); }
246250
247251} // namespace backend_openGL3
248252} // namespace render
You can’t perform that action at this time.
0 commit comments