Add swaybar basics

This should make the bar open and appear as the panel, once sway
supports panels. Right now it crashes sway!
This commit is contained in:
Drew DeVault 2015-11-29 10:58:18 -05:00
parent 63cf8e48c4
commit 60e76cf932
2 changed files with 97 additions and 4 deletions

View file

@ -49,12 +49,10 @@ int main(int argc, const char **argv) {
sway_log(L_INFO, "Using output %d of %d", desired_output, registry->outputs->length);
int i;
struct output_state *output = registry->outputs->items[desired_output];
struct window *window = window_setup(registry, 100, 100, false);
struct window *window = window_setup(registry, output->width, output->height, false);
if (!window) {
sway_abort("Failed to create surfaces.");
}
window->width = output->width;
window->height = output->height;
desktop_shell_set_background(registry->desktop_shell, output->output, window->surface);
list_add(surfaces, window);