mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 04:45:41 +02:00
bar/wayland: WL_OUTPUT_MODE_PREFERRED doesn't meen this *output* is preferred
It means the *mode* (width, height, refresh) is the preferred one for *this* output.
This commit is contained in:
parent
d4201723a6
commit
e05d586f17
1 changed files with 2 additions and 5 deletions
|
@ -51,7 +51,6 @@ struct monitor {
|
||||||
int width_px;
|
int width_px;
|
||||||
int height_px;
|
int height_px;
|
||||||
|
|
||||||
bool preferred;
|
|
||||||
int scale;
|
int scale;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -270,8 +269,6 @@ static void
|
||||||
output_mode(void *data, struct wl_output *wl_output, uint32_t flags,
|
output_mode(void *data, struct wl_output *wl_output, uint32_t flags,
|
||||||
int32_t width, int32_t height, int32_t refresh)
|
int32_t width, int32_t height, int32_t refresh)
|
||||||
{
|
{
|
||||||
struct monitor *mon = data;
|
|
||||||
mon->preferred = flags & WL_OUTPUT_MODE_PREFERRED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -629,8 +626,8 @@ setup(struct bar *_bar)
|
||||||
mon->name, mon->width_px, mon->height_px,
|
mon->name, mon->width_px, mon->height_px,
|
||||||
mon->x, mon->y, mon->width_mm, mon->height_mm);
|
mon->x, mon->y, mon->width_mm, mon->height_mm);
|
||||||
|
|
||||||
if (bar->monitor == NULL && mon->preferred) {
|
if (bar->monitor == NULL) {
|
||||||
/* User didn't specify a monitor, and this is the default one */
|
/* User didn't specify a monitor */
|
||||||
backend->monitor = mon;
|
backend->monitor = mon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue