mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-05-19 08:30:22 -07:00
internal: Fix compiler warnings (#9646)
This commit is contained in:
parent
efc51eb7d1
commit
011d7ccb91
@ -1240,7 +1240,7 @@ void CMonitor::setSpecialWorkspace(const PHLWORKSPACE& pWorkspace) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", pWorkspace->m_szName + "," + szName});
|
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", pWorkspace->m_szName + "," + szName});
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activespecialv2", pWorkspace->m_iID + "," + pWorkspace->m_szName + "," + szName});
|
g_pEventManager->postEvent(SHyprIPCEvent{"activespecialv2", std::to_string(pWorkspace->m_iID) + "," + pWorkspace->m_szName + "," + szName});
|
||||||
|
|
||||||
g_pHyprRenderer->damageMonitor(self.lock());
|
g_pHyprRenderer->damageMonitor(self.lock());
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@
|
|||||||
{ \
|
{ \
|
||||||
Debug::log(CRIT, "\n\nMEMORY CORRUPTED: Unreachable failed! (Reached an unreachable position, memory corruption!!!)"); \
|
Debug::log(CRIT, "\n\nMEMORY CORRUPTED: Unreachable failed! (Reached an unreachable position, memory corruption!!!)"); \
|
||||||
raise(SIGABRT); \
|
raise(SIGABRT); \
|
||||||
|
std::unreachable(); \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define UNREACHABLE() std::unreachable();
|
#define UNREACHABLE() std::unreachable();
|
||||||
|
@ -59,6 +59,12 @@ struct SVersionInfo {
|
|||||||
#define OPTIONAL
|
#define OPTIONAL
|
||||||
#define HANDLE void*
|
#define HANDLE void*
|
||||||
|
|
||||||
|
// C ABI is needed to prevent symbol mangling, but we don't actually need C compatibility,
|
||||||
|
// so we ignore this warning about return types that are potentially incompatible with C.
|
||||||
|
// Clang supports this pragma too.
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
|
||||||
|
|
||||||
class IHyprLayout;
|
class IHyprLayout;
|
||||||
class CWindow;
|
class CWindow;
|
||||||
class IHyprWindowDecoration;
|
class IHyprWindowDecoration;
|
||||||
@ -315,3 +321,5 @@ APICALL inline EXPORT const char* __hyprland_api_get_client_hash() {
|
|||||||
return GIT_COMMIT_HASH;
|
return GIT_COMMIT_HASH;
|
||||||
}
|
}
|
||||||
// NOLINTEND
|
// NOLINTEND
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
using namespace Hyprutils::OS;
|
using namespace Hyprutils::OS;
|
||||||
|
|
||||||
CDRMSyncPointState::CDRMSyncPointState(WP<CDRMSyncobjTimelineResource> resource_, uint64_t point_, bool acquirePoint) :
|
CDRMSyncPointState::CDRMSyncPointState(WP<CDRMSyncobjTimelineResource> resource_, uint64_t point_) : m_resource(resource_), m_point(point_) {}
|
||||||
m_resource(resource_), m_point(point_), m_acquirePoint(acquirePoint) {}
|
|
||||||
|
|
||||||
const uint64_t& CDRMSyncPointState::point() {
|
const uint64_t& CDRMSyncPointState::point() {
|
||||||
return m_point;
|
return m_point;
|
||||||
@ -95,7 +94,7 @@ CDRMSyncobjSurfaceResource::CDRMSyncobjSurfaceResource(UP<CWpLinuxDrmSyncobjSurf
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto timeline = CDRMSyncobjTimelineResource::fromResource(timeline_);
|
auto timeline = CDRMSyncobjTimelineResource::fromResource(timeline_);
|
||||||
pendingAcquire = {timeline, ((uint64_t)hi << 32) | (uint64_t)lo, true};
|
pendingAcquire = {timeline, ((uint64_t)hi << 32) | (uint64_t)lo};
|
||||||
});
|
});
|
||||||
|
|
||||||
resource->setSetReleasePoint([this](CWpLinuxDrmSyncobjSurfaceV1* r, wl_resource* timeline_, uint32_t hi, uint32_t lo) {
|
resource->setSetReleasePoint([this](CWpLinuxDrmSyncobjSurfaceV1* r, wl_resource* timeline_, uint32_t hi, uint32_t lo) {
|
||||||
@ -105,7 +104,7 @@ CDRMSyncobjSurfaceResource::CDRMSyncobjSurfaceResource(UP<CWpLinuxDrmSyncobjSurf
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto timeline = CDRMSyncobjTimelineResource::fromResource(timeline_);
|
auto timeline = CDRMSyncobjTimelineResource::fromResource(timeline_);
|
||||||
pendingRelease = {timeline, ((uint64_t)hi << 32) | (uint64_t)lo, false};
|
pendingRelease = {timeline, ((uint64_t)hi << 32) | (uint64_t)lo};
|
||||||
});
|
});
|
||||||
|
|
||||||
listeners.surfacePrecommit = surface->events.precommit.registerListener([this](std::any d) {
|
listeners.surfacePrecommit = surface->events.precommit.registerListener([this](std::any d) {
|
||||||
|
@ -17,7 +17,7 @@ struct SSurfaceState;
|
|||||||
class CDRMSyncPointState {
|
class CDRMSyncPointState {
|
||||||
public:
|
public:
|
||||||
CDRMSyncPointState() = default;
|
CDRMSyncPointState() = default;
|
||||||
CDRMSyncPointState(WP<CDRMSyncobjTimelineResource> resource_, uint64_t point_, bool acquirePoint);
|
CDRMSyncPointState(WP<CDRMSyncobjTimelineResource> resource_, uint64_t point_);
|
||||||
~CDRMSyncPointState() = default;
|
~CDRMSyncPointState() = default;
|
||||||
|
|
||||||
const uint64_t& point();
|
const uint64_t& point();
|
||||||
@ -34,7 +34,6 @@ class CDRMSyncPointState {
|
|||||||
WP<CDRMSyncobjTimelineResource> m_resource = {};
|
WP<CDRMSyncobjTimelineResource> m_resource = {};
|
||||||
uint64_t m_point = 0;
|
uint64_t m_point = 0;
|
||||||
WP<CSyncTimeline> m_timeline = {};
|
WP<CSyncTimeline> m_timeline = {};
|
||||||
bool m_acquirePoint = false;
|
|
||||||
bool m_acquireCommitted = false;
|
bool m_acquireCommitted = false;
|
||||||
bool m_releaseTaken = false;
|
bool m_releaseTaken = false;
|
||||||
};
|
};
|
||||||
|
@ -33,7 +33,6 @@ class CPointerConstraint {
|
|||||||
private:
|
private:
|
||||||
SP<CZwpLockedPointerV1> resourceL;
|
SP<CZwpLockedPointerV1> resourceL;
|
||||||
SP<CZwpConfinedPointerV1> resourceC;
|
SP<CZwpConfinedPointerV1> resourceC;
|
||||||
wl_client* pClient = nullptr;
|
|
||||||
|
|
||||||
WP<CWLSurface> pHLSurface;
|
WP<CWLSurface> pHLSurface;
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ class CXDGActivationToken {
|
|||||||
uint32_t serial = 0;
|
uint32_t serial = 0;
|
||||||
std::string appID = "";
|
std::string appID = "";
|
||||||
bool committed = false;
|
bool committed = false;
|
||||||
bool used = false;
|
|
||||||
|
|
||||||
std::string token = "";
|
std::string token = "";
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ class CWLDataOfferResource : public IDataOffer {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
SP<CWlDataOffer> resource;
|
SP<CWlDataOffer> resource;
|
||||||
wl_client* pClient = nullptr;
|
|
||||||
|
|
||||||
friend class CWLDataDeviceResource;
|
friend class CWLDataDeviceResource;
|
||||||
};
|
};
|
||||||
@ -89,7 +88,6 @@ class CWLDataSourceResource : public IDataSource {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
SP<CWlDataSource> resource;
|
SP<CWlDataSource> resource;
|
||||||
wl_client* pClient = nullptr;
|
|
||||||
|
|
||||||
friend class CWLDataDeviceProtocol;
|
friend class CWLDataDeviceProtocol;
|
||||||
};
|
};
|
||||||
|
@ -129,7 +129,7 @@ void CX11DataDevice::sendEnter(uint32_t serial, SP<CWLSurfaceResource> surf, con
|
|||||||
|
|
||||||
xcb_window_t targetWindow = getProxyWindow(XSURF->xID);
|
xcb_window_t targetWindow = getProxyWindow(XSURF->xID);
|
||||||
|
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {{0}};
|
||||||
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
||||||
data.data32[1] = XDND_VERSION << 24;
|
data.data32[1] = XDND_VERSION << 24;
|
||||||
data.data32[1] |= 1;
|
data.data32[1] |= 1;
|
||||||
@ -164,7 +164,7 @@ void CX11DataDevice::sendLeave() {
|
|||||||
|
|
||||||
xcb_window_t targetWindow = getProxyWindow(lastSurface->xID);
|
xcb_window_t targetWindow = getProxyWindow(lastSurface->xID);
|
||||||
|
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {{0}};
|
||||||
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
||||||
|
|
||||||
sendDndEvent(targetWindow, HYPRATOMS["XdndLeave"], data);
|
sendDndEvent(targetWindow, HYPRATOMS["XdndLeave"], data);
|
||||||
@ -183,7 +183,7 @@ void CX11DataDevice::sendMotion(uint32_t timeMs, const Vector2D& local) {
|
|||||||
const auto XCOORDS = g_pXWaylandManager->waylandToXWaylandCoords(lastSurfaceCoords + local);
|
const auto XCOORDS = g_pXWaylandManager->waylandToXWaylandCoords(lastSurfaceCoords + local);
|
||||||
const uint32_t coords = ((uint32_t)XCOORDS.x << 16) | (uint32_t)XCOORDS.y;
|
const uint32_t coords = ((uint32_t)XCOORDS.x << 16) | (uint32_t)XCOORDS.y;
|
||||||
|
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {{0}};
|
||||||
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
||||||
data.data32[2] = coords;
|
data.data32[2] = coords;
|
||||||
data.data32[3] = timeMs;
|
data.data32[3] = timeMs;
|
||||||
@ -204,7 +204,7 @@ void CX11DataDevice::sendDrop() {
|
|||||||
|
|
||||||
xcb_window_t targetWindow = getProxyWindow(lastSurface->xID);
|
xcb_window_t targetWindow = getProxyWindow(lastSurface->xID);
|
||||||
|
|
||||||
xcb_client_message_data_t data = {0};
|
xcb_client_message_data_t data = {{0}};
|
||||||
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
||||||
data.data32[2] = lastTime;
|
data.data32[2] = lastTime;
|
||||||
|
|
||||||
|
@ -494,7 +494,7 @@ void CXWM::focusWindow(SP<CXWaylandSurface> surf) {
|
|||||||
if (surf->overrideRedirect)
|
if (surf->overrideRedirect)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xcb_client_message_data_t msg = {0};
|
xcb_client_message_data_t msg = {{0}};
|
||||||
msg.data32[0] = HYPRATOMS["WM_TAKE_FOCUS"];
|
msg.data32[0] = HYPRATOMS["WM_TAKE_FOCUS"];
|
||||||
msg.data32[1] = XCB_TIME_CURRENT_TIME;
|
msg.data32[1] = XCB_TIME_CURRENT_TIME;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user