@ -13,14 +13,14 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
return error ;
return error ;
}
}
if ( ! root - > outputs - > length ) {
if ( ! root - > outputs - > length ) {
return cmd_results_new ( CMD_ INVALID , " fullscreen " ,
return cmd_results_new ( CMD_ FAILURE , " fullscreen " ,
" Can't run this command while there's no outputs connected. " ) ;
" Can't run this command while there's no outputs connected. " ) ;
}
}
struct sway_node * node = config - > handler_context . node ;
struct sway_node * node = config - > handler_context . node ;
struct sway_container * container = config - > handler_context . container ;
struct sway_container * container = config - > handler_context . container ;
struct sway_workspace * workspace = config - > handler_context . workspace ;
struct sway_workspace * workspace = config - > handler_context . workspace ;
if ( node - > type = = N_WORKSPACE & & workspace - > tiling - > length = = 0 ) {
if ( node - > type = = N_WORKSPACE & & workspace - > tiling - > length = = 0 ) {
return cmd_results_new ( CMD_ INVALID , " fullscreen " ,
return cmd_results_new ( CMD_ FAILURE , " fullscreen " ,
" Can't fullscreen an empty workspace " ) ;
" Can't fullscreen an empty workspace " ) ;
}
}
if ( node - > type = = N_WORKSPACE ) {
if ( node - > type = = N_WORKSPACE ) {