mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-24 19:09:48 +01:00
6b7f5e4010
This improves the way the output numbers are handled for the noop backend. Instead of using the number of active outputs plus one, the last used number is stored and new outputs will increment it. This fixes the situation where you start with one output, create a second, close the first, and create a third. Without this, both outputs will be NOOP-2, which causes an issue since the identifier will also be identical. With this, the last output is NOOP-3 and the outputs can be distinguished.
25 lines
479 B
C
25 lines
479 B
C
#ifndef BACKEND_NOOP_H
|
|
#define BACKEND_NOOP_H
|
|
|
|
#include <wlr/backend/noop.h>
|
|
#include <wlr/backend/interface.h>
|
|
|
|
struct wlr_noop_backend {
|
|
struct wlr_backend backend;
|
|
struct wl_display *display;
|
|
struct wl_list outputs;
|
|
size_t last_output_num;
|
|
bool started;
|
|
};
|
|
|
|
struct wlr_noop_output {
|
|
struct wlr_output wlr_output;
|
|
|
|
struct wlr_noop_backend *backend;
|
|
struct wl_list link;
|
|
};
|
|
|
|
struct wlr_noop_backend *noop_backend_from_backend(
|
|
struct wlr_backend *wlr_backend);
|
|
|
|
#endif
|