mirror of
https://github.com/labwc/labwc.git
synced 2026-04-09 08:21:18 -04:00
server, cursor: Implement relative_pointer_v1
Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
4e05eb70ed
commit
f7c8e2a381
3 changed files with 9 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include <wlr/types/wlr_output_management_v1.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_pointer.h>
|
||||
#include <wlr/types/wlr_relative_pointer_v1.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/types/wlr_server_decoration.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
|
|
@ -142,6 +143,7 @@ struct server {
|
|||
struct wlr_output_configuration_v1 *pending_output_config;
|
||||
|
||||
struct wlr_foreign_toplevel_manager_v1 *foreign_toplevel_manager;
|
||||
struct wlr_relative_pointer_manager_v1 *relative_pointer_manager;
|
||||
|
||||
/* Set when in cycle (alt-tab) mode */
|
||||
struct view *cycle_view;
|
||||
|
|
|
|||
|
|
@ -148,6 +148,11 @@ process_cursor_motion(struct seat *seat, uint32_t time_msec,
|
|||
{
|
||||
struct server *server = seat->server;
|
||||
|
||||
wlr_relative_pointer_manager_v1_send_relative_motion(
|
||||
seat->server->relative_pointer_manager,
|
||||
seat->seat, (uint64_t)time_msec * 1000,
|
||||
dx, dy, dx_unaccel, dy_unaccel);
|
||||
|
||||
/*
|
||||
* The cursor doesn't move unless we tell it to. The cursor
|
||||
* automatically handles constraining the motion to the output layout,
|
||||
|
|
|
|||
|
|
@ -286,6 +286,8 @@ server_init(struct server *server)
|
|||
|
||||
server->foreign_toplevel_manager =
|
||||
wlr_foreign_toplevel_manager_v1_create(server->wl_display);
|
||||
server->relative_pointer_manager =
|
||||
wlr_relative_pointer_manager_v1_create(server->wl_display);
|
||||
|
||||
layers_init(server);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue