mirror of
https://github.com/swaywm/sway.git
synced 2025-11-11 13:29:51 -05:00
cmd_output: Use list_seq_find() to find matching config
This commit is contained in:
parent
88f372a22a
commit
7d82cd9c0a
3 changed files with 14 additions and 7 deletions
|
|
@ -261,6 +261,14 @@ bool read_config(FILE *file, bool is_active) {
|
|||
return success;
|
||||
}
|
||||
|
||||
int output_name_cmp(const void *item, const void *data)
|
||||
{
|
||||
const struct output_config *output = item;
|
||||
const char *name = data;
|
||||
|
||||
return strcmp(output->name, name);
|
||||
}
|
||||
|
||||
void apply_output_config(struct output_config *oc, swayc_t *output) {
|
||||
if (oc && oc->width > 0 && oc->height > 0) {
|
||||
output->width = oc->width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue