@ -23,6 +23,8 @@ static bool output_set_hardware_cursor(struct wlr_output *output,
return false ;
return false ;
}
}
wlr_output_update_needs_frame ( output ) ;
wlr_buffer_unlock ( output - > cursor_front_buffer ) ;
wlr_buffer_unlock ( output - > cursor_front_buffer ) ;
output - > cursor_front_buffer = NULL ;
output - > cursor_front_buffer = NULL ;
@ -33,6 +35,15 @@ static bool output_set_hardware_cursor(struct wlr_output *output,
return true ;
return true ;
}
}
static bool output_move_hardware_cursor ( struct wlr_output * output , int x , int y ) {
assert ( output - > impl - > move_cursor ) ;
if ( ! output - > impl - > move_cursor ( output , x , y ) ) {
return false ;
}
wlr_output_update_needs_frame ( output ) ;
return true ;
}
static void output_cursor_damage_whole ( struct wlr_output_cursor * cursor ) ;
static void output_cursor_damage_whole ( struct wlr_output_cursor * cursor ) ;
static void output_disable_hardware_cursor ( struct wlr_output * output ) {
static void output_disable_hardware_cursor ( struct wlr_output * output ) {
@ -302,8 +313,7 @@ static bool output_cursor_attempt_hardware(struct wlr_output_cursor *cursor) {
// If the cursor was hidden or was a software cursor, the hardware
// If the cursor was hidden or was a software cursor, the hardware
// cursor position is outdated
// cursor position is outdated
output - > impl - > move_cursor ( cursor - > output ,
output_move_hardware_cursor ( cursor - > output , ( int ) cursor - > x , ( int ) cursor - > y ) ;
( int ) cursor - > x , ( int ) cursor - > y ) ;
struct wlr_buffer * buffer = NULL ;
struct wlr_buffer * buffer = NULL ;
if ( texture ! = NULL ) {
if ( texture ! = NULL ) {
@ -455,8 +465,7 @@ bool wlr_output_cursor_move(struct wlr_output_cursor *cursor,
return true ;
return true ;
}
}
assert ( cursor - > output - > impl - > move_cursor ) ;
return output_move_hardware_cursor ( cursor - > output , ( int ) x , ( int ) y ) ;
return cursor - > output - > impl - > move_cursor ( cursor - > output , ( int ) x , ( int ) y ) ;
}
}
struct wlr_output_cursor * wlr_output_cursor_create ( struct wlr_output * output ) {
struct wlr_output_cursor * wlr_output_cursor_create ( struct wlr_output * output ) {