summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2022-12-16 17:17:31 +0000
committerGitHub <noreply@github.com>2022-12-16 17:17:31 +0000
commit98a4fa2b0d79298fa29b048a3ba15c3bf5aed8cd (patch)
tree64e78342cf08e5f9ad87bd5f6ea36233133be7bb /src/helpers/Monitor.hpp
parent7c33c7fc64203c17b4f3625a16ae6b4774992c0e (diff)
Added clang format (#1239)
* clang-format stuff and format files
Diffstat (limited to 'src/helpers/Monitor.hpp')
-rw-r--r--src/helpers/Monitor.hpp79
1 files changed, 39 insertions, 40 deletions
diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp
index 75cdb969..ca2913b7 100644
--- a/src/helpers/Monitor.hpp
+++ b/src/helpers/Monitor.hpp
@@ -10,49 +10,49 @@
struct SMonitorRule;
class CMonitor {
-public:
- Vector2D vecPosition = Vector2D(-1,-1); // means unset
- Vector2D vecSize = Vector2D(0,0);
- Vector2D vecPixelSize = Vector2D(0,0);
- Vector2D vecTransformedSize = Vector2D(0,0);
+ public:
+ Vector2D vecPosition = Vector2D(-1, -1); // means unset
+ Vector2D vecSize = Vector2D(0, 0);
+ Vector2D vecPixelSize = Vector2D(0, 0);
+ Vector2D vecTransformedSize = Vector2D(0, 0);
- bool primary = false;
+ bool primary = false;
uint64_t ID = -1;
int activeWorkspace = -1;
float scale = 1;
- std::string szName = "";
+ std::string szName = "";
- Vector2D vecReservedTopLeft = Vector2D(0,0);
- Vector2D vecReservedBottomRight = Vector2D(0,0);
+ Vector2D vecReservedTopLeft = Vector2D(0, 0);
+ Vector2D vecReservedBottomRight = Vector2D(0, 0);
// WLR stuff
- wlr_output* output = nullptr;
- float refreshRate = 60;
- wlr_output_damage* damage = nullptr;
- int framesToSkip = 0;
- int forceFullFrames = 0;
- bool noFrameSchedule = false;
- bool scheduledRecalc = false;
- wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
-
- 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;
+ wlr_output* output = nullptr;
+ float refreshRate = 60;
+ wlr_output_damage* damage = nullptr;
+ int framesToSkip = 0;
+ int forceFullFrames = 0;
+ bool noFrameSchedule = false;
+ bool scheduledRecalc = false;
+ wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
+
+ 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;
+ CMonitor* pMirrorOf = nullptr;
std::vector<CMonitor*> mirrors;
// for the special workspace. 0 means not open.
- int specialWorkspaceID = 0;
+ int specialWorkspaceID = 0;
// Double-linked list because we need to have constant mem addresses for signals
// We have to store pointers and use raw new/delete because they might be moved between them
// and I am lazy
- std::array<std::vector<std::unique_ptr<SLayerSurface>>, 4> m_aLayerSurfaceLists;
+ std::array<std::vector<std::unique_ptr<SLayerSurface>>, 4> m_aLayerSurfaceLists;
DYNLISTENER(monitorFrame);
DYNLISTENER(monitorDestroy);
@@ -62,19 +62,18 @@ public:
// I don't really care lol :P
wlr_ext_workspace_group_handle_v1* pWLRWorkspaceGroupHandle = nullptr;
-
// methods
- void onConnect(bool noRule);
- void onDisconnect();
- void addDamage(pixman_region32_t* rg);
- void addDamage(wlr_box* box);
- void setMirror(const std::string&);
- bool isMirror();
- float getDefaultScale();
-
- std::shared_ptr<CMonitor>* m_pThisWrap = nullptr;
- bool m_bEnabled = false;
- bool m_bRenderingInitPassed = false;
+ void onConnect(bool noRule);
+ void onDisconnect();
+ void addDamage(pixman_region32_t* rg);
+ void addDamage(wlr_box* box);
+ void setMirror(const std::string&);
+ bool isMirror();
+ float getDefaultScale();
+
+ std::shared_ptr<CMonitor>* m_pThisWrap = nullptr;
+ bool m_bEnabled = false;
+ bool m_bRenderingInitPassed = false;
// For the list lookup
@@ -82,7 +81,7 @@ public:
return vecPosition == rhs.vecPosition && vecSize == rhs.vecSize && szName == rhs.szName;
}
-private:
- void setupDefaultWS(const SMonitorRule&);
- int findAvailableDefaultWS();
+ private:
+ void setupDefaultWS(const SMonitorRule&);
+ int findAvailableDefaultWS();
};