diff --git a/src/xenia/ui/vulkan/vulkan_context.cc b/src/xenia/ui/vulkan/vulkan_context.cc index fb56278dd..7744066ea 100644 --- a/src/xenia/ui/vulkan/vulkan_context.cc +++ b/src/xenia/ui/vulkan/vulkan_context.cc @@ -69,7 +69,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 f8a5efc0a..497b48ea6 100644 --- a/src/xenia/ui/window_gtk.h +++ b/src/xenia/ui/window_gtk.h @@ -30,7 +30,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 {}