Fix exclusive zone among other layers
This commit is contained in:
parent
0f7e78f6aa
commit
b73c4f48c1
|
@ -119,9 +119,10 @@ static const struct wl_registry_listener registry_listener = {
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
wlr_log_init(L_DEBUG, NULL);
|
wlr_log_init(L_DEBUG, NULL);
|
||||||
char *namespace = "wlroots";
|
char *namespace = "wlroots";
|
||||||
|
int exclusive_zone = 0;
|
||||||
bool found;
|
bool found;
|
||||||
int c;
|
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) {
|
switch (c) {
|
||||||
case 'o':
|
case 'o':
|
||||||
output = atoi(optarg);
|
output = atoi(optarg);
|
||||||
|
@ -132,6 +133,9 @@ int main(int argc, char **argv) {
|
||||||
case 'h':
|
case 'h':
|
||||||
height = atoi(optarg);
|
height = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'x':
|
||||||
|
exclusive_zone = atoi(optarg);
|
||||||
|
break;
|
||||||
case 'l': {
|
case 'l': {
|
||||||
struct {
|
struct {
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -215,9 +219,10 @@ int main(int argc, char **argv) {
|
||||||
wl_surface, wl_output, layer, namespace);
|
wl_surface, wl_output, layer, namespace);
|
||||||
zwlr_layer_surface_v1_set_size(layer_surface, width, height);
|
zwlr_layer_surface_v1_set_size(layer_surface, width, height);
|
||||||
zwlr_layer_surface_v1_set_anchor(layer_surface, anchor);
|
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,
|
zwlr_layer_surface_v1_add_listener(layer_surface,
|
||||||
&layer_surface_listener, layer_surface);
|
&layer_surface_listener, layer_surface);
|
||||||
// TODO: margin, interactivity, exclusive zone
|
// TODO: margin, interactivity
|
||||||
wl_surface_commit(wl_surface);
|
wl_surface_commit(wl_surface);
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ static void apply_exclusive(struct wlr_box *output_area,
|
||||||
};
|
};
|
||||||
for (size_t i = 0; i < sizeof(edges) / sizeof(edges[0]); ++i) {
|
for (size_t i = 0; i < sizeof(edges) / sizeof(edges[0]); ++i) {
|
||||||
if ((anchor & edges[i].anchors)) {
|
if ((anchor & edges[i].anchors)) {
|
||||||
edges[i].value += exclusive * edges[i].multiplier;
|
*edges[i].value += exclusive * edges[i].multiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue