wayland: Add support for relative mouse mode, by Jonas Ådahl <jadahl@gmail.com>
Generate the C protocol files from the protocol XML files installed by wayland-protocols, and use them to implement support for relative pointer motions and pointer locking. Note that at the time, the protocol is unstable and may change in the future. Any future breaking changes will, however, fail gracefully and result in no regressions compared to before this patch.
This commit is contained in:
parent
44760bd0c7
commit
aa51d46bdd
9 changed files with 283 additions and 15 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "../SDL_sysvideo.h"
|
||||
#include "../../events/SDL_windowevents_c.h"
|
||||
#include "../SDL_egl_c.h"
|
||||
#include "SDL_waylandevents_c.h"
|
||||
#include "SDL_waylandwindow.h"
|
||||
#include "SDL_waylandvideo.h"
|
||||
#include "SDL_waylandtouch.h"
|
||||
|
@ -215,6 +216,10 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window)
|
|||
wl_surface_set_opaque_region(data->surface, region);
|
||||
wl_region_destroy(region);
|
||||
|
||||
if (c->relative_mouse_mode) {
|
||||
Wayland_input_lock_pointer(c->input);
|
||||
}
|
||||
|
||||
WAYLAND_wl_display_flush(c->display);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue