@ -356,7 +356,7 @@ shell_touch_grab_start(struct shell_touch_grab *grab,
struct weston_touch * touch )
struct weston_touch * touch )
{
{
struct desktop_shell * shell = shsurf - > shell ;
struct desktop_shell * shell = shsurf - > shell ;
grab - > grab . interface = interface ;
grab - > grab . interface = interface ;
grab - > shsurf = shsurf ;
grab - > shsurf = shsurf ;
grab - > shsurf_destroy_listener . notify = destroy_shell_grab_shsurf ;
grab - > shsurf_destroy_listener . notify = destroy_shell_grab_shsurf ;
@ -1506,14 +1506,14 @@ common_surface_move(struct wl_resource *resource,
seat - > pointer - > button_count > 0 & &
seat - > pointer - > button_count > 0 & &
seat - > pointer - > grab_serial = = serial ) {
seat - > pointer - > grab_serial = = serial ) {
surface = weston_surface_get_main_surface ( seat - > pointer - > focus - > surface ) ;
surface = weston_surface_get_main_surface ( seat - > pointer - > focus - > surface ) ;
if ( ( surface = = shsurf - > surface ) & &
if ( ( surface = = shsurf - > surface ) & &
( surface_move ( shsurf , seat ) < 0 ) )
( surface_move ( shsurf , seat ) < 0 ) )
wl_resource_post_no_memory ( resource ) ;
wl_resource_post_no_memory ( resource ) ;
} else if ( seat - > touch & &
} else if ( seat - > touch & &
seat - > touch - > focus & &
seat - > touch - > focus & &
seat - > touch - > grab_serial = = serial ) {
seat - > touch - > grab_serial = = serial ) {
surface = weston_surface_get_main_surface ( seat - > touch - > focus - > surface ) ;
surface = weston_surface_get_main_surface ( seat - > touch - > focus - > surface ) ;
if ( ( surface = = shsurf - > surface ) & &
if ( ( surface = = shsurf - > surface ) & &
( surface_touch_move ( shsurf , seat ) < 0 ) )
( surface_touch_move ( shsurf , seat ) < 0 ) )
wl_resource_post_no_memory ( resource ) ;
wl_resource_post_no_memory ( resource ) ;
}
}
@ -1578,6 +1578,8 @@ send_configure(struct weston_surface *surface,
{
{
struct shell_surface * shsurf = get_shell_surface ( surface ) ;
struct shell_surface * shsurf = get_shell_surface ( surface ) ;
assert ( shsurf ) ;
wl_shell_surface_send_configure ( shsurf - > resource ,
wl_shell_surface_send_configure ( shsurf - > resource ,
edges , width , height ) ;
edges , width , height ) ;
}
}
@ -3258,6 +3260,8 @@ xdg_send_configure(struct weston_surface *surface,
{
{
struct shell_surface * shsurf = get_shell_surface ( surface ) ;
struct shell_surface * shsurf = get_shell_surface ( surface ) ;
assert ( shsurf ) ;
xdg_surface_send_configure ( shsurf - > resource , edges , width , height ) ;
xdg_surface_send_configure ( shsurf - > resource , edges , width , height ) ;
}
}
@ -4226,6 +4230,8 @@ activate(struct desktop_shell *shell, struct weston_surface *es,
wl_signal_add ( & es - > destroy_signal , & state - > surface_destroy_listener ) ;
wl_signal_add ( & es - > destroy_signal , & state - > surface_destroy_listener ) ;
shsurf = get_shell_surface ( main_surface ) ;
shsurf = get_shell_surface ( main_surface ) ;
assert ( shsurf ) ;
if ( shsurf - > state . fullscreen )
if ( shsurf - > state . fullscreen )
shell_configure_fullscreen ( shsurf ) ;
shell_configure_fullscreen ( shsurf ) ;
else
else
@ -4238,7 +4244,7 @@ activate(struct desktop_shell *shell, struct weston_surface *es,
/* Update the surface’s layer. This brings it to the top of the stacking
/* Update the surface’s layer. This brings it to the top of the stacking
* order as appropriate . */
* order as appropriate . */
shell_surface_update_layer ( get_ shell_ surface ( main_surface ) ) ;
shell_surface_update_layer ( shsurf ) ;
}
}
/* no-op func for checking black surface */
/* no-op func for checking black surface */
@ -4716,6 +4722,8 @@ configure(struct desktop_shell *shell, struct weston_surface *surface,
shsurf = get_shell_surface ( surface ) ;
shsurf = get_shell_surface ( surface ) ;
assert ( shsurf ) ;
if ( shsurf - > state . fullscreen )
if ( shsurf - > state . fullscreen )
shell_configure_fullscreen ( shsurf ) ;
shell_configure_fullscreen ( shsurf ) ;
else if ( shsurf - > state . maximized ) {
else if ( shsurf - > state . maximized ) {
@ -4744,10 +4752,13 @@ static void
shell_surface_configure ( struct weston_surface * es , int32_t sx , int32_t sy )
shell_surface_configure ( struct weston_surface * es , int32_t sx , int32_t sy )
{
{
struct shell_surface * shsurf = get_shell_surface ( es ) ;
struct shell_surface * shsurf = get_shell_surface ( es ) ;
struct desktop_shell * shell = shsurf - > shell ;
struct desktop_shell * shell ;
int type_changed = 0 ;
int type_changed = 0 ;
assert ( shsurf ) ;
shell = shsurf - > shell ;
if ( ! weston_surface_is_mapped ( es ) & &
if ( ! weston_surface_is_mapped ( es ) & &
! wl_list_empty ( & shsurf - > popup . grab_link ) ) {
! wl_list_empty ( & shsurf - > popup . grab_link ) ) {
remove_popup_grab ( shsurf ) ;
remove_popup_grab ( shsurf ) ;
@ -4784,6 +4795,8 @@ shell_surface_output_destroyed(struct weston_surface *es)
{
{
struct shell_surface * shsurf = get_shell_surface ( es ) ;
struct shell_surface * shsurf = get_shell_surface ( es ) ;
assert ( shsurf ) ;
shsurf - > saved_position_valid = false ;
shsurf - > saved_position_valid = false ;
shsurf - > next_state . maximized = false ;
shsurf - > next_state . maximized = false ;
shsurf - > next_state . fullscreen = false ;
shsurf - > next_state . fullscreen = false ;