#include "all.h"
/*
- * Returns the output container below the given output container.
+ * Returns the content container below the given output container.
*
*/
Con *output_get_content(Con *output) {
*
*/
char *output_primary_name(Output *output) {
- return output->name;
+ return SLIST_FIRST(&output->names_head)->name;
}
Output *get_output_for_con(Con *con) {
continue;
if (con_is_sticky(current)) {
- con_move_to_workspace(current, visible_ws, true, false, current != to_focus->parent);
+ bool ignore_focus = (to_focus == NULL) || (current != to_focus->parent);
+ con_move_to_workspace(current, visible_ws, true, false, ignore_focus);
+ if (!ignore_focus) {
+ Con *current_ws = con_get_workspace(focused);
+ con_activate(con_descend_focused(current));
+ /* Pushing sticky windows shouldn't change the focused workspace. */
+ con_activate(con_descend_focused(current_ws));
+ }
}
}
}