mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-24 08:02:21 +00:00
tablet-v2: Event time should be milliseconds
The event time used for zwp_tablet_pad_group_v2_send_mode_switch was tv_nsec / 1000, which is microseconds resetting every whole second. Use get_current_time_msec to get milliseconds including whole seconds.
This commit is contained in:
parent
c5d8f6d187
commit
8bb6935374
@ -7,6 +7,7 @@
|
||||
#include <wlr/types/wlr_tablet_pad.h>
|
||||
#include <wlr/types/wlr_tablet_v2.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/time.h"
|
||||
#include "tablet-v2-protocol.h"
|
||||
|
||||
static const struct wlr_tablet_pad_v2_grab_interface default_pad_grab_interface;
|
||||
@ -457,10 +458,7 @@ uint32_t wlr_send_tablet_v2_tablet_pad_enter(
|
||||
zwp_tablet_pad_v2_send_enter(pad_client->resource, serial,
|
||||
tablet_client->resource, surface->resource);
|
||||
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
uint32_t time = now.tv_nsec / 1000;
|
||||
|
||||
uint32_t time = get_current_time_msec();
|
||||
for (size_t i = 0; i < pad->group_count; ++i) {
|
||||
if (pad_client->groups[i]) {
|
||||
zwp_tablet_pad_group_v2_send_mode_switch(
|
||||
|
Loading…
Reference in New Issue
Block a user