summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/wayland/wayland_thread.h
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2024-01-31 14:00:30 +0100
committerGitHub <noreply@github.com>2024-01-31 14:00:30 +0100
commitf23fda39d3af5915754379f652103505ab038c50 (patch)
tree69cf520f4c6ea43b42f4bf7195e8f9bca593bba4 /platform/linuxbsd/wayland/wayland_thread.h
parentf8a039e9b54875a3435ace4b9953cefa591a0753 (diff)
parentedb21e05739b46c98852f4ffbadc040b11efc6db (diff)
downloadredot-engine-f23fda39d3af5915754379f652103505ab038c50.tar.gz
Merge pull request #87776 from bruvzg/wl_nfd
[Wayland] Add support for native file dialogs.
Diffstat (limited to 'platform/linuxbsd/wayland/wayland_thread.h')
-rw-r--r--platform/linuxbsd/wayland/wayland_thread.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/platform/linuxbsd/wayland/wayland_thread.h b/platform/linuxbsd/wayland/wayland_thread.h
index 8591db4306..43c562aade 100644
--- a/platform/linuxbsd/wayland/wayland_thread.h
+++ b/platform/linuxbsd/wayland/wayland_thread.h
@@ -63,6 +63,7 @@
#include "wayland/protocol/wayland.gen.h"
#include "wayland/protocol/xdg_activation.gen.h"
#include "wayland/protocol/xdg_decoration.gen.h"
+#include "wayland/protocol/xdg_foreign.gen.h"
#include "wayland/protocol/xdg_shell.gen.h"
#ifdef LIBDECOR_ENABLED
@@ -132,6 +133,9 @@ public:
struct xdg_wm_base *xdg_wm_base = nullptr;
uint32_t xdg_wm_base_name = 0;
+ struct zxdg_exporter_v1 *wl_exporter = nullptr;
+ uint32_t wl_exporter_name = 0;
+
// wayland-protocols globals.
struct wp_viewporter *wp_viewporter = nullptr;
@@ -197,6 +201,9 @@ public:
struct wp_viewport *wp_viewport = nullptr;
struct wp_fractional_scale_v1 *wp_fractional_scale = nullptr;
+ struct zxdg_exported_v1 *xdg_exported = nullptr;
+
+ String exported_handle;
// Currently applied buffer scale.
int buffer_scale = 1;
@@ -599,6 +606,8 @@ private:
static void _xdg_toplevel_decoration_on_configure(void *data, struct zxdg_toplevel_decoration_v1 *xdg_toplevel_decoration, uint32_t mode);
+ static void _xdg_exported_on_exported(void *data, zxdg_exported_v1 *exported, const char *handle);
+
static void _xdg_activation_token_on_done(void *data, struct xdg_activation_token_v1 *xdg_activation_token, const char *token);
// Core Wayland event listeners.
@@ -753,6 +762,10 @@ private:
.frame = _wp_tablet_tool_on_frame,
};
+ static constexpr struct zxdg_exported_v1_listener xdg_exported_listener = {
+ .handle = _xdg_exported_on_exported
+ };
+
static constexpr struct zxdg_toplevel_decoration_v1_listener xdg_toplevel_decoration_listener = {
.configure = _xdg_toplevel_decoration_on_configure,
};