@ -2205,6 +2205,10 @@ set_fullscreen(struct shell_surface *shsurf,
* called from configure . */
* called from configure . */
}
}
static void
weston_view_set_initial_position ( struct weston_view * view ,
struct desktop_shell * shell ) ;
static void
static void
unset_fullscreen ( struct shell_surface * shsurf )
unset_fullscreen ( struct shell_surface * shsurf )
{
{
@ -2225,8 +2229,12 @@ unset_fullscreen(struct shell_surface *shsurf)
weston_surface_destroy ( shsurf - > fullscreen . black_view - > surface ) ;
weston_surface_destroy ( shsurf - > fullscreen . black_view - > surface ) ;
shsurf - > fullscreen . black_view = NULL ;
shsurf - > fullscreen . black_view = NULL ;
if ( shsurf - > saved_position_valid )
weston_view_set_position ( shsurf - > view ,
weston_view_set_position ( shsurf - > view ,
shsurf - > saved_x , shsurf - > saved_y ) ;
shsurf - > saved_x , shsurf - > saved_y ) ;
else
weston_view_set_initial_position ( shsurf - > view , shsurf - > shell ) ;
if ( shsurf - > saved_rotation_valid ) {
if ( shsurf - > saved_rotation_valid ) {
wl_list_insert ( & shsurf - > view - > geometry . transformation_list ,
wl_list_insert ( & shsurf - > view - > geometry . transformation_list ,
& shsurf - > rotation . transform . link ) ;
& shsurf - > rotation . transform . link ) ;
@ -2323,9 +2331,12 @@ unset_maximized(struct shell_surface *shsurf)
{
{
/* undo all maximized things here */
/* undo all maximized things here */
shsurf - > output = get_default_output ( shsurf - > surface - > compositor ) ;
shsurf - > output = get_default_output ( shsurf - > surface - > compositor ) ;
if ( shsurf - > saved_position_valid )
weston_view_set_position ( shsurf - > view ,
weston_view_set_position ( shsurf - > view ,
shsurf - > saved_x ,
shsurf - > saved_x , shsurf - > saved_y ) ;
shsurf - > saved_y ) ;
else
weston_view_set_initial_position ( shsurf - > view , shsurf - > shell ) ;
if ( shsurf - > saved_rotation_valid ) {
if ( shsurf - > saved_rotation_valid ) {
wl_list_insert ( & shsurf - > view - > geometry . transformation_list ,
wl_list_insert ( & shsurf - > view - > geometry . transformation_list ,
@ -2907,6 +2918,8 @@ shell_handle_surface_destroy(struct wl_listener *listener, void *data)
static void
static void
shell_surface_configure ( struct weston_surface * , int32_t , int32_t ) ;
shell_surface_configure ( struct weston_surface * , int32_t , int32_t ) ;
static void
shell_surface_output_destroyed ( struct weston_surface * ) ;
struct shell_surface *
struct shell_surface *
get_shell_surface ( struct weston_surface * surface )
get_shell_surface ( struct weston_surface * surface )
@ -2943,6 +2956,7 @@ create_common_surface(void *shell, struct weston_surface *surface,
surface - > configure = shell_surface_configure ;
surface - > configure = shell_surface_configure ;
surface - > configure_private = shsurf ;
surface - > configure_private = shsurf ;
surface - > output_destroyed = shell_surface_output_destroyed ;
shsurf - > shell = ( struct desktop_shell * ) shell ;
shsurf - > shell = ( struct desktop_shell * ) shell ;
shsurf - > unresponsive = 0 ;
shsurf - > unresponsive = 0 ;
@ -4955,6 +4969,14 @@ shell_surface_configure(struct weston_surface *es, int32_t sx, int32_t sy)
}
}
}
}
static void
shell_surface_output_destroyed ( struct weston_surface * es )
{
struct shell_surface * shsurf = get_shell_surface ( es ) ;
shsurf - > saved_position_valid = false ;
}
static void launch_desktop_shell_process ( void * data ) ;
static void launch_desktop_shell_process ( void * data ) ;
static void
static void