Revert "[UI] Set ImGUI clipboard functions to GTK implementations"

This reverts commit a1a33b9939.
This commit is contained in:
Herman S.
2025-10-19 11:41:13 +09:00
parent c2eac169d2
commit 0b4e91fbbe
2 changed files with 1 additions and 22 deletions
+1 -1
View File
@@ -34,6 +34,7 @@ includedirs({
defines({
"VULKAN_HPP_NO_TO_STRING",
"IMGUI_DISABLE_OBSOLETE_FUNCTIONS",
"IMGUI_DISABLE_DEFAULT_FONT",
--"IMGUI_USE_WCHAR32",
"IMGUI_USE_STB_SPRINTF",
@@ -298,7 +299,6 @@ filter("platforms:Windows")
"WIN32",
"_WIN64=1",
"_AMD64=1",
"IMGUI_DISABLE_OBSOLETE_FUNCTIONS",
})
linkoptions({
"/ignore:4006", -- Ignores complaints about empty obj files.
-21
View File
@@ -35,10 +35,6 @@
#include <fontconfig/fontconfig.h>
#endif
#ifdef XE_PLATFORM_LINUX
#include <gtk/gtk.h>
#endif
DEFINE_path(
custom_font_path, "",
"Allows user to load custom font and use it instead of default one.", "UI");
@@ -142,18 +138,6 @@ void ImGuiDrawer::RemoveNotification(ImGuiNotification* dialog) {
DetachIfLastWindowRemoved();
}
#ifdef XE_PLATFORM_LINUX
static void SetClipboardText(void* user_data, const char* text) {
GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
gtk_clipboard_set_text(clipboard, text, -1);
}
static const char* GetClipboardText(void* user_data) {
GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
return gtk_clipboard_wait_for_text(clipboard);
}
#endif
void ImGuiDrawer::Initialize() {
// Setup ImGui internal state.
// This will give us state we can swap to the ImGui globals when in use.
@@ -169,11 +153,6 @@ void ImGuiDrawer::Initialize() {
InitializeFonts(font_size);
InitializeFonts(title_font_size);
#ifdef XE_PLATFORM_LINUX
io.SetClipboardTextFn = SetClipboardText;
io.GetClipboardTextFn = GetClipboardText;
#endif
auto& style = ImGui::GetStyle();
style.ScrollbarRounding = 6.0f;
style.WindowRounding = 6.0f;