mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
bar: add bar->output_name(), returns the name of the output we’re on
This commit is contained in:
parent
96a35e5304
commit
74016d7d33
5 changed files with 29 additions and 0 deletions
|
@ -1308,6 +1308,15 @@ set_cursor(struct bar *_bar, const char *cursor)
|
|||
update_cursor_surface(backend, seat);
|
||||
}
|
||||
|
||||
static const char *
|
||||
output_name(const struct bar *_bar)
|
||||
{
|
||||
const struct private *bar = _bar->private;
|
||||
const struct wayland_backend *backend = bar->backend.data;
|
||||
|
||||
return backend->monitor != NULL ? backend->monitor->name : NULL;
|
||||
}
|
||||
|
||||
const struct backend wayland_backend_iface = {
|
||||
.setup = &setup,
|
||||
.cleanup = &cleanup,
|
||||
|
@ -1315,4 +1324,5 @@ const struct backend wayland_backend_iface = {
|
|||
.commit = &commit,
|
||||
.refresh = &refresh,
|
||||
.set_cursor = &set_cursor,
|
||||
.output_name = &output_name,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue