summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-05 18:04:44 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-05 18:04:44 +0000
commit5a750b485aca8b2fd5545cfe86b3a48c69355d65 (patch)
treeb5624dc630450152a52889968805e2f7faee0c40 /src/helpers
parenta71f44baa521e2fb867db8536d7766e7d02f3e32 (diff)
Added creating / destroying outputs on a multi-backend + headless backend
See `hyprctl output`.
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/Monitor.cpp3
-rw-r--r--src/helpers/Monitor.hpp1
-rw-r--r--src/helpers/XWaylandStubs.hpp6
3 files changed, 9 insertions, 1 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index 17643b3f..6849c227 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -8,6 +8,9 @@ void CMonitor::onConnect(bool noRule) {
szName = output->name;
+ if (!wlr_backend_is_drm(output->backend))
+ createdByUser = true; // should be true. WL, X11 and Headless backends should be addable / removable
+
// get monitor rule that matches
SMonitorRule monitorRule = g_pConfigManager->getMonitorRuleFor(output->name, output->description ? output->description : "");
diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp
index 476dd2ce..0f789781 100644
--- a/src/helpers/Monitor.hpp
+++ b/src/helpers/Monitor.hpp
@@ -40,6 +40,7 @@ public:
bool dpmsStatus = true;
bool vrrActive = false; // this can be TRUE even if VRR is not active in the case that this display does not support it.
bool enabled10bit = false; // as above, this can be TRUE even if 10 bit failed.
+ bool createdByUser = false;
// mirroring
CMonitor* pMirrorOf = nullptr;
diff --git a/src/helpers/XWaylandStubs.hpp b/src/helpers/XWaylandStubs.hpp
index 395a7575..97147f76 100644
--- a/src/helpers/XWaylandStubs.hpp
+++ b/src/helpers/XWaylandStubs.hpp
@@ -154,4 +154,8 @@ inline void wlr_xwayland_surface_close(wlr_xwayland_surface*) { }
inline void wlr_xwayland_surface_set_fullscreen(wlr_xwayland_surface*, bool) { }
-inline void wlr_xwayland_surface_set_minimized(wlr_xwayland_surface *, bool) {}
+inline void wlr_xwayland_surface_set_minimized(wlr_xwayland_surface *, bool) { }
+
+inline bool wlr_backend_is_x11(void*) { return false; }
+
+inline void wlr_x11_output_create(void*) { } \ No newline at end of file