From 0b4e91fbbe57104e663ae9c202921c4576c2de97 Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Sun, 19 Oct 2025 11:41:13 +0900 Subject: [PATCH] Revert "[UI] Set ImGUI clipboard functions to GTK implementations" This reverts commit a1a33b9939e8bc95555bbecafeac97413b73ddea. --- premake5.lua | 2 +- src/xenia/ui/imgui_drawer.cc | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/premake5.lua b/premake5.lua index f10bc3fc3..4fe4acacc 100644 --- a/premake5.lua +++ b/premake5.lua @@ -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. diff --git a/src/xenia/ui/imgui_drawer.cc b/src/xenia/ui/imgui_drawer.cc index f2e30a907..b3f45c7fe 100644 --- a/src/xenia/ui/imgui_drawer.cc +++ b/src/xenia/ui/imgui_drawer.cc @@ -35,10 +35,6 @@ #include #endif -#ifdef XE_PLATFORM_LINUX -#include -#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;