@ -369,16 +369,13 @@ void view_set_activated(struct sway_view *view, bool activated) {
void view_request_activate ( struct sway_view * view , struct sway_seat * seat ) {
void view_request_activate ( struct sway_view * view , struct sway_seat * seat ) {
struct sway_workspace * ws = view - > container - > pending . workspace ;
struct sway_workspace * ws = view - > container - > pending . workspace ;
if ( ! ws ) { // hidden scratchpad container
return ;
}
if ( ! seat ) {
if ( ! seat ) {
seat = input_manager_current_seat ( ) ;
seat = input_manager_current_seat ( ) ;
}
}
switch ( config - > focus_on_window_activation ) {
switch ( config - > focus_on_window_activation ) {
case FOWA_SMART :
case FOWA_SMART :
if ( workspace_is_visible ( ws ) ) {
if ( ws & & workspace_is_visible ( ws ) ) {
seat_set_focus_container ( seat , view - > container ) ;
seat_set_focus_container ( seat , view - > container ) ;
container_raise_floating ( view - > container ) ;
container_raise_floating ( view - > container ) ;
} else {
} else {
@ -389,8 +386,12 @@ void view_request_activate(struct sway_view *view, struct sway_seat *seat) {
view_set_urgent ( view , true ) ;
view_set_urgent ( view , true ) ;
break ;
break ;
case FOWA_FOCUS :
case FOWA_FOCUS :
seat_set_focus_container ( seat , view - > container ) ;
if ( container_is_scratchpad_hidden_or_child ( view - > container ) ) {
container_raise_floating ( view - > container ) ;
root_scratchpad_show ( view - > container ) ;
} else {
seat_set_focus_container ( seat , view - > container ) ;
container_raise_floating ( view - > container ) ;
}
break ;
break ;
case FOWA_NONE :
case FOWA_NONE :
break ;
break ;