@ -864,18 +864,13 @@ create_client(void)
return client ;
return client ;
}
}
struct cli ent *
struct surfa ce *
create_client_and_ test_surface ( int x , int y , int width , int heigh t)
create_test_surface ( struct client * clien t)
{
{
struct client * client ;
struct surface * surface ;
struct surface * surface ;
pixman_color_t color = { 16384 , 16384 , 16384 , 16384 } ; /* uint16_t */
pixman_image_t * solid ;
client = create_client ( ) ;
/* initialize the client surface */
surface = xzalloc ( sizeof * surface ) ;
surface = xzalloc ( sizeof * surface ) ;
surface - > wl_surface =
surface - > wl_surface =
wl_compositor_create_surface ( client - > wl_compositor ) ;
wl_compositor_create_surface ( client - > wl_compositor ) ;
assert ( surface - > wl_surface ) ;
assert ( surface - > wl_surface ) ;
@ -883,9 +878,25 @@ create_client_and_test_surface(int x, int y, int width, int height)
wl_surface_add_listener ( surface - > wl_surface , & surface_listener ,
wl_surface_add_listener ( surface - > wl_surface , & surface_listener ,
surface ) ;
surface ) ;
client - > surface = surface ;
wl_surface_set_user_data ( surface - > wl_surface , surface ) ;
wl_surface_set_user_data ( surface - > wl_surface , surface ) ;
return surface ;
}
struct client *
create_client_and_test_surface ( int x , int y , int width , int height )
{
struct client * client ;
struct surface * surface ;
pixman_color_t color = { 16384 , 16384 , 16384 , 16384 } ; /* uint16_t */
pixman_image_t * solid ;
client = create_client ( ) ;
/* initialize the client surface */
surface = create_test_surface ( client ) ;
client - > surface = surface ;
surface - > width = width ;
surface - > width = width ;
surface - > height = height ;
surface - > height = height ;
surface - > buffer = create_shm_buffer_a8r8g8b8 ( client , width , height ) ;
surface - > buffer = create_shm_buffer_a8r8g8b8 ( client , width , height ) ;