* This allows to keep dragging a scrollbar or selecting text even
* when moving outside of the window.
*
+ * It is also used to:
+ * - determine the target view for action in "Drag" mousebind
+ * - validate view move/resize requests from CSD clients
+ *
* Both (view && !surface) and (surface && !view) are possible.
*/
struct {
* want.
*/
struct view *view = wl_container_of(listener, view, request_move);
- interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
+ if (view == view->server->seat.pressed.view) {
+ interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
+ }
}
static void
*/
struct wlr_xdg_toplevel_resize_event *event = data;
struct view *view = wl_container_of(listener, view, request_resize);
- interactive_begin(view, LAB_INPUT_STATE_RESIZE, event->edges);
+ if (view == view->server->seat.pressed.view) {
+ interactive_begin(view, LAB_INPUT_STATE_RESIZE, event->edges);
+ }
}
static void
* want.
*/
struct view *view = wl_container_of(listener, view, request_move);
- interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
+ if (view == view->server->seat.pressed.view) {
+ interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
+ }
}
static void
*/
struct wlr_xwayland_resize_event *event = data;
struct view *view = wl_container_of(listener, view, request_resize);
- interactive_begin(view, LAB_INPUT_STATE_RESIZE, event->edges);
+ if (view == view->server->seat.pressed.view) {
+ interactive_begin(view, LAB_INPUT_STATE_RESIZE, event->edges);
+ }
}
static void