mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
cursor: add cursor_update_focus()
...and call it from desktop_move_to_front() in order force an enter event on the surface below the cursor when cycling views. Inspired by PR #164 - just restructured it a bit. Suggested-by: @bi4k8
This commit is contained in:
parent
8d070ab2f4
commit
6651d45ed4
3 changed files with 24 additions and 0 deletions
14
src/cursor.c
14
src/cursor.c
|
|
@ -256,6 +256,20 @@ process_cursor_motion(struct server *server, uint32_t time)
|
|||
}
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
msec(const struct timespec *t)
|
||||
{
|
||||
return t->tv_sec * 1000 + t->tv_nsec / 1000000;
|
||||
}
|
||||
|
||||
void
|
||||
cursor_update_focus(struct server *server)
|
||||
{
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
process_cursor_motion(server, msec(&now));
|
||||
}
|
||||
|
||||
void
|
||||
start_drag(struct wl_listener *listener, void *data)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue