mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
do not clear/reset focus on the same surface
this regressed in ce38d2d
the previous behavior broke double-click selection in the foot terminal emulator
This commit is contained in:
parent
1d9c9d1afc
commit
ce6e3de7b6
1 changed files with 10 additions and 0 deletions
10
src/cursor.c
10
src/cursor.c
|
|
@ -23,6 +23,16 @@ cursor_rebase(struct seat *seat, uint32_t time_msec)
|
||||||
seat->cursor->y, &surface, &sx, &sy, &view_area);
|
seat->cursor->y, &surface, &sx, &sy, &view_area);
|
||||||
|
|
||||||
if (surface) {
|
if (surface) {
|
||||||
|
struct view *focused_view = desktop_focused_view(seat->server);
|
||||||
|
struct wlr_surface* focused_surface = focused_view
|
||||||
|
? focused_view->surface
|
||||||
|
: NULL;
|
||||||
|
|
||||||
|
/* do not notify unless rebasing changes which surface has focus */
|
||||||
|
if (surface == focused_surface) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
wlr_seat_pointer_notify_clear_focus(seat->seat);
|
wlr_seat_pointer_notify_clear_focus(seat->seat);
|
||||||
wlr_seat_pointer_notify_enter(seat->seat, surface, sx, sy);
|
wlr_seat_pointer_notify_enter(seat->seat, surface, sx, sy);
|
||||||
wlr_seat_pointer_notify_motion(seat->seat, time_msec, sx, sy);
|
wlr_seat_pointer_notify_motion(seat->seat, time_msec, sx, sy);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue