Fix formating

This commit is contained in:
Jasson 2024-07-11 17:27:18 -04:00
parent db048e3634
commit bb863b8f31
7 changed files with 10 additions and 22 deletions

View file

@ -649,13 +649,9 @@ void matrixProjection(float mat[9], int w, int h, wl_output_transform tr) {
int64_t getPPIDof(int64_t pid) { int64_t getPPIDof(int64_t pid) {
#if defined(KERN_PROC_PID) #if defined(KERN_PROC_PID)
int mib[] = { int mib[] = {
CTL_KERN, CTL_KERN, KERN_PROC, KERN_PROC_PID, (int)pid,
KERN_PROC,
KERN_PROC_PID,
(int)pid,
#if defined(__NetBSD__) || defined(__OpenBSD__) #if defined(__NetBSD__) || defined(__OpenBSD__)
sizeof(KINFO_PROC), sizeof(KINFO_PROC), 1,
1,
#endif #endif
}; };
u_int miblen = sizeof(mib) / sizeof(mib[0]); u_int miblen = sizeof(mib) / sizeof(mib[0]);

View file

@ -40,8 +40,7 @@
#define STICKS(a, b) abs((a) - (b)) < 2 #define STICKS(a, b) abs((a) - (b)) < 2
#define HYPRATOM(name) \ #define HYPRATOM(name) {name, 0}
{ name, 0 }
#define RASSERT(expr, reason, ...) \ #define RASSERT(expr, reason, ...) \
if (!(expr)) { \ if (!(expr)) { \

View file

@ -235,8 +235,7 @@ void CPointerManager::setCursorBuffer(wlr_buffer* buf, const Vector2D& hotspot,
currentCursorImage.size = {buf->width, buf->height}; currentCursorImage.size = {buf->width, buf->height};
currentCursorImage.pBuffer = wlr_buffer_lock(buf); currentCursorImage.pBuffer = wlr_buffer_lock(buf);
currentCursorImage.hyprListener_destroyBuffer.initCallback( currentCursorImage.hyprListener_destroyBuffer.initCallback(&buf->events.destroy, [this](void* owner, void* data) { resetCursorImage(); }, this, "CPointerManager");
&buf->events.destroy, [this](void* owner, void* data) { resetCursorImage(); }, this, "CPointerManager");
} }
currentCursorImage.hotspot = hotspot; currentCursorImage.hotspot = hotspot;

View file

@ -1624,8 +1624,7 @@ void CInputManager::newSwitch(wlr_input_device* pDevice) {
Debug::log(LOG, "New switch with name \"{}\" added", pDevice->name); Debug::log(LOG, "New switch with name \"{}\" added", pDevice->name);
PNEWDEV->hyprListener_destroy.initCallback( PNEWDEV->hyprListener_destroy.initCallback(&pDevice->events.destroy, [&](void* owner, void* data) { destroySwitch((SSwitchDevice*)owner); }, PNEWDEV, "SwitchDevice");
&pDevice->events.destroy, [&](void* owner, void* data) { destroySwitch((SSwitchDevice*)owner); }, PNEWDEV, "SwitchDevice");
const auto PSWITCH = wlr_switch_from_input_device(pDevice); const auto PSWITCH = wlr_switch_from_input_device(pDevice);

View file

@ -41,14 +41,11 @@ void CTextInput::initCallbacks() {
g_pInputManager->m_sIMERelay.removeTextInput(this); g_pInputManager->m_sIMERelay.removeTextInput(this);
}); });
} else { } else {
hyprListener_textInputEnable.initCallback( hyprListener_textInputEnable.initCallback(&pV1Input->sEnable, [this](void* owner, void* data) { onEnabled(); }, this, "textInput");
&pV1Input->sEnable, [this](void* owner, void* data) { onEnabled(); }, this, "textInput");
hyprListener_textInputCommit.initCallback( hyprListener_textInputCommit.initCallback(&pV1Input->sCommit, [this](void* owner, void* data) { onCommit(); }, this, "textInput");
&pV1Input->sCommit, [this](void* owner, void* data) { onCommit(); }, this, "textInput");
hyprListener_textInputDisable.initCallback( hyprListener_textInputDisable.initCallback(&pV1Input->sDisable, [this](void* owner, void* data) { onDisabled(); }, this, "textInput");
&pV1Input->sDisable, [this](void* owner, void* data) { onDisabled(); }, this, "textInput");
hyprListener_textInputDestroy.initCallback( hyprListener_textInputDestroy.initCallback(
&pV1Input->sDestroy, &pV1Input->sDestroy,

View file

@ -215,8 +215,7 @@ void CTabletToolV2Resource::queueFrame() {
if (frameSource) if (frameSource)
return; return;
frameSource = wl_event_loop_add_idle( frameSource = wl_event_loop_add_idle(g_pCompositor->m_sWLEventLoop, [](void* data) { ((CTabletToolV2Resource*)data)->sendFrame(false); }, this);
g_pCompositor->m_sWLEventLoop, [](void* data) { ((CTabletToolV2Resource*)data)->sendFrame(false); }, this);
} }
void CTabletToolV2Resource::sendFrame(bool removeSource) { void CTabletToolV2Resource::sendFrame(bool removeSource) {

View file

@ -58,8 +58,7 @@ CRenderbuffer::CRenderbuffer(wlr_buffer* buffer, uint32_t format) : m_pWlrBuffer
glBindFramebuffer(GL_FRAMEBUFFER, 0); glBindFramebuffer(GL_FRAMEBUFFER, 0);
hyprListener_destroyBuffer.initCallback( hyprListener_destroyBuffer.initCallback(&buffer->events.destroy, [this](void* owner, void* data) { g_pHyprRenderer->onRenderbufferDestroy(this); }, this, "CRenderbuffer");
&buffer->events.destroy, [this](void* owner, void* data) { g_pHyprRenderer->onRenderbufferDestroy(this); }, this, "CRenderbuffer");
} }
CRenderbuffer::CRenderbuffer(SP<IWLBuffer> buffer, uint32_t format) : m_pHLBuffer(buffer), m_uDrmFormat(format) { CRenderbuffer::CRenderbuffer(SP<IWLBuffer> buffer, uint32_t format) : m_pHLBuffer(buffer), m_uDrmFormat(format) {