mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04: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
1 changed files with 2 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue