aboutsummaryrefslogtreecommitdiff
path: root/examples/layer-shell.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-20 21:57:16 -0400
committerDrew DeVault <sir@cmpwn.com>2018-03-27 18:50:32 -0400
commitb73c4f48c10ae79a33d1611fb641d22b8b619c39 (patch)
treea3f7097b271846247c724117777ce9bc2dfc6e61 /examples/layer-shell.c
parent0f7e78f6aa8530adc0dcc74a760b6478720e2ded (diff)
Fix exclusive zone among other layers
Diffstat (limited to 'examples/layer-shell.c')
-rw-r--r--examples/layer-shell.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/layer-shell.c b/examples/layer-shell.c
index f006a1b7..f3b9d3a0 100644
--- a/examples/layer-shell.c
+++ b/examples/layer-shell.c
@@ -119,9 +119,10 @@ static const struct wl_registry_listener registry_listener = {
int main(int argc, char **argv) {
wlr_log_init(L_DEBUG, NULL);
char *namespace = "wlroots";
+ int exclusive_zone = 0;
bool found;
int c;
- while ((c = getopt(argc, argv, "w:h:o:l:a:")) != -1) {
+ while ((c = getopt(argc, argv, "w:h:o:l:a:x:")) != -1) {
switch (c) {
case 'o':
output = atoi(optarg);
@@ -132,6 +133,9 @@ int main(int argc, char **argv) {
case 'h':
height = atoi(optarg);
break;
+ case 'x':
+ exclusive_zone = atoi(optarg);
+ break;
case 'l': {
struct {
char *name;
@@ -215,9 +219,10 @@ int main(int argc, char **argv) {
wl_surface, wl_output, layer, namespace);
zwlr_layer_surface_v1_set_size(layer_surface, width, height);
zwlr_layer_surface_v1_set_anchor(layer_surface, anchor);
+ zwlr_layer_surface_v1_set_exclusive_zone(layer_surface, exclusive_zone);
zwlr_layer_surface_v1_add_listener(layer_surface,
&layer_surface_listener, layer_surface);
- // TODO: margin, interactivity, exclusive zone
+ // TODO: margin, interactivity
wl_surface_commit(wl_surface);
wl_display_roundtrip(display);