mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-03 09:01:40 -05:00
xwayland: remove loop to find drag focus surface
We can just use wlr_xwayland_surface_try_from_wlr_surface() here
instead.
(cherry picked from commit a7ebe7c026)
This commit is contained in:
parent
885bf8f5e8
commit
1fc9409df2
1 changed files with 1 additions and 8 deletions
|
|
@ -271,14 +271,7 @@ static void seat_handle_drag_focus(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
struct wlr_xwayland_surface *focus = NULL;
|
struct wlr_xwayland_surface *focus = NULL;
|
||||||
if (drag->focus != NULL) {
|
if (drag->focus != NULL) {
|
||||||
// TODO: check for subsurfaces?
|
focus = wlr_xwayland_surface_try_from_wlr_surface(drag->focus);
|
||||||
struct wlr_xwayland_surface *surface;
|
|
||||||
wl_list_for_each(surface, &xwm->surfaces, link) {
|
|
||||||
if (surface->surface == drag->focus) {
|
|
||||||
focus = surface;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xwm_set_drag_focus(xwm, focus);
|
xwm_set_drag_focus(xwm, focus);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue