mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 04:45:41 +02:00
bar/wayland: cleanup
This commit is contained in:
parent
38c87ad165
commit
73c62e9797
2 changed files with 11 additions and 9 deletions
|
@ -380,9 +380,8 @@ bar_new(const struct bar_config *config)
|
|||
priv->left.count = config->left.count;
|
||||
priv->center.count = config->center.count;
|
||||
priv->right.count = config->right.count;
|
||||
//priv->cursor_ctx = NULL;
|
||||
//priv->cursor = 0;
|
||||
priv->cursor_name = NULL;
|
||||
|
||||
#if 0
|
||||
priv->backend.data = bar_backend_xcb_new();
|
||||
priv->backend.iface = &xcb_backend_iface;
|
||||
|
|
|
@ -525,17 +525,20 @@ setup(struct bar *_bar)
|
|||
assert(backend->layer_surface != NULL);
|
||||
|
||||
/* Aligned to top, maximum width */
|
||||
enum zwlr_layer_surface_v1_anchor top_or_bottom = bar->location == BAR_TOP
|
||||
? ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP
|
||||
: ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
|
||||
|
||||
zwlr_layer_surface_v1_set_anchor(
|
||||
backend->layer_surface,
|
||||
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
|
||||
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT |
|
||||
((bar->location == BAR_TOP)
|
||||
? ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP
|
||||
: ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM)
|
||||
);
|
||||
top_or_bottom);
|
||||
|
||||
zwlr_layer_surface_v1_set_size(backend->layer_surface, 0, bar->height_with_border);
|
||||
zwlr_layer_surface_v1_set_exclusive_zone(backend->layer_surface, bar->height_with_border);
|
||||
zwlr_layer_surface_v1_set_size(
|
||||
backend->layer_surface, 0, bar->height_with_border);
|
||||
zwlr_layer_surface_v1_set_exclusive_zone(
|
||||
backend->layer_surface, bar->height_with_border);
|
||||
|
||||
//zwlr_layer_surface_v1_set_margin(
|
||||
// layer_surface, margin_top, margin_right, margin_bottom, margin_left);
|
||||
|
@ -545,7 +548,7 @@ setup(struct bar *_bar)
|
|||
zwlr_layer_surface_v1_add_listener(
|
||||
backend->layer_surface, &layer_surface_listener, backend);
|
||||
|
||||
/* Assign width/height */
|
||||
/* Trigger a 'configure' event, after which we'll have the width */
|
||||
wl_surface_commit(backend->surface);
|
||||
wl_display_roundtrip(backend->display);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue