diff options
Diffstat (limited to 'Source/3rdParty/SDL2/src/video/wayland/SDL_waylandevents.c')
-rw-r--r-- | Source/3rdParty/SDL2/src/video/wayland/SDL_waylandevents.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Source/3rdParty/SDL2/src/video/wayland/SDL_waylandevents.c b/Source/3rdParty/SDL2/src/video/wayland/SDL_waylandevents.c index 53453a2..0c953a5 100644 --- a/Source/3rdParty/SDL2/src/video/wayland/SDL_waylandevents.c +++ b/Source/3rdParty/SDL2/src/video/wayland/SDL_waylandevents.c @@ -40,6 +40,7 @@ #include "pointer-constraints-unstable-v1-client-protocol.h" #include "relative-pointer-unstable-v1-client-protocol.h" +#include "xdg-shell-client-protocol.h" #include "xdg-shell-unstable-v6-client-protocol.h" #include <linux/input.h> @@ -177,6 +178,8 @@ Wayland_PumpEvents(_THIS) { SDL_VideoData *d = _this->driverdata; + WAYLAND_wl_display_flush(d->display); + if (SDL_IOReady(WAYLAND_wl_display_get_fd(d->display), SDL_FALSE, 0)) { WAYLAND_wl_display_dispatch(d->display); } @@ -263,7 +266,9 @@ ProcessHitTest(struct SDL_WaylandInput *input, uint32_t serial) switch (rc) { case SDL_HITTEST_DRAGGABLE: - if (input->display->shell.zxdg) { + if (input->display->shell.xdg) { + xdg_toplevel_move(window_data->shell_surface.xdg.roleobj.toplevel, input->seat, serial); + } else if (input->display->shell.zxdg) { zxdg_toplevel_v6_move(window_data->shell_surface.zxdg.roleobj.toplevel, input->seat, serial); } else { wl_shell_surface_move(window_data->shell_surface.wl, input->seat, serial); @@ -278,7 +283,9 @@ ProcessHitTest(struct SDL_WaylandInput *input, uint32_t serial) case SDL_HITTEST_RESIZE_BOTTOM: case SDL_HITTEST_RESIZE_BOTTOMLEFT: case SDL_HITTEST_RESIZE_LEFT: - if (input->display->shell.zxdg) { + if (input->display->shell.xdg) { + xdg_toplevel_resize(window_data->shell_surface.xdg.roleobj.toplevel, input->seat, serial, directions_zxdg[rc - SDL_HITTEST_RESIZE_TOPLEFT]); + } else if (input->display->shell.zxdg) { zxdg_toplevel_v6_resize(window_data->shell_surface.zxdg.roleobj.toplevel, input->seat, serial, directions_zxdg[rc - SDL_HITTEST_RESIZE_TOPLEFT]); } else { wl_shell_surface_resize(window_data->shell_surface.wl, input->seat, serial, directions_wl[rc - SDL_HITTEST_RESIZE_TOPLEFT]); @@ -742,7 +749,7 @@ static const struct wl_data_offer_listener data_offer_listener = { static void data_device_handle_data_offer(void *data, struct wl_data_device *wl_data_device, - struct wl_data_offer *id) + struct wl_data_offer *id) { SDL_WaylandDataOffer *data_offer = NULL; @@ -760,7 +767,7 @@ data_device_handle_data_offer(void *data, struct wl_data_device *wl_data_device, static void data_device_handle_enter(void *data, struct wl_data_device *wl_data_device, - uint32_t serial, struct wl_surface *surface, + uint32_t serial, struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct wl_data_offer *id) { SDL_WaylandDataDevice *data_device = data; @@ -803,7 +810,7 @@ data_device_handle_leave(void *data, struct wl_data_device *wl_data_device) static void data_device_handle_motion(void *data, struct wl_data_device *wl_data_device, - uint32_t time, wl_fixed_t x, wl_fixed_t y) + uint32_t time, wl_fixed_t x, wl_fixed_t y) { } @@ -842,7 +849,7 @@ data_device_handle_drop(void *data, struct wl_data_device *wl_data_device) static void data_device_handle_selection(void *data, struct wl_data_device *wl_data_device, - struct wl_data_offer *id) + struct wl_data_offer *id) { SDL_WaylandDataDevice *data_device = data; SDL_WaylandDataOffer *offer = NULL; |