summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2023-01-31 00:03:23 +0000
committerGitHub <noreply@github.com>2023-01-31 00:03:23 +0000
commitf90ff8303b4f2d0c39fe9e3dd35c5b0258491156 (patch)
treedf384b9580ca1c571c633154b47af4ffd2f69edb /src
parentd4e2a0fd1635d90043e38d47931e7132ebcde559 (diff)
Unbreak build with libc++ (#1457)
Diffstat (limited to 'src')
-rw-r--r--src/debug/HyprCtl.cpp1
-rw-r--r--src/helpers/BezierCurve.cpp2
-rw-r--r--src/helpers/MiscFunctions.cpp1
-rw-r--r--src/helpers/SubsurfaceTree.hpp4
-rw-r--r--src/helpers/WLClasses.hpp24
-rw-r--r--src/layout/DwindleLayout.hpp2
-rw-r--r--src/layout/MasterLayout.hpp4
-rw-r--r--src/protocols/ToplevelExport.hpp4
-rw-r--r--src/wlrunstable/wlr_ext_workspace_v1.cpp2
9 files changed, 23 insertions, 21 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index b88e9b60..ad2607af 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -11,6 +11,7 @@
#include <unistd.h>
#include <errno.h>
+#include <sstream>
#include <string>
std::string monitorsRequest(HyprCtl::eHyprCtlOutputFormat format) {
diff --git a/src/helpers/BezierCurve.cpp b/src/helpers/BezierCurve.cpp
index 07726b8d..c979342d 100644
--- a/src/helpers/BezierCurve.cpp
+++ b/src/helpers/BezierCurve.cpp
@@ -1,5 +1,7 @@
#include "BezierCurve.hpp"
+#include <algorithm>
+
void CBezierCurve::setup(std::vector<Vector2D>* pVec) {
m_dPoints.clear();
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index 3162e013..1b0f9467 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -4,6 +4,7 @@
#include "../Compositor.hpp"
#include <sys/utsname.h>
#include <iomanip>
+#include <sstream>
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/sysctl.h>
diff --git a/src/helpers/SubsurfaceTree.hpp b/src/helpers/SubsurfaceTree.hpp
index c5d3934f..36105d2c 100644
--- a/src/helpers/SubsurfaceTree.hpp
+++ b/src/helpers/SubsurfaceTree.hpp
@@ -24,7 +24,7 @@ struct SSurfaceTreeNode {
void* globalOffsetData;
CWindow* pWindowOwner = nullptr;
- bool operator==(const SSurfaceTreeNode& rhs) {
+ bool operator==(const SSurfaceTreeNode& rhs) const {
return pSurface == rhs.pSurface;
}
};
@@ -41,7 +41,7 @@ struct SSubsurface {
CWindow* pWindowOwner = nullptr;
- bool operator==(const SSubsurface& rhs) {
+ bool operator==(const SSubsurface& rhs) const {
return pSubsurface == rhs.pSubsurface;
}
};
diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp
index 41f7b6a7..15646c30 100644
--- a/src/helpers/WLClasses.hpp
+++ b/src/helpers/WLClasses.hpp
@@ -43,7 +43,7 @@ struct SLayerSurface {
bool forceBlur = false;
// For the list lookup
- bool operator==(const SLayerSurface& rhs) {
+ bool operator==(const SLayerSurface& rhs) const {
return layerSurface == rhs.layerSurface && monitorID == rhs.monitorID;
}
};
@@ -123,7 +123,7 @@ struct SKeyboard {
int numlockOn = -1;
// For the list lookup
- bool operator==(const SKeyboard& rhs) {
+ bool operator==(const SKeyboard& rhs) const {
return keyboard == rhs.keyboard;
}
};
@@ -145,7 +145,7 @@ struct SMouse {
DYNLISTENER(commitConstraint);
DYNLISTENER(destroyMouse);
- bool operator==(const SMouse& b) {
+ bool operator==(const SMouse& b) const {
return mouse == b.mouse;
}
};
@@ -160,7 +160,7 @@ struct SConstraint {
DYNLISTENER(setConstraintRegion);
DYNLISTENER(destroyConstraint);
- bool operator==(const SConstraint& b) {
+ bool operator==(const SConstraint& b) const {
return constraint == b.constraint;
}
};
@@ -185,7 +185,7 @@ struct SXDGPopup {
SSurfaceTreeNode* pSurfaceTree = nullptr;
// For the list lookup
- bool operator==(const SXDGPopup& rhs) {
+ bool operator==(const SXDGPopup& rhs) const {
return popup == rhs.popup;
}
};
@@ -229,7 +229,7 @@ struct STablet {
std::string name = "";
- bool operator==(const STablet& b) {
+ bool operator==(const STablet& b) const {
return wlrDevice == b.wlrDevice;
}
};
@@ -252,7 +252,7 @@ struct STabletTool {
DYNLISTENER(TabletToolDestroy);
DYNLISTENER(TabletToolSetCursor);
- bool operator==(const STabletTool& b) {
+ bool operator==(const STabletTool& b) const {
return wlrTabletTool == b.wlrTabletTool;
}
};
@@ -270,7 +270,7 @@ struct STabletPad {
DYNLISTENER(Ring);
DYNLISTENER(Destroy);
- bool operator==(const STabletPad& b) {
+ bool operator==(const STabletPad& b) const {
return wlrTabletPadV2 == b.wlrTabletPadV2;
}
};
@@ -281,7 +281,7 @@ struct SIdleInhibitor {
DYNLISTENER(Destroy);
- bool operator==(const SIdleInhibitor& b) {
+ bool operator==(const SIdleInhibitor& b) const {
return pWlrInhibitor == b.pWlrInhibitor;
}
};
@@ -333,7 +333,7 @@ struct SIMEPopup {
DYNLISTENER(focusedSurfaceUnmap);
- bool operator==(const SIMEPopup& other) {
+ bool operator==(const SIMEPopup& other) const {
return pSurface == other.pSurface;
}
};
@@ -347,7 +347,7 @@ struct STouchDevice {
DYNLISTENER(destroy);
- bool operator==(const STouchDevice& other) {
+ bool operator==(const STouchDevice& other) const {
return pWlrDevice == other.pWlrDevice;
}
};
@@ -358,7 +358,7 @@ struct SSwitchDevice {
DYNLISTENER(destroy);
DYNLISTENER(toggle);
- bool operator==(const SSwitchDevice& other) {
+ bool operator==(const SSwitchDevice& other) const {
return pWlrDevice == other.pWlrDevice;
}
};
diff --git a/src/layout/DwindleLayout.hpp b/src/layout/DwindleLayout.hpp
index e6a98915..3c34287c 100644
--- a/src/layout/DwindleLayout.hpp
+++ b/src/layout/DwindleLayout.hpp
@@ -33,7 +33,7 @@ struct SDwindleNodeData {
bool valid = true;
// For list lookup
- bool operator==(const SDwindleNodeData& rhs) {
+ bool operator==(const SDwindleNodeData& rhs) const {
return pWindow == rhs.pWindow && workspaceID == rhs.workspaceID && position == rhs.position && size == rhs.size && pParent == rhs.pParent &&
children[0] == rhs.children[0] && children[1] == rhs.children[1];
}
diff --git a/src/layout/MasterLayout.hpp b/src/layout/MasterLayout.hpp
index 746c500e..95948ead 100644
--- a/src/layout/MasterLayout.hpp
+++ b/src/layout/MasterLayout.hpp
@@ -30,7 +30,7 @@ struct SMasterNodeData {
int workspaceID = -1;
- bool operator==(const SMasterNodeData& rhs) {
+ bool operator==(const SMasterNodeData& rhs) const {
return pWindow == rhs.pWindow;
}
};
@@ -39,7 +39,7 @@ struct SMasterWorkspaceData {
int workspaceID = -1;
eOrientation orientation = ORIENTATION_LEFT;
- bool operator==(const SMasterWorkspaceData& rhs) {
+ bool operator==(const SMasterWorkspaceData& rhs) const {
return workspaceID == rhs.workspaceID;
}
};
diff --git a/src/protocols/ToplevelExport.hpp b/src/protocols/ToplevelExport.hpp
index e1c526db..d3bbc362 100644
--- a/src/protocols/ToplevelExport.hpp
+++ b/src/protocols/ToplevelExport.hpp
@@ -14,7 +14,7 @@ struct SToplevelClient {
int ref = 0;
wl_resource* resource = nullptr;
- bool operator==(const SToplevelClient& other) {
+ bool operator==(const SToplevelClient& other) const {
return resource == other.resource;
}
};
@@ -36,7 +36,7 @@ struct SToplevelFrame {
CWindow* pWindow = nullptr;
- bool operator==(const SToplevelFrame& other) {
+ bool operator==(const SToplevelFrame& other) const {
return resource == other.resource && client == other.client;
}
};
diff --git a/src/wlrunstable/wlr_ext_workspace_v1.cpp b/src/wlrunstable/wlr_ext_workspace_v1.cpp
index 3a8cbfd3..f3020cd6 100644
--- a/src/wlrunstable/wlr_ext_workspace_v1.cpp
+++ b/src/wlrunstable/wlr_ext_workspace_v1.cpp
@@ -1,5 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
-
#include "../includes.hpp"
#include "../helpers/MiscFunctions.hpp"
#include "ext-workspace-unstable-v1-protocol.h"