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:
Johan Malm 2021-12-26 22:09:41 +00:00
parent 8d070ab2f4
commit 6651d45ed4
3 changed files with 24 additions and 0 deletions

View file

@ -441,6 +441,15 @@ void cursor_rebase(struct seat *seat, uint32_t time_msec);
* @cursor_name - name of cursor, for example "left_ptr" or "grab"
*/
void cursor_set(struct seat *seat, const char *cursor_name);
/**
* cursor_update_focus - update cursor focus
* @server - server
* Use it to force an update of the cursor icon and to send an enter event
* to the surface below the cursor.
*/
void cursor_update_focus(struct server *server);
void cursor_init(struct seat *seat);
void keyboard_init(struct seat *seat);