forked from external/yambar
bar/xcb: ignore non-zero border margins
This commit is contained in:
parent
0ab772f869
commit
28d39f3aec
3 changed files with 14 additions and 5 deletions
10
README.md
10
README.md
|
@ -111,11 +111,11 @@ There are a couple types used that are specific to f00bar.
|
|||
| border | dict | no | Configures a border around the status bar
|
||||
| border.width | int | no | Width, in pixels, of the border
|
||||
| border.color | color | no | The color of the border
|
||||
| border.margin | int | no | left/rigth/top/bottom margins, from screen edge to bar
|
||||
| border.left-margin | int | no | left margin from screen edge to bar. Overrides `border.margin`
|
||||
| border.right-margin | int | no | right margin from screen edge to bar. Overrides `border.margin`
|
||||
| border.top-margin | int | no | top margin from screen edge to bar. Overrides `border.margin`
|
||||
| border.bottom-margin | int | no | bottom margin from screen edge to bar. Overrides `border.margin`
|
||||
| border.margin | int | no | left/rigth/top/bottom margins, from screen edge to bar. _Wayland only_
|
||||
| border.left-margin | int | no | left margin from screen edge to bar. Overrides `border.margin`. _Wayland only_
|
||||
| border.right-margin | int | no | right margin from screen edge to bar. Overrides `border.margin`. _Wayland only_
|
||||
| border.top-margin | int | no | top margin from screen edge to bar. Overrides `border.margin`. _Wayland only_
|
||||
| border.bottom-margin | int | no | bottom margin from screen edge to bar. Overrides `border.margin`. _Wayland only_
|
||||
| font | font | no | Default font to use in modules and particles
|
||||
| foreground | color | no | Default foreground (text) color to use
|
||||
| left | list | no | Left-aligned modules
|
||||
|
|
|
@ -656,6 +656,7 @@ setup(struct bar *_bar)
|
|||
return false;
|
||||
}
|
||||
|
||||
assert(backend->width <= backend->monitor->width_px);
|
||||
bar->width = backend->width;
|
||||
|
||||
if (pipe(backend->pipe_fds) == -1) {
|
||||
|
|
|
@ -46,6 +46,14 @@ setup(struct bar *_bar)
|
|||
struct private *bar = _bar->private;
|
||||
struct xcb_backend *backend = bar->backend.data;
|
||||
|
||||
if (bar->border.left_margin != 0 ||
|
||||
bar->border.right_margin != 0 ||
|
||||
bar->border.top_margin != 0 ||
|
||||
bar->border.bottom_margin)
|
||||
{
|
||||
LOG_WARN("non-zero border margins ignored in X11 backend");
|
||||
}
|
||||
|
||||
/* TODO: a lot of this (up to mapping the window) could be done in bar_new() */
|
||||
xcb_generic_error_t *e;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue