@ -613,7 +613,9 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
} else {
} else {
state_erase_button ( cursor , button ) ;
state_erase_button ( cursor , button ) ;
}
}
if ( seatop_allows_events ( seat ) ) {
seat_pointer_notify_button ( seat , time_msec , button , state ) ;
seat_pointer_notify_button ( seat , time_msec , button , state ) ;
}
return ;
return ;
}
}
@ -682,7 +684,6 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
if ( cont & & resize_edge & & button = = BTN_LEFT & &
if ( cont & & resize_edge & & button = = BTN_LEFT & &
state = = WLR_BUTTON_PRESSED & & ! is_floating ) {
state = = WLR_BUTTON_PRESSED & & ! is_floating ) {
seat_set_focus_container ( seat , cont ) ;
seat_set_focus_container ( seat , cont ) ;
seat_pointer_notify_button ( seat , time_msec , button , state ) ;
seatop_begin_resize_tiling ( seat , cont , button , edge ) ;
seatop_begin_resize_tiling ( seat , cont , button , edge ) ;
return ;
return ;
}
}
@ -713,7 +714,6 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
}
}
cursor_set_image ( seat - > cursor , image , NULL ) ;
cursor_set_image ( seat - > cursor , image , NULL ) ;
seat_set_focus_container ( seat , cont ) ;
seat_set_focus_container ( seat , cont ) ;
seat_pointer_notify_button ( seat , time_msec , button , state ) ;
seatop_begin_resize_tiling ( seat , cont , button , edge ) ;
seatop_begin_resize_tiling ( seat , cont , button , edge ) ;
return ;
return ;
}
}
@ -729,7 +729,6 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
cont = cont - > parent ;
cont = cont - > parent ;
}
}
seat_set_focus_container ( seat , cont ) ;
seat_set_focus_container ( seat , cont ) ;
seat_pointer_notify_button ( seat , time_msec , button , state ) ;
seatop_begin_move_floating ( seat , cont , button ) ;
seatop_begin_move_floating ( seat , cont , button ) ;
return ;
return ;
}
}
@ -740,7 +739,6 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
state = = WLR_BUTTON_PRESSED ) {
state = = WLR_BUTTON_PRESSED ) {
// Via border
// Via border
if ( button = = BTN_LEFT & & resize_edge ! = WLR_EDGE_NONE ) {
if ( button = = BTN_LEFT & & resize_edge ! = WLR_EDGE_NONE ) {
seat_pointer_notify_button ( seat , time_msec , button , state ) ;
seatop_begin_resize_floating ( seat , cont , button , resize_edge ) ;
seatop_begin_resize_floating ( seat , cont , button , resize_edge ) ;
return ;
return ;
}
}
@ -758,7 +756,6 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
WLR_EDGE_RIGHT : WLR_EDGE_LEFT ;
WLR_EDGE_RIGHT : WLR_EDGE_LEFT ;
edge | = cursor - > cursor - > y > floater - > y + floater - > height / 2 ?
edge | = cursor - > cursor - > y > floater - > y + floater - > height / 2 ?
WLR_EDGE_BOTTOM : WLR_EDGE_TOP ;
WLR_EDGE_BOTTOM : WLR_EDGE_TOP ;
seat_pointer_notify_button ( seat , time_msec , button , state ) ;
seatop_begin_resize_floating ( seat , floater , button , edge ) ;
seatop_begin_resize_floating ( seat , floater , button , edge ) ;
return ;
return ;
}
}
@ -775,8 +772,6 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
seat_set_focus ( seat , node ) ;
seat_set_focus ( seat , node ) ;
}
}
seat_pointer_notify_button ( seat , time_msec , button , state ) ;
// If moving a container by it's title bar, use a threshold for the drag
// If moving a container by it's title bar, use a threshold for the drag
if ( ! mod_pressed & & config - > tiling_drag_threshold > 0 ) {
if ( ! mod_pressed & & config - > tiling_drag_threshold > 0 ) {
seatop_begin_move_tiling_threshold ( seat , cont , button ) ;
seatop_begin_move_tiling_threshold ( seat , cont , button ) ;