@ -53,6 +53,7 @@ struct resizor {
struct spring height ;
struct spring height ;
struct wl_callback * frame_callback ;
struct wl_callback * frame_callback ;
bool pointer_locked ;
bool pointer_locked ;
bool locked_frame_callback_registered ;
struct input * locked_input ;
struct input * locked_input ;
float pointer_x ;
float pointer_x ;
float pointer_y ;
float pointer_y ;
@ -330,11 +331,15 @@ button_handler(struct widget *widget,
handle_pointer_unlocked ) ;
handle_pointer_unlocked ) ;
resizor - > locked_input = input ;
resizor - > locked_input = input ;
if ( resizor - > locked_frame_callback_registered )
return ;
surface = window_get_wl_surface ( resizor - > window ) ;
surface = window_get_wl_surface ( resizor - > window ) ;
callback = wl_surface_frame ( surface ) ;
callback = wl_surface_frame ( surface ) ;
wl_callback_add_listener ( callback ,
wl_callback_add_listener ( callback ,
& locked_pointer_frame_listener ,
& locked_pointer_frame_listener ,
resizor ) ;
resizor ) ;
resizor - > locked_frame_callback_registered = true ;
} else if ( button = = BTN_LEFT & &
} else if ( button = = BTN_LEFT & &
state = = WL_POINTER_BUTTON_STATE_RELEASED ) {
state = = WL_POINTER_BUTTON_STATE_RELEASED ) {
input_set_pointer_image ( input , CURSOR_LEFT_PTR ) ;
input_set_pointer_image ( input , CURSOR_LEFT_PTR ) ;