summaryrefslogtreecommitdiff
path: root/shell/gtk-shell.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2014-02-14 12:13:57 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2014-02-14 12:13:57 +0100
commita3b3d15a3d3acc3df39615ead685dafcb9371650 (patch)
treefe17178d59bca479f75b4c49f723a9baa7f7468f /shell/gtk-shell.c
parent933c927284e9cc51d52d6aee8dcdcd18fa228541 (diff)
downloadgraynard-a3b3d15a3d3acc3df39615ead685dafcb9371650.tar.gz
graynard-a3b3d15a3d3acc3df39615ead685dafcb9371650.zip
shell-helper: implement interface in weston module
Diffstat (limited to 'shell/gtk-shell.c')
-rw-r--r--shell/gtk-shell.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/shell/gtk-shell.c b/shell/gtk-shell.c
index a899a1e..a448947 100644
--- a/shell/gtk-shell.c
+++ b/shell/gtk-shell.c
@@ -5,6 +5,7 @@
#include <gdk/gdkwayland.h>
#include "desktop-shell-client-protocol.h"
+#include "shell-helper-client-protocol.h"
#include "weston-gtk-shell-resources.h"
@@ -28,6 +29,7 @@ struct desktop {
struct wl_registry *registry;
struct desktop_shell *shell;
struct wl_output *output;
+ struct shell_helper *helper;
GdkDisplay *gdk_display;
@@ -269,6 +271,9 @@ registry_handle_global(void *data, struct wl_registry *registry,
/* TODO: create multiple outputs */
d->output = wl_registry_bind(registry, name,
&wl_output_interface, 1);
+ } else if (!strcmp(interface, "shell_helper")) {
+ d->helper = wl_registry_bind(registry, name,
+ &shell_helper_interface, 1);
}
}
@@ -297,6 +302,7 @@ main(int argc, char *argv[])
desktop = malloc(sizeof *desktop);
desktop->output = NULL;
desktop->shell = NULL;
+ desktop->helper = NULL;
desktop->gdk_display = gdk_display_get_default();
desktop->display =
@@ -310,9 +316,9 @@ main(int argc, char *argv[])
wl_registry_add_listener(desktop->registry,
&registry_listener, desktop);
- /* Wait until we have been notified about the compositor and shell
- * objects */
- while (!desktop->output || !desktop->shell)
+ /* Wait until we have been notified about the compositor,
+ * shell, and shell helper objects */
+ while (!desktop->output || !desktop->shell || !desktop->helper)
wl_display_roundtrip (desktop->display);
css_setup(desktop);