*/
#include "all.h"
-typedef enum { BEFORE,
- AFTER } position_t;
-
/*
* Returns the lowest container in the tree that has both a and b as descendants.
*
* after 'target'.
*
*/
-static void insert_con_into(Con *con, Con *target, position_t position) {
+void insert_con_into(Con *con, Con *target, position_t position) {
Con *parent = target->parent;
/* We need to preserve the old con->parent. While it might still be used to
* insert the entry before/after it, we call the on_remove_child callback
return;
}
- if (con->parent->type == CT_WORKSPACE && con_num_children(con->parent) == 1) {
+ if (con->fullscreen_mode == CF_GLOBAL) {
+ DLOG("Not moving fullscreen global container\n");
+ return;
+ }
+
+ if ((con->fullscreen_mode == CF_OUTPUT) ||
+ (con->parent->type == CT_WORKSPACE && con_num_children(con->parent) == 1)) {
/* This is the only con on this workspace */
move_to_output_directed(con, direction);
return;