return output;
}
+/*
+ * Returns the output containing the given container.
+ */
+static Output *get_output_of_con(Con *con) {
+ Con *output_con = con_get_output(con);
+ Output *output = get_output_by_name(output_con->name);
+ assert(output != NULL);
+
+ return output;
+}
+
/*
* Checks whether we switched to a new workspace and returns false in that case,
* signaling that further workspace switching should be done by the calling function
// TODO: fix the handling of criteria
TAILQ_FOREACH(current, &owindows, owindows)
- current_output = get_output_containing(current->con->rect.x, current->con->rect.y);
+ current_output = get_output_of_con(current->con);
assert(current_output != NULL);
owindow *current;
TAILQ_FOREACH(current, &owindows, owindows) {
- Output *current_output = get_output_containing(current->con->rect.x,
- current->con->rect.y);
+ Output *current_output = get_output_of_con(current->con);
if (!current_output) {
ELOG("Cannot get current output. This is a bug in i3.\n");
ysuccess(false);
Output *output;
TAILQ_FOREACH(current, &owindows, owindows)
- current_output = get_output_containing(current->con->rect.x, current->con->rect.y);
+ current_output = get_output_of_con(current->con);
assert(current_output != NULL);
output = get_output_from_string(current_output, name);