[vulkan linux] Fix native_platform_handle with gtk

Use gtk connection as handle and use it when creating surface.
This commit is contained in:
Sandy Carter
2019-01-18 09:01:11 -05:00
parent 0965975cbe
commit 6d591970ab
3 changed files with 9 additions and 5 deletions

View File

@@ -15,6 +15,7 @@
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <xcb/xcb.h>
#include "xenia/base/platform_linux.h"
#include "xenia/ui/menu_item.h"
@@ -31,7 +32,7 @@ class GTKWindow : public Window {
~GTKWindow() override;
NativePlatformHandle native_platform_handle() const override {
return nullptr;
return connection_;
}
NativeWindowHandle native_handle() const override { return window_; }
@@ -74,6 +75,7 @@ class GTKWindow : public Window {
private:
void Create();
GtkWidget* window_;
xcb_connection_t* connection_;
friend void gtk_event_handler_(GtkWidget*, GdkEvent*, gpointer);
bool HandleMouse(GdkEventAny* event);