mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-25 06:59:42 -05:00
relative_pointer: implementation and code fixes
In particular, modified public creator and destructor function names, added a display destroy listener, safely extract user data from resources, send correct time (in usecs) in rootston, etc.
This commit is contained in:
parent
42ffa413fb
commit
68137dca3f
7 changed files with 96 additions and 53 deletions
|
|
@ -311,7 +311,7 @@ void roots_cursor_handle_motion(struct roots_cursor *cursor,
|
|||
double dy = event->delta_y;
|
||||
|
||||
wlr_seat_pointer_notify_relative_motion(cursor->seat->seat,
|
||||
(uint64_t)event->time_msec, dx, dy, dx, dy);
|
||||
(uint64_t)event->time_msec * 1000, dx, dy, dx, dy);
|
||||
|
||||
if (cursor->active_constraint) {
|
||||
struct roots_view *view = cursor->pointer_view->view;
|
||||
|
|
@ -355,7 +355,7 @@ void roots_cursor_handle_motion_absolute(struct roots_cursor *cursor,
|
|||
double dx = lx - cursor->cursor->x;
|
||||
double dy = ly - cursor->cursor->y;
|
||||
wlr_seat_pointer_notify_relative_motion(cursor->seat->seat,
|
||||
(uint64_t)event->time_msec, dx, dy, dx, dy);
|
||||
(uint64_t)event->time_msec * 1000, dx, dy, dx, dy);
|
||||
|
||||
if (cursor->pointer_view) {
|
||||
struct roots_view *view = cursor->pointer_view->view;
|
||||
|
|
|
|||
|
|
@ -1082,7 +1082,7 @@ struct roots_desktop *desktop_create(struct roots_server *server,
|
|||
desktop->foreign_toplevel_manager_v1 =
|
||||
wlr_foreign_toplevel_manager_v1_create(server->wl_display);
|
||||
desktop->relative_pointer_manager =
|
||||
wlr_relative_pointer_v1_create(server->wl_display);
|
||||
wlr_relative_pointer_manager_v1_create(server->wl_display);
|
||||
|
||||
return desktop;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue