diff --git a/src/Compositor.cpp b/src/Compositor.cpp index e7ffd2ea..289fdafb 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -885,7 +885,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { // Send an event g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(pWindow) + "," + pWindow->m_szTitle}); - g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", getFormat("%x", pWindow)}); + g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", getFormat("%lx", pWindow)}); EMIT_HOOK_EVENT("activeWindow", pWindow); @@ -906,7 +906,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { // move to front of the window history const auto HISTORYPIVOT = std::find_if(m_vWindowFocusHistory.begin(), m_vWindowFocusHistory.end(), [&](const auto& other) { return other == pWindow; }); if (HISTORYPIVOT == m_vWindowFocusHistory.end()) { - Debug::log(ERR, "BUG THIS: Window %x has no pivot in history", pWindow); + Debug::log(ERR, "BUG THIS: Window %lx has no pivot in history", pWindow); } else { std::rotate(m_vWindowFocusHistory.begin(), HISTORYPIVOT, HISTORYPIVOT + 1); } @@ -951,9 +951,9 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) { wl_signal_emit_mutable(&m_sSeat.seat->keyboard_state.events.focus_change, &event); if (pWindowOwner) - Debug::log(LOG, "Set keyboard focus to surface %x, with window name: %s", pSurface, pWindowOwner->m_szTitle.c_str()); + Debug::log(LOG, "Set keyboard focus to surface %lx, with window name: %s", pSurface, pWindowOwner->m_szTitle.c_str()); else - Debug::log(LOG, "Set keyboard focus to surface %x", pSurface); + Debug::log(LOG, "Set keyboard focus to surface %lx", pSurface); g_pXWaylandManager->activateSurface(pSurface, true); m_pLastFocus = pSurface; @@ -2084,7 +2084,7 @@ CWindow* CCompositor::getWindowByRegex(const std::string& regexp) { break; } case MODE_ADDRESS: { - std::string addr = getFormat("0x%x", w.get()); + std::string addr = getFormat("0x%lx", w.get()); if (matchCheck != addr) continue; break; diff --git a/src/Window.cpp b/src/Window.cpp index bd439993..87bf2d21 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -280,7 +280,7 @@ void CWindow::moveToWorkspace(int workspaceID) { const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID); if (PWORKSPACE) { - g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%x,%s", this, PWORKSPACE->m_szName.c_str())}); + g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%lx,%s", this, PWORKSPACE->m_szName.c_str())}); EMIT_HOOK_EVENT("moveWindow", (std::vector{this, PWORKSPACE})); } diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index edfeb495..9454c16a 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -976,7 +976,7 @@ void CConfigManager::updateBlurredLS(const std::string& name, const bool forceBl for (auto& lsl : m->m_aLayerSurfaceLayers) { for (auto& ls : lsl) { if (BYADDRESS) { - if (getFormat("0x%x", ls.get()) == matchName) + if (getFormat("0x%lx", ls.get()) == matchName) ls->forceBlur = forceBlur; } else if (ls->szNamespace == matchName) ls->forceBlur = forceBlur; @@ -1668,7 +1668,7 @@ std::vector CConfigManager::getMatchingRules(CWindow* pWindow) { } // applies. Read the rule and behave accordingly - Debug::log(LOG, "Window rule %s -> %s matched %x [%s]", rule.szRule.c_str(), rule.szValue.c_str(), pWindow, pWindow->m_szTitle.c_str()); + Debug::log(LOG, "Window rule %s -> %s matched %lx [%s]", rule.szRule.c_str(), rule.szValue.c_str(), pWindow, pWindow->m_szTitle.c_str()); returns.push_back(rule); } @@ -1697,7 +1697,7 @@ std::vector CConfigManager::getMatchingRules(SLayerSurface* pLS) { for (auto& lr : m_dLayerRules) { if (lr.targetNamespace.find("address:0x") == 0) { - if (getFormat("address:0x%x", pLS) != lr.targetNamespace) + if (getFormat("address:0x%lx", pLS) != lr.targetNamespace) continue; } else { std::regex NSCHECK(lr.targetNamespace); diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 3307d495..0603b182 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -93,7 +93,7 @@ static std::string getGroupedData(CWindow* w, HyprCtl::eHyprCtlOutputFormat form } while (curr != w); const auto comma = isJson ? ", " : ","; - const auto fmt = isJson ? "\"0x%x\"" : "%x"; + const auto fmt = isJson ? "\"0x%lx\"" : "%lx"; std::ostringstream result; bool first = true; @@ -113,7 +113,7 @@ static std::string getWindowData(CWindow* w, HyprCtl::eHyprCtlOutputFormat forma if (format == HyprCtl::FORMAT_JSON) { return getFormat( R"#({ - "address": "0x%x", + "address": "0x%lx", "mapped": %s, "hidden": %s, "at": [%i, %i], @@ -147,13 +147,13 @@ static std::string getWindowData(CWindow* w, HyprCtl::eHyprCtlOutputFormat forma escapeJSONStrings(g_pXWaylandManager->getTitle(w)).c_str(), escapeJSONStrings(w->m_szInitialClass).c_str(), escapeJSONStrings(w->m_szInitialTitle).c_str(), w->getPID(), ((int)w->m_bIsX11 == 1 ? "true" : "false"), (w->m_bPinned ? "true" : "false"), (w->m_bIsFullscreen ? "true" : "false"), (w->m_bIsFullscreen ? (g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID) ? g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID)->m_efFullscreenMode : 0) : 0), - w->m_bFakeFullscreenState ? "true" : "false", getGroupedData(w, format).c_str(), (w->m_pSwallowed ? getFormat("\"0x%x\"", w->m_pSwallowed).c_str() : "null")); + w->m_bFakeFullscreenState ? "true" : "false", getGroupedData(w, format).c_str(), (w->m_pSwallowed ? getFormat("\"0x%lx\"", w->m_pSwallowed).c_str() : "null")); } else { return getFormat( - "Window %x -> %s:\n\tmapped: %i\n\thidden: %i\n\tat: %i,%i\n\tsize: %i,%i\n\tworkspace: %i (%s)\n\tfloating: %i\n\tmonitor: %i\n\tclass: %s\n\ttitle: " + "Window %lx -> %s:\n\tmapped: %i\n\thidden: %i\n\tat: %i,%i\n\tsize: %i,%i\n\tworkspace: %i (%s)\n\tfloating: %i\n\tmonitor: %i\n\tclass: %s\n\ttitle: " "%s\n\tinitialClass: %s\n\tinitialTitle: %s\n\tpid: " "%i\n\txwayland: %i\n\tpinned: " - "%i\n\tfullscreen: %i\n\tfullscreenmode: %i\n\tfakefullscreen: %i\n\tgrouped: %s\n\tswallowing: %x\n\n", + "%i\n\tfullscreen: %i\n\tfullscreenmode: %i\n\tfakefullscreen: %i\n\tgrouped: %s\n\tswallowing: %lx\n\n", w, w->m_szTitle.c_str(), (int)w->m_bIsMapped, (int)w->isHidden(), (int)w->m_vRealPosition.goalv().x, (int)w->m_vRealPosition.goalv().y, (int)w->m_vRealSize.goalv().x, (int)w->m_vRealSize.goalv().y, w->m_iWorkspaceID, (w->m_iWorkspaceID == -1 ? "" : @@ -204,7 +204,7 @@ std::string workspacesRequest(HyprCtl::eHyprCtlOutputFormat format) { "monitor": "%s", "windows": %i, "hasfullscreen": %s, - "lastwindow": "0x%x", + "lastwindow": "0x%lx", "lastwindowtitle": "%s" },)#", w->m_iID, escapeJSONStrings(w->m_szName).c_str(), escapeJSONStrings(PMONITOR ? PMONITOR->szName : "?").c_str(), g_pCompositor->getWindowsOnWorkspace(w->m_iID), @@ -219,7 +219,7 @@ std::string workspacesRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& w : g_pCompositor->m_vWorkspaces) { const auto PLASTW = w->getLastFocusedWindow(); const auto PMONITOR = g_pCompositor->getMonitorFromID(w->m_iMonitorID); - result += getFormat("workspace ID %i (%s) on monitor %s:\n\twindows: %i\n\thasfullscreen: %i\n\tlastwindow: 0x%x\n\tlastwindowtitle: %s\n\n", w->m_iID, + result += getFormat("workspace ID %i (%s) on monitor %s:\n\twindows: %i\n\thasfullscreen: %i\n\tlastwindow: 0x%lx\n\tlastwindowtitle: %s\n\n", w->m_iID, w->m_szName.c_str(), PMONITOR ? PMONITOR->szName.c_str() : "?", g_pCompositor->getWindowsOnWorkspace(w->m_iID), (int)w->m_bHasFullscreenWindow, PLASTW, PLASTW ? PLASTW->m_szTitle.c_str() : ""); } @@ -264,7 +264,7 @@ std::string layersRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& layer : level) { result += getFormat( R"#( { - "address": "0x%x", + "address": "0x%lx", "x": %i, "y": %i, "w": %i, @@ -305,7 +305,7 @@ std::string layersRequest(HyprCtl::eHyprCtlOutputFormat format) { result += getFormat("\tLayer level %i (%s):\n", layerLevel, levelNames[layerLevel].c_str()); for (auto& layer : level) { - result += getFormat("\t\tLayer %x: xywh: %i %i %i %i, namespace: %s\n", layer.get(), layer->geometry.x, layer->geometry.y, layer->geometry.width, + result += getFormat("\t\tLayer %lx: xywh: %i %i %i %i, namespace: %s\n", layer.get(), layer->geometry.x, layer->geometry.y, layer->geometry.width, layer->geometry.height, layer->szNamespace.c_str()); } @@ -328,7 +328,7 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& m : g_pInputManager->m_lMice) { result += getFormat( R"#( { - "address": "0x%x", + "address": "0x%lx", "name": "%s", "defaultSpeed": %f },)#", @@ -345,7 +345,7 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { const auto KM = g_pInputManager->getActiveLayoutForKeyboard(&k); result += getFormat( R"#( { - "address": "0x%x", + "address": "0x%lx", "name": "%s", "rules": "%s", "model": "%s", @@ -369,10 +369,10 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& d : g_pInputManager->m_lTabletPads) { result += getFormat( R"#( { - "address": "0x%x", + "address": "0x%lx", "type": "tabletPad", "belongsTo": { - "address": "0x%x", + "address": "0x%lx", "name": "%s" } },)#", @@ -382,7 +382,7 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& d : g_pInputManager->m_lTablets) { result += getFormat( R"#( { - "address": "0x%x", + "address": "0x%lx", "name": "%s" },)#", &d, escapeJSONStrings(d.name).c_str()); @@ -391,9 +391,9 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& d : g_pInputManager->m_lTabletTools) { result += getFormat( R"#( { - "address": "0x%x", + "address": "0x%lx", "type": "tabletTool", - "belongsTo": "0x%x" + "belongsTo": "0x%lx" },)#", &d, d.wlrTabletTool ? d.wlrTabletTool->data : 0); } @@ -407,7 +407,7 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& d : g_pInputManager->m_lTouchDevices) { result += getFormat( R"#( { - "address": "0x%x", + "address": "0x%lx", "name": "%s" },)#", &d, d.name.c_str()); @@ -423,7 +423,7 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& d : g_pInputManager->m_lSwitches) { result += getFormat( R"#( { - "address": "0x%x", + "address": "0x%lx", "name": "%s" },)#", &d, d.pWlrDevice ? d.pWlrDevice->name : ""); @@ -441,7 +441,7 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& m : g_pInputManager->m_lMice) { result += getFormat( - "\tMouse at %x:\n\t\t%s\n\t\t\tdefault speed: %f\n", &m, m.name.c_str(), + "\tMouse at %lx:\n\t\t%s\n\t\t\tdefault speed: %f\n", &m, m.name.c_str(), (wlr_input_device_is_libinput(m.mouse) ? libinput_device_config_accel_get_default_speed((libinput_device*)wlr_libinput_get_device_handle(m.mouse)) : 0.f)); } @@ -449,7 +449,7 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { for (auto& k : g_pInputManager->m_lKeyboards) { const auto KM = g_pInputManager->getActiveLayoutForKeyboard(&k); - result += getFormat("\tKeyboard at %x:\n\t\t%s\n\t\t\trules: r \"%s\", m \"%s\", l \"%s\", v \"%s\", o \"%s\"\n\t\t\tactive keymap: %s\n\t\t\tmain: %s\n", &k, + result += getFormat("\tKeyboard at %lx:\n\t\t%s\n\t\t\trules: r \"%s\", m \"%s\", l \"%s\", v \"%s\", o \"%s\"\n\t\t\tactive keymap: %s\n\t\t\tmain: %s\n", &k, k.name.c_str(), k.currentRules.rules.c_str(), k.currentRules.model.c_str(), k.currentRules.layout.c_str(), k.currentRules.variant.c_str(), k.currentRules.options.c_str(), KM.c_str(), (k.active ? "yes" : "no")); } @@ -457,27 +457,27 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) { result += "\n\nTablets:\n"; for (auto& d : g_pInputManager->m_lTabletPads) { - result += getFormat("\tTablet Pad at %x (belongs to %x -> %s)\n", &d, d.pTabletParent, d.pTabletParent ? d.pTabletParent->name.c_str() : ""); + result += getFormat("\tTablet Pad at %lx (belongs to %lx -> %s)\n", &d, d.pTabletParent, d.pTabletParent ? d.pTabletParent->name.c_str() : ""); } for (auto& d : g_pInputManager->m_lTablets) { - result += getFormat("\tTablet at %x:\n\t\t%s\n", &d, d.name.c_str()); + result += getFormat("\tTablet at %lx:\n\t\t%s\n", &d, d.name.c_str()); } for (auto& d : g_pInputManager->m_lTabletTools) { - result += getFormat("\tTablet Tool at %x (belongs to %x)\n", &d, d.wlrTabletTool ? d.wlrTabletTool->data : 0); + result += getFormat("\tTablet Tool at %lx (belongs to %lx)\n", &d, d.wlrTabletTool ? d.wlrTabletTool->data : 0); } result += "\n\nTouch:\n"; for (auto& d : g_pInputManager->m_lTouchDevices) { - result += getFormat("\tTouch Device at %x:\n\t\t%s\n", &d, d.name.c_str()); + result += getFormat("\tTouch Device at %lx:\n\t\t%s\n", &d, d.name.c_str()); } result += "\n\nSwitches:\n"; for (auto& d : g_pInputManager->m_lSwitches) { - result += getFormat("\tSwitch Device at %x:\n\t\t%s\n", &d, d.pWlrDevice ? d.pWlrDevice->name : ""); + result += getFormat("\tSwitch Device at %lx:\n\t\t%s\n", &d, d.pWlrDevice ? d.pWlrDevice->name : ""); } } @@ -1025,7 +1025,7 @@ std::string dispatchGetOption(std::string request, HyprCtl::eHyprCtlOutputFormat return "no such option"; if (format == HyprCtl::eHyprCtlOutputFormat::FORMAT_NORMAL) - return getFormat("option %s\n\tint: %lld\n\tfloat: %f\n\tstr: \"%s\"\n\tdata: %x", curitem.c_str(), PCFGOPT->intValue, PCFGOPT->floatValue, PCFGOPT->strValue.c_str(), + return getFormat("option %s\n\tint: %lld\n\tfloat: %f\n\tstr: \"%s\"\n\tdata: %lx", curitem.c_str(), PCFGOPT->intValue, PCFGOPT->floatValue, PCFGOPT->strValue.c_str(), PCFGOPT->data.get()); else { return getFormat( @@ -1035,7 +1035,7 @@ std::string dispatchGetOption(std::string request, HyprCtl::eHyprCtlOutputFormat "int": %lld, "float": %f, "str": "%s", - "data": "0x%x" + "data": "0x%lx" } )#", curitem.c_str(), PCFGOPT->intValue, PCFGOPT->floatValue, PCFGOPT->strValue.c_str(), PCFGOPT->data.get()); diff --git a/src/events/Devices.cpp b/src/events/Devices.cpp index 5b1d6e4e..4b8eeea8 100644 --- a/src/events/Devices.cpp +++ b/src/events/Devices.cpp @@ -19,7 +19,7 @@ void Events::listener_keyboardDestroy(void* owner, void* data) { SKeyboard* PKEYBOARD = (SKeyboard*)owner; g_pInputManager->destroyKeyboard(PKEYBOARD); - Debug::log(LOG, "Destroyed keyboard %x", PKEYBOARD); + Debug::log(LOG, "Destroyed keyboard %lx", PKEYBOARD); } void Events::listener_keyboardKey(void* owner, void* data) { @@ -95,7 +95,7 @@ void Events::listener_newInput(wl_listener* listener, void* data) { void Events::listener_newConstraint(wl_listener* listener, void* data) { const auto PCONSTRAINT = (wlr_pointer_constraint_v1*)data; - Debug::log(LOG, "New mouse constraint at %x", PCONSTRAINT); + Debug::log(LOG, "New mouse constraint at %lx", PCONSTRAINT); g_pInputManager->m_lConstraints.emplace_back(); const auto CONSTRAINT = &g_pInputManager->m_lConstraints.back(); @@ -139,7 +139,7 @@ void Events::listener_destroyConstraint(void* owner, void* data) { PCONSTRAINT->pMouse->currentConstraint = nullptr; } - Debug::log(LOG, "Unconstrained mouse from %x", PCONSTRAINT->constraint); + Debug::log(LOG, "Unconstrained mouse from %lx", PCONSTRAINT->constraint); g_pInputManager->m_lConstraints.remove(*PCONSTRAINT); } diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index ff31355e..fa3e668c 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -55,14 +55,14 @@ void Events::listener_newLayerSurface(wl_listener* listener, void* data) { layerSurface->forceBlur = g_pConfigManager->shouldBlurLS(layerSurface->szNamespace); - Debug::log(LOG, "LayerSurface %x (namespace %s layer %d) created on monitor %s", layerSurface->layerSurface, layerSurface->layerSurface->_namespace, layerSurface->layer, + Debug::log(LOG, "LayerSurface %lx (namespace %s layer %d) created on monitor %s", layerSurface->layerSurface, layerSurface->layerSurface->_namespace, layerSurface->layer, PMONITOR->szName.c_str()); } void Events::listener_destroyLayerSurface(void* owner, void* data) { SLayerSurface* layersurface = (SLayerSurface*)owner; - Debug::log(LOG, "LayerSurface %x destroyed", layersurface->layerSurface); + Debug::log(LOG, "LayerSurface %lx destroyed", layersurface->layerSurface); const auto PMONITOR = g_pCompositor->getMonitorFromID(layersurface->monitorID); @@ -107,7 +107,7 @@ void Events::listener_destroyLayerSurface(void* owner, void* data) { void Events::listener_mapLayerSurface(void* owner, void* data) { SLayerSurface* layersurface = (SLayerSurface*)owner; - Debug::log(LOG, "LayerSurface %x mapped", layersurface->layerSurface); + Debug::log(LOG, "LayerSurface %lx mapped", layersurface->layerSurface); layersurface->layerSurface->mapped = true; layersurface->mapped = true; @@ -173,7 +173,7 @@ void Events::listener_mapLayerSurface(void* owner, void* data) { void Events::listener_unmapLayerSurface(void* owner, void* data) { SLayerSurface* layersurface = (SLayerSurface*)owner; - Debug::log(LOG, "LayerSurface %x unmapped", layersurface->layerSurface); + Debug::log(LOG, "LayerSurface %lx unmapped", layersurface->layerSurface); g_pEventManager->postEvent(SHyprIPCEvent{"closelayer", std::string(layersurface->layerSurface->_namespace ? layersurface->layerSurface->_namespace : "")}); EMIT_HOOK_EVENT("closeLayer", layersurface); diff --git a/src/events/Misc.cpp b/src/events/Misc.cpp index 22587599..853d37c9 100644 --- a/src/events/Misc.cpp +++ b/src/events/Misc.cpp @@ -98,14 +98,14 @@ void Events::listener_startDrag(wl_listener* listener, void* data) { wlr_drag* wlrDrag = (wlr_drag*)data; - Debug::log(LOG, "Started drag %x", wlrDrag); + Debug::log(LOG, "Started drag %lx", wlrDrag); wlrDrag->data = data; g_pInputManager->m_sDrag.hyprListener_destroy.initCallback(&wlrDrag->events.destroy, &Events::listener_destroyDrag, &g_pInputManager->m_sDrag, "Drag"); if (wlrDrag->icon) { - Debug::log(LOG, "Drag started with an icon %x", wlrDrag->icon); + Debug::log(LOG, "Drag started with an icon %lx", wlrDrag->icon); g_pInputManager->m_sDrag.dragIcon = wlrDrag->icon; wlrDrag->icon->data = g_pInputManager->m_sDrag.dragIcon; @@ -157,7 +157,7 @@ void Events::listener_commitDragIcon(void* owner, void* data) { } void Events::listener_InhibitActivate(wl_listener* listener, void* data) { - Debug::log(LOG, "Activated exclusive for %x.", g_pCompositor->m_sSeat.exclusiveClient); + Debug::log(LOG, "Activated exclusive for %lx.", g_pCompositor->m_sSeat.exclusiveClient); g_pInputManager->refocus(); g_pCompositor->m_sSeat.exclusiveClient = g_pCompositor->m_sWLRInhibitMgr->active_client; diff --git a/src/events/Popups.cpp b/src/events/Popups.cpp index 5946e1c9..f2af2a79 100644 --- a/src/events/Popups.cpp +++ b/src/events/Popups.cpp @@ -78,7 +78,7 @@ void Events::listener_newPopup(void* owner, void* data) { ASSERT(layersurface); - Debug::log(LOG, "New layer popup created from surface %x", layersurface); + Debug::log(LOG, "New layer popup created from surface %lx", layersurface); const auto WLRPOPUP = (wlr_xdg_popup*)data; @@ -102,7 +102,7 @@ void Events::listener_newPopupXDG(void* owner, void* data) { if (!PWINDOW->m_bIsMapped) return; - Debug::log(LOG, "New layer popup created from XDG window %x -> %s", PWINDOW, PWINDOW->m_szTitle.c_str()); + Debug::log(LOG, "New layer popup created from XDG window %lx -> %s", PWINDOW, PWINDOW->m_szTitle.c_str()); const auto WLRPOPUP = (wlr_xdg_popup*)data; @@ -124,9 +124,9 @@ void Events::listener_newPopupFromPopupXDG(void* owner, void* data) { ASSERT(PPOPUP); if (PPOPUP->parentWindow) - Debug::log(LOG, "New popup created from XDG Window popup %x -> %s", PPOPUP, PPOPUP->parentWindow->m_szTitle.c_str()); + Debug::log(LOG, "New popup created from XDG Window popup %lx -> %s", PPOPUP, PPOPUP->parentWindow->m_szTitle.c_str()); else - Debug::log(LOG, "New popup created from Non-Window popup %x", PPOPUP); + Debug::log(LOG, "New popup created from Non-Window popup %lx", PPOPUP); const auto WLRPOPUP = (wlr_xdg_popup*)data; @@ -167,7 +167,7 @@ void Events::listener_mapPopupXDG(void* owner, void* data) { if (PPOPUP->monitor) g_pProtocolManager->m_pFractionalScaleProtocolManager->setPreferredScaleForSurface(PPOPUP->popup->base->surface, PPOPUP->monitor->scale); - Debug::log(LOG, "XDG Popup got assigned a surfaceTreeNode %x", PPOPUP->pSurfaceTree); + Debug::log(LOG, "XDG Popup got assigned a surfaceTreeNode %lx", PPOPUP->pSurfaceTree); } void Events::listener_unmapPopupXDG(void* owner, void* data) { @@ -213,7 +213,7 @@ void Events::listener_destroyPopupXDG(void* owner, void* data) { ASSERT(PPOPUP); - Debug::log(LOG, "Destroyed popup XDG %x", PPOPUP); + Debug::log(LOG, "Destroyed popup XDG %lx", PPOPUP); if (PPOPUP->pSurfaceTree) { SubsurfaceTree::destroySurfaceTree(PPOPUP->pSurfaceTree); diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index d4164dff..4b06c7bb 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -152,7 +152,7 @@ void Events::listener_mapWindow(void* owner, void* data) { PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID); } - Debug::log(ERR, "Rule monitor, applying to window %x -> mon: %i, workspace: %i", PWINDOW, PWINDOW->m_iMonitorID, PWINDOW->m_iWorkspaceID); + Debug::log(ERR, "Rule monitor, applying to window %lx -> mon: %i, workspace: %i", PWINDOW, PWINDOW->m_iMonitorID, PWINDOW->m_iWorkspaceID); } catch (std::exception& e) { Debug::log(ERR, "Rule monitor failed, rule: %s -> %s | err: %s", r.szRule.c_str(), r.szValue.c_str(), e.what()); } } else if (r.szRule.find("workspace") == 0) { // check if it isnt unset @@ -169,7 +169,7 @@ void Events::listener_mapWindow(void* owner, void* data) { if (JUSTWORKSPACE == PWORKSPACE->m_szName || JUSTWORKSPACE == "name:" + PWORKSPACE->m_szName) requestedWorkspace = ""; - Debug::log(LOG, "Rule workspace matched by window %x, %s applied.", PWINDOW, r.szValue.c_str()); + Debug::log(LOG, "Rule workspace matched by window %lx, %s applied.", PWINDOW, r.szValue.c_str()); } else if (r.szRule.find("float") == 0) { PWINDOW->m_bIsFloating = true; } else if (r.szRule.find("tile") == 0) { @@ -303,7 +303,7 @@ void Events::listener_mapWindow(void* owner, void* data) { std::clamp(MAXSIZE.y, 20.0, PMONITOR->vecSize.y) : (!SIZEYSTR.contains('%') ? std::stoi(SIZEYSTR) : std::stof(SIZEYSTR.substr(0, SIZEYSTR.length() - 1)) * 0.01 * PMONITOR->vecSize.y); - Debug::log(LOG, "Rule size, applying to window %x", PWINDOW); + Debug::log(LOG, "Rule size, applying to window %lx", PWINDOW); PWINDOW->m_vRealSize = Vector2D(SIZEX, SIZEY); g_pXWaylandManager->setWindowSize(PWINDOW, PWINDOW->m_vRealSize.goalv()); @@ -393,7 +393,7 @@ void Events::listener_mapWindow(void* owner, void* data) { } } - Debug::log(LOG, "Rule move, applying to window %x", PWINDOW); + Debug::log(LOG, "Rule move, applying to window %lx", PWINDOW); PWINDOW->m_vRealPosition = Vector2D(posX, posY) + PMONITOR->vecPosition; @@ -439,7 +439,7 @@ void Events::listener_mapWindow(void* owner, void* data) { PWINDOW->m_fDimPercent.setValueAndWarp(0); } - Debug::log(LOG, "Window got assigned a surfaceTreeNode %x", PWINDOW->m_pSurfaceTree); + Debug::log(LOG, "Window got assigned a surfaceTreeNode %lx", PWINDOW->m_pSurfaceTree); if (!PWINDOW->m_bIsX11) { PWINDOW->hyprListener_commitWindow.initCallback(&PWINDOW->m_uSurface.xdg->surface->events.commit, &Events::listener_commitWindow, PWINDOW, "XDG Window Late"); @@ -581,7 +581,7 @@ void Events::listener_mapWindow(void* owner, void* data) { auto workspaceID = requestedWorkspace != "" ? requestedWorkspace : PWORKSPACE->m_szName; g_pEventManager->postEvent( - SHyprIPCEvent{"openwindow", getFormat("%x,%s,%s,%s", PWINDOW, workspaceID.c_str(), g_pXWaylandManager->getAppIDClass(PWINDOW).c_str(), PWINDOW->m_szTitle.c_str())}); + SHyprIPCEvent{"openwindow", getFormat("%lx,%s,%s,%s", PWINDOW, workspaceID.c_str(), g_pXWaylandManager->getAppIDClass(PWINDOW).c_str(), PWINDOW->m_szTitle.c_str())}); EMIT_HOOK_EVENT("openWindow", PWINDOW); // recalc the values for this window @@ -593,15 +593,15 @@ void Events::listener_mapWindow(void* owner, void* data) { void Events::listener_unmapWindow(void* owner, void* data) { CWindow* PWINDOW = (CWindow*)owner; - Debug::log(LOG, "Window %x unmapped (class %s)", PWINDOW, g_pXWaylandManager->getAppIDClass(PWINDOW).c_str()); + Debug::log(LOG, "Window %lx unmapped (class %s)", PWINDOW, g_pXWaylandManager->getAppIDClass(PWINDOW).c_str()); if (!PWINDOW->m_pWLSurface.exists() || !PWINDOW->m_bIsMapped) { - Debug::log(WARN, "Window %x unmapped without being mapped??", PWINDOW); + Debug::log(WARN, "Window %lx unmapped without being mapped??", PWINDOW); PWINDOW->m_bFadingOut = false; return; } - g_pEventManager->postEvent(SHyprIPCEvent{"closewindow", getFormat("%x", PWINDOW)}); + g_pEventManager->postEvent(SHyprIPCEvent{"closewindow", getFormat("%lx", PWINDOW)}); EMIT_HOOK_EVENT("closeWindow", PWINDOW); g_pProtocolManager->m_pToplevelExportProtocolManager->onWindowUnmap(PWINDOW); @@ -667,7 +667,7 @@ void Events::listener_unmapWindow(void* owner, void* data) { if (wasLastWindow) { const auto PWINDOWCANDIDATE = g_pLayoutManager->getCurrentLayout()->getNextWindowCandidate(PWINDOW); - Debug::log(LOG, "On closed window, new focused candidate is %x", PWINDOWCANDIDATE); + Debug::log(LOG, "On closed window, new focused candidate is %lx", PWINDOWCANDIDATE); if (PWINDOWCANDIDATE != g_pCompositor->m_pLastWindow) { if (!PWINDOWCANDIDATE) @@ -681,7 +681,7 @@ void Events::listener_unmapWindow(void* owner, void* data) { Debug::log(LOG, "Unmapped was not focused, ignoring a refocus."); } - Debug::log(LOG, "Destroying the SubSurface tree of unmapped window %x", PWINDOW); + Debug::log(LOG, "Destroying the SubSurface tree of unmapped window %lx", PWINDOW); SubsurfaceTree::destroySurfaceTree(PWINDOW->m_pSurfaceTree); PWINDOW->m_pSurfaceTree = nullptr; @@ -730,13 +730,13 @@ void Events::listener_commitWindow(void* owner, void* data) { g_pHyprRenderer->damageSurface(PWINDOW->m_pWLSurface.wlr(), PWINDOW->m_vRealPosition.goalv().x, PWINDOW->m_vRealPosition.goalv().y); - // Debug::log(LOG, "Window %x committed", PWINDOW); // SPAM! + // Debug::log(LOG, "Window %lx committed", PWINDOW); // SPAM! } void Events::listener_destroyWindow(void* owner, void* data) { CWindow* PWINDOW = (CWindow*)owner; - Debug::log(LOG, "Window %x destroyed, queueing. (class %s)", PWINDOW, g_pXWaylandManager->getAppIDClass(PWINDOW).c_str()); + Debug::log(LOG, "Window %lx destroyed, queueing. (class %s)", PWINDOW, g_pXWaylandManager->getAppIDClass(PWINDOW).c_str()); if (PWINDOW->m_bIsX11) Debug::log(LOG, "XWayland class raw: %s", PWINDOW->m_uSurface.xwayland->_class); @@ -755,7 +755,7 @@ void Events::listener_destroyWindow(void* owner, void* data) { g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW); if (PWINDOW->m_pSurfaceTree) { - Debug::log(LOG, "Destroying Subsurface tree of %x in destroyWindow", PWINDOW); + Debug::log(LOG, "Destroying Subsurface tree of %lx in destroyWindow", PWINDOW); SubsurfaceTree::destroySurfaceTree(PWINDOW->m_pSurfaceTree); PWINDOW->m_pSurfaceTree = nullptr; } @@ -764,7 +764,7 @@ void Events::listener_destroyWindow(void* owner, void* data) { if (!PWINDOW->m_bFadingOut) { g_pCompositor->removeWindowFromVectorSafe(PWINDOW); // most likely X11 unmanaged or sumn - Debug::log(LOG, "Unmapped window %x removed instantly", PWINDOW); + Debug::log(LOG, "Unmapped window %lx removed instantly", PWINDOW); } } @@ -778,7 +778,7 @@ void Events::listener_setTitleWindow(void* owner, void* data) { if (PWINDOW == g_pCompositor->m_pLastWindow) { // if it's the active, let's post an event to update others g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(PWINDOW) + "," + PWINDOW->m_szTitle}); - g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", getFormat("%x", PWINDOW)}); + g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", getFormat("%lx", PWINDOW)}); EMIT_HOOK_EVENT("activeWindow", PWINDOW); } @@ -786,7 +786,7 @@ void Events::listener_setTitleWindow(void* owner, void* data) { g_pCompositor->updateWindowAnimatedDecorationValues(PWINDOW); PWINDOW->updateToplevel(); - Debug::log(LOG, "Window %x set title to %s", PWINDOW, PWINDOW->m_szTitle.c_str()); + Debug::log(LOG, "Window %lx set title to %s", PWINDOW, PWINDOW->m_szTitle.c_str()); } void Events::listener_fullscreenWindow(void* owner, void* data) { @@ -845,7 +845,7 @@ void Events::listener_fullscreenWindow(void* owner, void* data) { PWINDOW->updateToplevel(); - Debug::log(LOG, "Window %x fullscreen to %i", PWINDOW, PWINDOW->m_bIsFullscreen); + Debug::log(LOG, "Window %lx fullscreen to %i", PWINDOW, PWINDOW->m_bIsFullscreen); } void Events::listener_activateXDG(wl_listener* listener, void* data) { @@ -853,7 +853,7 @@ void Events::listener_activateXDG(wl_listener* listener, void* data) { static auto* const PFOCUSONACTIVATE = &g_pConfigManager->getConfigValuePtr("misc:focus_on_activate")->intValue; - Debug::log(LOG, "Activate request for surface at %x", E->surface); + Debug::log(LOG, "Activate request for surface at %lx", E->surface); if (!wlr_xdg_surface_try_from_wlr_surface(E->surface)) return; @@ -863,7 +863,7 @@ void Events::listener_activateXDG(wl_listener* listener, void* data) { if (!PWINDOW || PWINDOW == g_pCompositor->m_pLastWindow) return; - g_pEventManager->postEvent(SHyprIPCEvent{"urgent", getFormat("%x", PWINDOW)}); + g_pEventManager->postEvent(SHyprIPCEvent{"urgent", getFormat("%lx", PWINDOW)}); EMIT_HOOK_EVENT("urgent", PWINDOW); PWINDOW->m_bIsUrgent = true; @@ -889,11 +889,11 @@ void Events::listener_activateX11(void* owner, void* data) { static auto* const PFOCUSONACTIVATE = &g_pConfigManager->getConfigValuePtr("misc:focus_on_activate")->intValue; - Debug::log(LOG, "X11 Activate request for window %x", PWINDOW); + Debug::log(LOG, "X11 Activate request for window %lx", PWINDOW); if (PWINDOW->m_iX11Type == 2) { - Debug::log(LOG, "Unmanaged X11 %x requests activate", PWINDOW); + Debug::log(LOG, "Unmanaged X11 %lx requests activate", PWINDOW); if (g_pCompositor->m_pLastWindow && g_pCompositor->m_pLastWindow->getPID() != PWINDOW->getPID()) return; @@ -905,7 +905,7 @@ void Events::listener_activateX11(void* owner, void* data) { if (PWINDOW == g_pCompositor->m_pLastWindow) return; - g_pEventManager->postEvent(SHyprIPCEvent{"urgent", getFormat("%x", PWINDOW)}); + g_pEventManager->postEvent(SHyprIPCEvent{"urgent", getFormat("%lx", PWINDOW)}); EMIT_HOOK_EVENT("urgent", PWINDOW); if (!*PFOCUSONACTIVATE) @@ -986,7 +986,7 @@ void Events::listener_unmanagedSetGeometry(void* owner, void* data) { if (abs(std::floor(POS.x) - PWINDOW->m_uSurface.xwayland->x) > 2 || abs(std::floor(POS.y) - PWINDOW->m_uSurface.xwayland->y) > 2 || abs(std::floor(SIZ.x) - PWINDOW->m_uSurface.xwayland->width) > 2 || abs(std::floor(SIZ.y) - PWINDOW->m_uSurface.xwayland->height) > 2) { - Debug::log(LOG, "Unmanaged window %x requests geometry update to %i %i %i %i", PWINDOW, (int)PWINDOW->m_uSurface.xwayland->x, (int)PWINDOW->m_uSurface.xwayland->y, + Debug::log(LOG, "Unmanaged window %lx requests geometry update to %i %i %i %i", PWINDOW, (int)PWINDOW->m_uSurface.xwayland->x, (int)PWINDOW->m_uSurface.xwayland->y, (int)PWINDOW->m_uSurface.xwayland->width, (int)PWINDOW->m_uSurface.xwayland->height); g_pHyprRenderer->damageWindow(PWINDOW); @@ -1016,7 +1016,7 @@ void Events::listener_surfaceXWayland(wl_listener* listener, void* data) { Debug::log(LOG, "New XWayland Surface created (class %s).", XWSURFACE->_class); if (XWSURFACE->parent) - Debug::log(LOG, "Window parent data: %s at %x", XWSURFACE->parent->_class, XWSURFACE->parent); + Debug::log(LOG, "Window parent data: %s at %lx", XWSURFACE->parent->_class, XWSURFACE->parent); const auto PNEWWINDOW = (CWindow*)g_pCompositor->m_vWindows.emplace_back(std::make_unique()).get(); @@ -1059,7 +1059,7 @@ void Events::listener_requestMaximize(void* owner, void* data) { if (PWINDOW->m_bNoFullscreenRequest) return; - Debug::log(LOG, "Maximize request for %x", PWINDOW); + Debug::log(LOG, "Maximize request for %lx", PWINDOW); if (!PWINDOW->m_bIsX11) { const auto EV = (wlr_foreign_toplevel_handle_v1_maximized_event*)data; @@ -1078,7 +1078,7 @@ void Events::listener_requestMaximize(void* owner, void* data) { void Events::listener_requestMinimize(void* owner, void* data) { const auto PWINDOW = (CWindow*)owner; - Debug::log(LOG, "Minimize request for %x", PWINDOW); + Debug::log(LOG, "Minimize request for %lx", PWINDOW); if (PWINDOW->m_bIsX11) { if (!PWINDOW->m_bMappedX11 || PWINDOW->m_iX11Type != 1) @@ -1086,13 +1086,13 @@ void Events::listener_requestMinimize(void* owner, void* data) { const auto E = (wlr_xwayland_minimize_event*)data; - g_pEventManager->postEvent({"minimize", getFormat("%x,%i", PWINDOW, (int)E->minimize)}); + g_pEventManager->postEvent({"minimize", getFormat("%lx,%i", PWINDOW, (int)E->minimize)}); EMIT_HOOK_EVENT("minimize", (std::vector{PWINDOW, (void*)E->minimize})); wlr_xwayland_surface_set_minimized(PWINDOW->m_uSurface.xwayland, E->minimize && g_pCompositor->m_pLastWindow != PWINDOW); // fucking DXVK } else { const auto E = (wlr_foreign_toplevel_handle_v1_minimized_event*)data; - g_pEventManager->postEvent({"minimize", getFormat("%x,%i", PWINDOW, E ? (int)E->minimized : 1)}); + g_pEventManager->postEvent({"minimize", getFormat("%lx,%i", PWINDOW, E ? (int)E->minimized : 1)}); EMIT_HOOK_EVENT("minimize", (std::vector{PWINDOW, (void*)(E ? (uint64_t)E->minimized : 1)})); } } diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index ecbfa308..5db59a64 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -149,7 +149,7 @@ void addWLSignal(wl_signal* pSignal, wl_listener* pListener, void* pOwner, const wl_signal_add(pSignal, pListener); - Debug::log(LOG, "Registered signal for owner %x: %x -> %x (owner: %s)", pOwner, pSignal, pListener, ownerString.c_str()); + Debug::log(LOG, "Registered signal for owner %lx: %lx -> %lx (owner: %s)", pOwner, pSignal, pListener, ownerString.c_str()); } void handleNoop(struct wl_listener* listener, void* data) { diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 98e83fc6..a060665b 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -132,7 +132,7 @@ void CMonitor::onConnect(bool noRule) { wlr_xcursor_manager_load(g_pCompositor->m_sWLRXCursorMgr, scale); - Debug::log(LOG, "Added new monitor with name %s at %i,%i with size %ix%i, pointer %x", output->name, (int)vecPosition.x, (int)vecPosition.y, (int)vecPixelSize.x, + Debug::log(LOG, "Added new monitor with name %s at %i,%i with size %ix%i, pointer %lx", output->name, (int)vecPosition.x, (int)vecPosition.y, (int)vecPixelSize.x, (int)vecPixelSize.y, output); // add a WLR workspace group diff --git a/src/helpers/SubsurfaceTree.cpp b/src/helpers/SubsurfaceTree.cpp index e6915525..df725cbd 100644 --- a/src/helpers/SubsurfaceTree.cpp +++ b/src/helpers/SubsurfaceTree.cpp @@ -55,7 +55,7 @@ SSurfaceTreeNode* createSubsurfaceNode(SSurfaceTreeNode* pParent, SSubsurface* p PNODE->pParent = pParent; PNODE->pSubsurface = pSubsurface; - Debug::log(LOG, "Creating a subsurface Node! (pWindow: %x)", pWindow); + Debug::log(LOG, "Creating a subsurface Node! (pWindow: %lx)", pWindow); return PNODE; } @@ -63,7 +63,7 @@ SSurfaceTreeNode* createSubsurfaceNode(SSurfaceTreeNode* pParent, SSubsurface* p SSurfaceTreeNode* SubsurfaceTree::createTreeRoot(wlr_surface* pSurface, applyGlobalOffsetFn fn, void* data, CWindow* pWindow) { const auto PNODE = createTree(pSurface, pWindow); - Debug::log(LOG, "Creating a surfaceTree Root! (pWindow: %x)", pWindow); + Debug::log(LOG, "Creating a surfaceTree Root! (pWindow: %lx)", pWindow); PNODE->offsetfn = fn; PNODE->globalOffsetData = data; @@ -83,7 +83,7 @@ void SubsurfaceTree::destroySurfaceTree(SSurfaceTreeNode* pNode) { } if (!exists) { - Debug::log(ERR, "Tried to remove a SurfaceTreeNode that doesn't exist?? (Node %x)", pNode); + Debug::log(ERR, "Tried to remove a SurfaceTreeNode that doesn't exist?? (Node %lx)", pNode); return; } @@ -145,7 +145,7 @@ void Events::listener_newSubsurfaceNode(void* owner, void* data) { const auto PNEWSUBSURFACE = &pNode->childSubsurfaces.emplace_back(); - Debug::log(LOG, "Added a new subsurface %x", PSUBSURFACE); + Debug::log(LOG, "Added a new subsurface %lx", PSUBSURFACE); PNEWSUBSURFACE->pSubsurface = PSUBSURFACE; PNEWSUBSURFACE->pParent = pNode; @@ -174,7 +174,7 @@ void Events::listener_mapSubsurface(void* owner, void* data) { if (subsurface->pChild) return; - Debug::log(LOG, "Subsurface %x mapped", subsurface->pSubsurface); + Debug::log(LOG, "Subsurface %lx mapped", subsurface->pSubsurface); subsurface->pChild = createSubsurfaceNode(subsurface->pParent, subsurface, subsurface->pSubsurface->surface, subsurface->pWindowOwner); } @@ -182,7 +182,7 @@ void Events::listener_mapSubsurface(void* owner, void* data) { void Events::listener_unmapSubsurface(void* owner, void* data) { SSubsurface* subsurface = (SSubsurface*)owner; - Debug::log(LOG, "Subsurface %x unmapped", subsurface); + Debug::log(LOG, "Subsurface %lx unmapped", subsurface); if (subsurface->pSubsurface->surface == g_pCompositor->m_pLastFocus) g_pInputManager->releaseAllMouseButtons(); @@ -221,7 +221,7 @@ void Events::listener_commitSubsurface(void* owner, void* data) { if (!g_pHyprRenderer->shouldRenderWindow(pNode->pWindowOwner)) { static auto* const PLOGDAMAGE = &g_pConfigManager->getConfigValuePtr("debug:log_damage")->intValue; if (*PLOGDAMAGE) - Debug::log(LOG, "Refusing to commit damage from %x because it's invisible.", pNode->pWindowOwner); + Debug::log(LOG, "Refusing to commit damage from %lx because it's invisible.", pNode->pWindowOwner); return; } @@ -252,7 +252,7 @@ void Events::listener_destroySubsurface(void* owner, void* data) { SubsurfaceTree::destroySurfaceTree(subsurface->pChild); } - Debug::log(LOG, "Subsurface %x destroyed", subsurface); + Debug::log(LOG, "Subsurface %lx destroyed", subsurface); subsurface->hyprListener_destroy.removeCallback(); subsurface->hyprListener_map.removeCallback(); @@ -264,7 +264,7 @@ void Events::listener_destroySubsurface(void* owner, void* data) { void Events::listener_destroySubsurfaceNode(void* owner, void* data) { SSurfaceTreeNode* pNode = (SSurfaceTreeNode*)owner; - Debug::log(LOG, "Subsurface Node %x destroyed", pNode); + Debug::log(LOG, "Subsurface Node %lx destroyed", pNode); for (auto& c : pNode->childSubsurfaces) destroySubsurface(&c); diff --git a/src/helpers/WLListener.cpp b/src/helpers/WLListener.cpp index 7070c9c8..e104b780 100644 --- a/src/helpers/WLListener.cpp +++ b/src/helpers/WLListener.cpp @@ -25,7 +25,7 @@ CHyprWLListener::~CHyprWLListener() { void CHyprWLListener::removeCallback() { if (isConnected()) { - Debug::log(LOG, "Callback %x -> %x, %s removed.", &m_pCallback, &m_pOwner, m_szAuthor.c_str()); + Debug::log(LOG, "Callback %lx -> %lx, %s removed.", &m_pCallback, &m_pOwner, m_szAuthor.c_str()); wl_list_remove(&m_swWrapper.m_sListener.link); wl_list_init(&m_swWrapper.m_sListener.link); } diff --git a/src/helpers/WLSurface.cpp b/src/helpers/WLSurface.cpp index 4bb35135..d069818f 100644 --- a/src/helpers/WLSurface.cpp +++ b/src/helpers/WLSurface.cpp @@ -39,7 +39,7 @@ void CWLSurface::destroy() { m_pWLRSurface = nullptr; - Debug::log(LOG, "CWLSurface %x called destroy()", this); + Debug::log(LOG, "CWLSurface %lx called destroy()", this); } void CWLSurface::init() { @@ -53,5 +53,5 @@ void CWLSurface::init() { hyprListener_destroy.initCallback( &m_pWLRSurface->events.destroy, [&](void* owner, void* data) { destroy(); }, this, "CWLSurface"); - Debug::log(LOG, "CWLSurface %x called init()", this); + Debug::log(LOG, "CWLSurface %lx called init()", this); } \ No newline at end of file diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index e05e9a7a..b267223b 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -98,7 +98,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for } if (!PMONITOR) { - Debug::log(ERR, "Orphaned Node %x (workspace ID: %i)!!", pNode, pNode->workspaceID); + Debug::log(ERR, "Orphaned Node %lx (workspace ID: %i)!!", pNode, pNode->workspaceID); return; } @@ -115,7 +115,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for const auto PWINDOW = pNode->pWindow; if (!g_pCompositor->windowExists(PWINDOW) || !PWINDOW->m_bIsMapped) { - Debug::log(ERR, "Node %x holding invalid window %x!!", pNode, PWINDOW); + Debug::log(ERR, "Node %lx holding invalid window %lx!!", pNode, PWINDOW); onWindowRemovedTiling(PWINDOW); return; } @@ -252,7 +252,7 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) { } else OPENINGON = getFirstNodeOnWorkspace(pWindow->m_iWorkspaceID); - Debug::log(LOG, "OPENINGON: %x, Workspace: %i, Monitor: %i", OPENINGON, PNODE->workspaceID, PMONITOR->ID); + Debug::log(LOG, "OPENINGON: %lx, Workspace: %i, Monitor: %i", OPENINGON, PNODE->workspaceID, PMONITOR->ID); if (OPENINGON && OPENINGON->workspaceID != PNODE->workspaceID) { // special workspace handling diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 53340e55..b3615859 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -76,7 +76,7 @@ void IHyprLayout::onWindowCreatedFloating(CWindow* pWindow) { const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); if (!PMONITOR) { - Debug::log(ERR, "Window %x (%s) has an invalid monitor in onWindowCreatedFloating!!!", pWindow, pWindow->m_szTitle.c_str()); + Debug::log(ERR, "Window %lx (%s) has an invalid monitor in onWindowCreatedFloating!!!", pWindow, pWindow->m_szTitle.c_str()); return; } @@ -368,7 +368,7 @@ void IHyprLayout::changeWindowFloatingMode(CWindow* pWindow) { const auto TILED = isWindowTiled(pWindow); // event - g_pEventManager->postEvent(SHyprIPCEvent{"changefloatingmode", getFormat("%x,%d", pWindow, (int)TILED)}); + g_pEventManager->postEvent(SHyprIPCEvent{"changefloatingmode", getFormat("%lx,%d", pWindow, (int)TILED)}); EMIT_HOOK_EVENT("changeFloatingMode", pWindow); if (!TILED) { diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index b1322d4b..0e6e42a3 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -270,7 +270,7 @@ void CHyprMasterLayout::calculateWorkspace(const int& ws) { if ((WINDOWS < 2) && !centerMasterWindow) { PMASTERNODE->position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition; PMASTERNODE->size = Vector2D(PMONITOR->vecSize.x - PMONITOR->vecReservedTopLeft.x - PMONITOR->vecReservedBottomRight.x, - PMONITOR->vecSize.y - PMONITOR->vecReservedBottomRight.y - PMONITOR->vecReservedTopLeft.y); + PMONITOR->vecSize.y - PMONITOR->vecReservedBottomRight.y - PMONITOR->vecReservedTopLeft.y); applyNodeDataToWindow(PMASTERNODE); return; } else if (orientation == ORIENTATION_LEFT || orientation == ORIENTATION_RIGHT || (orientation == ORIENTATION_CENTER && STACKWINDOWS <= 1)) { @@ -468,7 +468,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) { } if (!PMONITOR) { - Debug::log(ERR, "Orphaned Node %x (workspace ID: %i)!!", pNode, pNode->workspaceID); + Debug::log(ERR, "Orphaned Node %lx (workspace ID: %i)!!", pNode, pNode->workspaceID); return; } @@ -485,7 +485,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) { const auto PWINDOW = pNode->pWindow; if (!g_pCompositor->windowValidMapped(PWINDOW)) { - Debug::log(ERR, "Node %x holding invalid window %x!!", pNode, PWINDOW); + Debug::log(ERR, "Node %lx holding invalid window %lx!!", pNode, PWINDOW); return; } diff --git a/src/managers/input/IdleInhibitor.cpp b/src/managers/input/IdleInhibitor.cpp index 3e3411fb..d54ec96a 100644 --- a/src/managers/input/IdleInhibitor.cpp +++ b/src/managers/input/IdleInhibitor.cpp @@ -33,7 +33,7 @@ void CInputManager::newIdleInhibitor(wlr_idle_inhibitor_v1* pInhibitor) { PINHIBIT->pWindow = g_pCompositor->getWindowFromSurface(pInhibitor->surface); if (PINHIBIT->pWindow) - Debug::log(LOG, "IdleInhibitor got window %x (%s)", PINHIBIT->pWindow, PINHIBIT->pWindow->m_szTitle.c_str()); + Debug::log(LOG, "IdleInhibitor got window %lx (%s)", PINHIBIT->pWindow, PINHIBIT->pWindow->m_szTitle.c_str()); recheckIdleInhibitorStatus(); } diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 9eebc93a..5a0639a1 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -626,7 +626,7 @@ void CInputManager::newKeyboard(wlr_input_device* keyboard) { wlr_seat_set_keyboard(g_pCompositor->m_sSeat.seat, wlr_keyboard_from_input_device(keyboard)); - Debug::log(LOG, "New keyboard created, pointers Hypr: %x and WLR: %x", PNEWKEYBOARD, keyboard); + Debug::log(LOG, "New keyboard created, pointers Hypr: %lx and WLR: %lx", PNEWKEYBOARD, keyboard); } void CInputManager::newVirtualKeyboard(wlr_input_device* keyboard) { @@ -665,7 +665,7 @@ void CInputManager::newVirtualKeyboard(wlr_input_device* keyboard) { wlr_seat_set_keyboard(g_pCompositor->m_sSeat.seat, wlr_keyboard_from_input_device(keyboard)); - Debug::log(LOG, "New virtual keyboard created, pointers Hypr: %x and WLR: %x", PNEWKEYBOARD, keyboard); + Debug::log(LOG, "New virtual keyboard created, pointers Hypr: %lx and WLR: %lx", PNEWKEYBOARD, keyboard); } void CInputManager::setKeyboardLayout() { @@ -832,7 +832,7 @@ void CInputManager::newMouse(wlr_input_device* mouse, bool virt) { m_tmrLastCursorMovement.reset(); - Debug::log(LOG, "New mouse created, pointer WLR: %x", mouse); + Debug::log(LOG, "New mouse created, pointer WLR: %lx", mouse); } void CInputManager::setPointerConfigs() { @@ -1167,7 +1167,7 @@ void CInputManager::constrainMouse(SMouse* pMouse, wlr_pointer_constraint_v1* co pMouse->hyprListener_commitConstraint.initCallback(&pMouse->currentConstraint->surface->events.commit, &Events::listener_commitConstraint, pMouse, "Mouse constraint commit"); - Debug::log(LOG, "Constrained mouse to %x", pMouse->currentConstraint); + Debug::log(LOG, "Constrained mouse to %lx", pMouse->currentConstraint); } void CInputManager::unconstrainMouse() { @@ -1286,7 +1286,7 @@ void CInputManager::newTouchDevice(wlr_input_device* pDevice) { setTouchDeviceConfigs(); wlr_cursor_attach_input_device(g_pCompositor->m_sWLRCursor, pDevice); - Debug::log(LOG, "New touch device added at %x", PNEWDEV); + Debug::log(LOG, "New touch device added at %lx", PNEWDEV); PNEWDEV->hyprListener_destroy.initCallback( &pDevice->events.destroy, [&](void* owner, void* data) { destroyTouchDevice((STouchDevice*)data); }, PNEWDEV, "TouchDevice"); @@ -1336,7 +1336,7 @@ void CInputManager::setTabletConfigs() { } void CInputManager::destroyTouchDevice(STouchDevice* pDevice) { - Debug::log(LOG, "Touch device at %x removed", pDevice); + Debug::log(LOG, "Touch device at %lx removed", pDevice); m_lTouchDevices.remove(*pDevice); } diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index 10a850c5..01b8dcec 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -145,7 +145,7 @@ STabletTool* CInputManager::ensureTabletToolPresent(wlr_tablet_tool* pTool) { if (pTool->data == nullptr) { const auto PTOOL = &m_lTabletTools.emplace_back(); - Debug::log(LOG, "Creating tablet tool v2 for %x", pTool); + Debug::log(LOG, "Creating tablet tool v2 for %lx", pTool); PTOOL->wlrTabletTool = pTool; pTool->data = PTOOL; diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp index e2c458d4..9826ad15 100644 --- a/src/protocols/Screencopy.cpp +++ b/src/protocols/Screencopy.cpp @@ -429,7 +429,7 @@ bool CScreencopyProtocolManager::copyFrameShm(SScreencopyFrame* frame, timespec* const auto PFORMAT = get_gles2_format_from_drm(format); if (!PFORMAT) { - Debug::log(ERR, "[screencopy] Cannot read pixels, unsupported format %x", PFORMAT); + Debug::log(ERR, "[screencopy] Cannot read pixels, unsupported format %lx", PFORMAT); wlr_output_rollback(PMONITOR->output); pixman_region32_fini(&fakeDamage); wlr_buffer_end_data_ptr_access(frame->buffer); diff --git a/src/protocols/TextInputV1.cpp b/src/protocols/TextInputV1.cpp index 64c423f7..5117a382 100644 --- a/src/protocols/TextInputV1.cpp +++ b/src/protocols/TextInputV1.cpp @@ -140,7 +140,7 @@ static void destroyTI(wl_resource* resource) { void CTextInputV1ProtocolManager::createTI(wl_client* client, wl_resource* resource, uint32_t id) { const auto PTI = m_pClients.emplace_back(std::make_unique()).get(); - Debug::log(LOG, "New TI V1 at %x", PTI); + Debug::log(LOG, "New TI V1 at %lx", PTI); PTI->client = client; PTI->resourceCaller = resource; diff --git a/src/protocols/ToplevelExport.cpp b/src/protocols/ToplevelExport.cpp index 600c9ea0..f78058f6 100644 --- a/src/protocols/ToplevelExport.cpp +++ b/src/protocols/ToplevelExport.cpp @@ -151,14 +151,14 @@ void CToplevelExportProtocolManager::captureToplevel(wl_client* client, wl_resou PFRAME->pWindow = pWindow; if (!PFRAME->pWindow) { - Debug::log(ERR, "Client requested sharing of window handle %x which does not exist!", PFRAME->pWindow); + Debug::log(ERR, "Client requested sharing of window handle %lx which does not exist!", PFRAME->pWindow); hyprland_toplevel_export_frame_v1_send_failed(PFRAME->resource); removeFrame(PFRAME); return; } if (!PFRAME->pWindow->m_bIsMapped || PFRAME->pWindow->isHidden()) { - Debug::log(ERR, "Client requested sharing of window handle %x which is not shareable!", PFRAME->pWindow); + Debug::log(ERR, "Client requested sharing of window handle %lx which is not shareable!", PFRAME->pWindow); hyprland_toplevel_export_frame_v1_send_failed(PFRAME->resource); removeFrame(PFRAME); return; @@ -219,7 +219,7 @@ void CToplevelExportProtocolManager::copyFrame(wl_client* client, wl_resource* r } if (!PFRAME->pWindow->m_bIsMapped || PFRAME->pWindow->isHidden()) { - Debug::log(ERR, "Client requested sharing of window handle %x which is not shareable (2)!", PFRAME->pWindow); + Debug::log(ERR, "Client requested sharing of window handle %lx which is not shareable (2)!", PFRAME->pWindow); hyprland_toplevel_export_frame_v1_send_failed(PFRAME->resource); removeFrame(PFRAME); return; @@ -397,7 +397,7 @@ bool CToplevelExportProtocolManager::copyFrameShm(SScreencopyFrame* frame, times // copy pixels const auto PFORMAT = get_gles2_format_from_drm(format); if (!PFORMAT) { - Debug::log(ERR, "[toplevel_export] Cannot read pixels, unsupported format %x", PFORMAT); + Debug::log(ERR, "[toplevel_export] Cannot read pixels, unsupported format %lx", PFORMAT); g_pHyprOpenGL->end(); pixman_region32_fini(&fakeDamage); wlr_buffer_end_data_ptr_access(frame->buffer); diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 5d1968e2..44755c1a 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -747,7 +747,7 @@ bool CHyprRenderer::attemptDirectScanout(CMonitor* pMonitor) { if (wlr_output_commit(pMonitor->output)) { if (!m_pLastScanout) { m_pLastScanout = PCANDIDATE; - Debug::log(LOG, "Entered a direct scanout to %x: \"%s\"", PCANDIDATE, PCANDIDATE->m_szTitle.c_str()); + Debug::log(LOG, "Entered a direct scanout to %lx: \"%s\"", PCANDIDATE, PCANDIDATE->m_szTitle.c_str()); } } else { m_pLastScanout = nullptr; @@ -1029,7 +1029,7 @@ void CHyprRenderer::setWindowScanoutMode(CWindow* pWindow) { if (!pWindow->m_bIsFullscreen) { wlr_linux_dmabuf_v1_set_surface_feedback(g_pCompositor->m_sWLRLinuxDMABuf, pWindow->m_pWLSurface.wlr(), nullptr); - Debug::log(LOG, "Scanout mode OFF set for %x", pWindow); + Debug::log(LOG, "Scanout mode OFF set for %lx", pWindow); return; } @@ -1048,7 +1048,7 @@ void CHyprRenderer::setWindowScanoutMode(CWindow* pWindow) { wlr_linux_dmabuf_v1_set_surface_feedback(g_pCompositor->m_sWLRLinuxDMABuf, pWindow->m_pWLSurface.wlr(), &feedback); wlr_linux_dmabuf_feedback_v1_finish(&feedback); - Debug::log(LOG, "Scanout mode ON set for %x", pWindow); + Debug::log(LOG, "Scanout mode ON set for %lx", pWindow); } void CHyprRenderer::outputMgrApplyTest(wlr_output_configuration_v1* config, bool test) { @@ -1237,7 +1237,7 @@ void CHyprRenderer::arrangeLayerArray(CMonitor* pMonitor, const std::vectormargin.bottom; } if (box.width <= 0 || box.height <= 0) { - Debug::log(ERR, "LayerSurface %x has a negative/zero w/h???", ls.get()); + Debug::log(ERR, "LayerSurface %lx has a negative/zero w/h???", ls.get()); continue; } // Apply @@ -1247,7 +1247,7 @@ void CHyprRenderer::arrangeLayerArray(CMonitor* pMonitor, const std::vectorlayerSurface, box.width, box.height); - Debug::log(LOG, "LayerSurface %x arranged: x: %i y: %i w: %i h: %i with margins: t: %i l: %i r: %i b: %i", &ls, box.x, box.y, box.width, box.height, PSTATE->margin.top, + Debug::log(LOG, "LayerSurface %lx arranged: x: %i y: %i w: %i h: %i with margins: t: %i l: %i r: %i b: %i", &ls, box.x, box.y, box.width, box.height, PSTATE->margin.top, PSTATE->margin.left, PSTATE->margin.right, PSTATE->margin.bottom); } }