swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit e8a836cf258af9397fd7442259bc2ffd5cb8c48c
parent 58622c75a490f0cab0aafea0132a2184feb4bef1
Author: Michael Forney <mforney@mforney.org>
Date:   Sun, 24 Nov 2013 02:28:12 -0800

Use global state for display and event_loop

Diffstat:
Mlibswc/shell.c | 7++++---
Mlibswc/shell.h | 4+---
Mlibswc/swc.c | 2+-
3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/libswc/shell.c b/libswc/shell.c @@ -23,6 +23,7 @@ #include "shell.h" #include "shell_surface.h" +#include "private.h" #include <wayland-server.h> @@ -60,10 +61,10 @@ static void bind_shell(struct wl_client * client, void * data, wl_resource_set_implementation(resource, &shell_implementation, NULL, NULL); } -bool swc_shell_initialize(struct wl_display * display) +bool swc_shell_initialize() { - shell.global = wl_global_create(display, &wl_shell_interface, 1, NULL, - &bind_shell); + shell.global = wl_global_create(swc.display, &wl_shell_interface, 1, + NULL, &bind_shell); return shell.global; } diff --git a/libswc/shell.h b/libswc/shell.h @@ -26,9 +26,7 @@ #include <stdbool.h> -struct wl_display; - -bool swc_shell_initialize(struct wl_display * display); +bool swc_shell_initialize(); void swc_shell_finalize(); #endif diff --git a/libswc/swc.c b/libswc/swc.c @@ -64,7 +64,7 @@ bool swc_initialize(struct wl_display * display, swc_compositor_add_globals(&compositor, display); - if (!swc_shell_initialize(display)) + if (!swc_shell_initialize()) { fprintf(stderr, "Could not initialize shell\n"); goto error2;