[ui gtk] Fix file dialog

Use drawing area for vulkan but window for dialogs
This commit is contained in:
Sandy Carter 2019-01-21 15:15:15 -05:00
parent cdf77d21bc
commit 0b5ff8332e
No known key found for this signature in database
GPG Key ID: CBEF579D87B6E212
2 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,7 @@ bool VulkanContext::Initialize() {
#elif XE_PLATFORM_LINUX #elif XE_PLATFORM_LINUX
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
GtkWidget* window_handle = GtkWidget* window_handle =
static_cast<GtkWidget*>(target_window_->native_handle()); dynamic_cast<GTKWindow*>(target_window_)->native_window_handle();
xcb_window_t window = xcb_window_t window =
gdk_x11_window_get_xid(gtk_widget_get_window(window_handle)); gdk_x11_window_get_xid(gtk_widget_get_window(window_handle));
VkXcbSurfaceCreateInfoKHR create_info; VkXcbSurfaceCreateInfoKHR create_info;

View File

@ -34,7 +34,8 @@ class GTKWindow : public Window {
NativePlatformHandle native_platform_handle() const override { NativePlatformHandle native_platform_handle() const override {
return connection_; 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 EnableMainMenu() override {}
void DisableMainMenu() override {} void DisableMainMenu() override {}