Alt+drag: validate WINGs fb hit via context_find
When handle_pointer_button finds a client surface at the pointer (_surf && _tv), it searches frame_list for overlapping WINGs frame_bufs. Previously it used any WINGs fb found, including stale entries with bogus IDs (e.g. 0x1). Now it validates the WINGs fb via context_find() before using it as the event window. If validation fails, the event routes to _tv->id.
This commit is contained in:
parent
0b12c7ad71
commit
34be4b1287
|
|
@ -229,15 +229,11 @@ handle_pointer_button(struct wl_listener *listener, void *data)
|
|||
break;
|
||||
}
|
||||
}
|
||||
wev.window = _wtb ? _wtb->id : _tv->id;
|
||||
WObjDescriptor *_wd = wm_backend->context_find(_wtb->id, WM_CTX_CLIENT_WIN);
|
||||
wev.window = _wd ? _wtb->id : _tv->id;
|
||||
wev.u.button.window = wev.window;
|
||||
wev.u.button.x = (int)_sx;
|
||||
wev.u.button.y = (int)_sy;
|
||||
wwarning("btn-route: ptr=(%d,%d) tv=0x%lx surf=%p sxsy=(%.1f,%.1f) wings_fb=%s final=0x%lx local=(%d,%d)",
|
||||
wl_state.pointer_x, wl_state.pointer_y,
|
||||
(unsigned long)_tv->id, (void*)_surf, _sx, _sy,
|
||||
_wtb ? "yes" : "no", (unsigned long)wev.window,
|
||||
wev.u.button.x, wev.u.button.y);
|
||||
} else {
|
||||
struct wl_frame_buf *fb = frame_buf_hit(wl_state.pointer_x,
|
||||
wl_state.pointer_y);
|
||||
|
|
|
|||
Loading…
Reference in New Issue