]> git.sur5r.net Git - i3/i3/blobdiff - src/fake_outputs.c
Introduce output_primary_name function
[i3/i3] / src / fake_outputs.c
index 4f2740992b9540639b0fd5009a1a95382487129e..93e00e729f27c4c47a0b421e51c501062c54bc06 100644 (file)
@@ -1,10 +1,8 @@
-#undef I3__FILE__
-#define I3__FILE__ "fake_outputs.c"
 /*
  * vim:ts=4:sw=4:expandtab
  *
  * i3 - an improved dynamic tiling window manager
- * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
  *
  * Faking outputs is useful in pathological situations (like network X servers
  * which don’t support multi-monitor in a useful way) and for our testsuite.
@@ -49,9 +47,9 @@ void fake_outputs_init(const char *output_spec) {
             new_output->rect.width = min(new_output->rect.width, width);
             new_output->rect.height = min(new_output->rect.height, height);
         } else {
-            new_output = scalloc(sizeof(Output));
+            new_output = scalloc(1, sizeof(Output));
             sasprintf(&(new_output->name), "fake-%d", num_screens);
-            DLOG("Created new fake output %s (%p)\n", new_output->name, new_output);
+            DLOG("Created new fake output %s (%p)\n", output_primary_name(new_output), new_output);
             new_output->active = true;
             new_output->rect.x = x;
             new_output->rect.y = y;