[vulkan linux] Fix native_platform_handle with gtk
Use gtk connection as handle and use it when creating surface.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user