diff --git a/src/portals/GlobalShortcuts.cpp b/src/portals/GlobalShortcuts.cpp index 903cd0f..bacd36b 100644 --- a/src/portals/GlobalShortcuts.cpp +++ b/src/portals/GlobalShortcuts.cpp @@ -47,9 +47,9 @@ SKeybind* CGlobalShortcutsPortal::getShortcutById(const std::string& appID, cons } SKeybind* CGlobalShortcutsPortal::registerShortcut(SSession* session, const DBusShortcut& shortcut) { - std::string id = shortcut.get<0>(); + std::string id = shortcut.get<0>(); std::unordered_map data = shortcut.get<1>(); - std::string description; + std::string description; for (auto& [k, v] : data) { if (k == "description") @@ -63,8 +63,7 @@ SKeybind* CGlobalShortcutsPortal::registerShortcut(SSession* session, const DBus Debug::log(WARN, "[globalshortcuts] shortcut {} already registered for appid {}", id, session->appid); else { PSHORTCUT = session->keybinds.emplace_back(std::make_unique()).get(); - PSHORTCUT->shortcut = - hyprland_global_shortcuts_manager_v1_register_shortcut(m_sState.manager, id.c_str(), session->appid.c_str(), description.c_str(), ""); + PSHORTCUT->shortcut = hyprland_global_shortcuts_manager_v1_register_shortcut(m_sState.manager, id.c_str(), session->appid.c_str(), description.c_str(), ""); hyprland_global_shortcut_v1_add_listener(PSHORTCUT->shortcut, &shortcutListener, PSHORTCUT); } @@ -142,7 +141,7 @@ void CGlobalShortcutsPortal::onBindShortcuts(sdbus::MethodCall& call) { PSESSION->registered = true; for (auto& s : shortcuts) { - const auto* PSHORTCUT = registerShortcut(PSESSION, s); + const auto* PSHORTCUT = registerShortcut(PSESSION, s); std::unordered_map shortcutData; shortcutData["description"] = PSHORTCUT->description; diff --git a/src/portals/GlobalShortcuts.hpp b/src/portals/GlobalShortcuts.hpp index baf7a09..bafaaa8 100644 --- a/src/portals/GlobalShortcuts.hpp +++ b/src/portals/GlobalShortcuts.hpp @@ -41,12 +41,12 @@ class CGlobalShortcutsPortal { std::unique_ptr m_pObject; - using DBusShortcut = sdbus::Struct>; + using DBusShortcut = sdbus::Struct>; - SSession* getSession(sdbus::ObjectPath& path); - SKeybind* getShortcutById(const std::string& appID, const std::string& shortcutId); - SKeybind* registerShortcut(SSession* session, const DBusShortcut& shortcut); + SSession* getSession(sdbus::ObjectPath& path); + SKeybind* getShortcutById(const std::string& appID, const std::string& shortcutId); + SKeybind* registerShortcut(SSession* session, const DBusShortcut& shortcut); - const std::string INTERFACE_NAME = "org.freedesktop.impl.portal.GlobalShortcuts"; - const std::string OBJECT_PATH = "/org/freedesktop/portal/desktop"; + const std::string INTERFACE_NAME = "org.freedesktop.impl.portal.GlobalShortcuts"; + const std::string OBJECT_PATH = "/org/freedesktop/portal/desktop"; }; \ No newline at end of file diff --git a/src/portals/Screencopy.cpp b/src/portals/Screencopy.cpp index 48f951f..9a11c99 100644 --- a/src/portals/Screencopy.cpp +++ b/src/portals/Screencopy.cpp @@ -281,7 +281,7 @@ static void hlOnBufferDone(void* data, hyprland_toplevel_export_frame_v1* frame) hyprland_toplevel_export_frame_v1_copy(frame, PSTREAM->currentPWBuffer->wlBuffer, false); PSESSION->sharingData.copyRetries = 0; - + Debug::log(TRACE, "[sc] wlr frame copied"); } diff --git a/src/portals/Screenshot.cpp b/src/portals/Screenshot.cpp index 8cbf872..322b707 100644 --- a/src/portals/Screenshot.cpp +++ b/src/portals/Screenshot.cpp @@ -41,7 +41,7 @@ void pickHyprPicker(sdbus::MethodCall& call) { auto [r, g, b] = colors; std::unordered_map results; - results["color"] = sdbus::Struct(std::tuple{r / 255.0, g / 255.0, b / 255.0}); + results["color"] = sdbus::Struct(r / 255.0, g / 255.0, b / 255.0); auto reply = call.createReply(); @@ -91,7 +91,7 @@ void pickSlurp(sdbus::MethodCall& call) { auto reply = call.createReply(); std::unordered_map results; - results["color"] = sdbus::Struct(std::tuple{r, g, b}); + results["color"] = sdbus::Struct(r, g, b); reply << (uint32_t)0; reply << results;