We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3879a84 commit 25a9ea9Copy full SHA for 25a9ea9
1 file changed
src/render/opengl/gl_engine_glfw.cpp
@@ -237,12 +237,16 @@ bool GLEngineGLFW::isKeyPressed(char c) {
237
return false;
238
}
239
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
244
std::string GLEngineGLFW::getClipboardText() {
- std::string clipboardData = ImGui::GetClipboardText();
245
+ std::string clipboardData = glfwGetClipboardString(nullptr);
246
return clipboardData;
247
248
-void GLEngineGLFW::setClipboardText(std::string text) { ImGui::SetClipboardText(text.c_str()); }
249
+void GLEngineGLFW::setClipboardText(std::string text) { glfwSetClipboardString(nullptr, text.c_str()); }
250
251
} // namespace backend_openGL3
252
} // namespace render
0 commit comments