]> git.mdlowis.com Git - proto/labwc.git/commitdiff
cursor: revert 6651d; remove cursor_update_focus()
authorJohan Malm <jgm323@gmail.com>
Mon, 24 Jan 2022 17:51:54 +0000 (17:51 +0000)
committerJohan Malm <jgm323@gmail.com>
Mon, 24 Jan 2022 17:51:54 +0000 (17:51 +0000)
...to ensure new windows receive keyboard focus even if the cursor is
over an existing window.

Fix issue #210

include/labwc.h
src/cursor.c
src/desktop.c

index 2ab577f8d12b3c6aa243b2cc93f9da7a088f2ab0..d0f50ae0cafc9e18484b0fa4d9dc35485660e8e4 100644 (file)
@@ -465,14 +465,6 @@ void cursor_rebase(struct seat *seat, uint32_t time_msec);
  */
 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 cursor_finish(struct seat *seat);
 
index 204d762bb1dda770506387c61aabba7741ac0664..a2e29f04a1e666f24a9fe773f67ecca0c6db1b2f 100644 (file)
@@ -280,20 +280,6 @@ 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)
 {
index f542953c645efe180fbdece6a162e73bb8877ffd..d24ddd35038cc9cc6b7e705278686a1a146a1afc 100644 (file)
@@ -61,7 +61,6 @@ desktop_move_to_front(struct view *view)
 #if HAVE_XWAYLAND
        move_xwayland_sub_views_to_front(view);
 #endif
-       cursor_update_focus(view->server);
 }
 
 static void