Force resize for all edges in rootston
This commit is contained in:
		
							parent
							
								
									9f1ed70b81
								
							
						
					
					
						commit
						2718b57180
					
				|  | @ -275,17 +275,28 @@ static void do_cursor_button_press(struct roots_input *input, | ||||||
| 	if (state == WLR_BUTTON_PRESSED && view && is_meta_pressed(input, device)) { | 	if (state == WLR_BUTTON_PRESSED && view && is_meta_pressed(input, device)) { | ||||||
| 		set_view_focus(input, desktop, view); | 		set_view_focus(input, desktop, view); | ||||||
| 
 | 
 | ||||||
|  | 		uint32_t edges; | ||||||
| 		switch (button) { | 		switch (button) { | ||||||
| 		case BTN_LEFT: | 		case BTN_LEFT: | ||||||
| 			view_begin_move(input, cursor, view); | 			view_begin_move(input, cursor, view); | ||||||
| 			break; | 			break; | ||||||
| 		case BTN_RIGHT: | 		case BTN_RIGHT: | ||||||
| 			view_begin_resize(input, cursor, view, | 			edges = 0; | ||||||
| 				ROOTS_CURSOR_RESIZE_EDGE_RIGHT | | 			if (sx < view->wlr_surface->current->width/2) { | ||||||
| 				ROOTS_CURSOR_RESIZE_EDGE_BOTTOM); | 				edges |= ROOTS_CURSOR_RESIZE_EDGE_LEFT; | ||||||
|  | 			} else { | ||||||
|  | 				edges |= ROOTS_CURSOR_RESIZE_EDGE_RIGHT; | ||||||
|  | 			} | ||||||
|  | 			if (sy < view->wlr_surface->current->height/2) { | ||||||
|  | 				edges |= ROOTS_CURSOR_RESIZE_EDGE_TOP; | ||||||
|  | 			} else { | ||||||
|  | 				edges |= ROOTS_CURSOR_RESIZE_EDGE_BOTTOM; | ||||||
|  | 			} | ||||||
|  | 			view_begin_resize(input, cursor, view, edges); | ||||||
| 			break; | 			break; | ||||||
| 		case BTN_MIDDLE: | 		case BTN_MIDDLE: | ||||||
| 			view_begin_rotate(input, cursor, view); | 			view_begin_rotate(input, cursor, view); | ||||||
|  | 			break; | ||||||
| 		} | 		} | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue