From 0b5ff8332e9248406d08e8fc24e68f0a4a9f6f43 Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Mon, 21 Jan 2019 15:15:15 -0500 Subject: [PATCH] [ui gtk] Fix file dialog Use drawing area for vulkan but window for dialogs --- src/xenia/ui/vulkan/vulkan_context.cc | 2 +- src/xenia/ui/window_gtk.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xenia/ui/vulkan/vulkan_context.cc b/src/xenia/ui/vulkan/vulkan_context.cc index e39eada39..76101c6b7 100644 --- a/src/xenia/ui/vulkan/vulkan_context.cc +++ b/src/xenia/ui/vulkan/vulkan_context.cc @@ -71,7 +71,7 @@ bool VulkanContext::Initialize() { #elif XE_PLATFORM_LINUX #ifdef GDK_WINDOWING_X11 GtkWidget* window_handle = - static_cast(target_window_->native_handle()); + dynamic_cast(target_window_)->native_window_handle(); xcb_window_t window = gdk_x11_window_get_xid(gtk_widget_get_window(window_handle)); VkXcbSurfaceCreateInfoKHR create_info; diff --git a/src/xenia/ui/window_gtk.h b/src/xenia/ui/window_gtk.h index fba1886a3..27a4c08b0 100644 --- a/src/xenia/ui/window_gtk.h +++ b/src/xenia/ui/window_gtk.h @@ -34,7 +34,8 @@ class GTKWindow : public Window { NativePlatformHandle native_platform_handle() const override { return connection_; } - NativeWindowHandle native_handle() const override { return drawing_area_; } + NativeWindowHandle native_handle() const override { return window_; } + GtkWidget* native_window_handle() const { return drawing_area_; } void EnableMainMenu() override {} void DisableMainMenu() override {}