core: add explicit casts to wl_proxy* for clang

fixes #261
This commit is contained in:
Vaxry 2024-09-21 00:24:39 +01:00
parent 73b8c4f115
commit ac1b8c3067
2 changed files with 12 additions and 12 deletions

View file

@ -53,24 +53,24 @@ void CPortalManager::onGlobal(uint32_t name, const char* interface, uint32_t ver
Debug::log(LOG, " | Got interface: {} (ver {})", INTERFACE, version); Debug::log(LOG, " | Got interface: {} (ver {})", INTERFACE, version);
if (INTERFACE == zwlr_screencopy_manager_v1_interface.name && m_sPipewire.loop) { if (INTERFACE == zwlr_screencopy_manager_v1_interface.name && m_sPipewire.loop) {
m_sPortals.screencopy = std::make_unique<CScreencopyPortal>( m_sPortals.screencopy = std::make_unique<CScreencopyPortal>(makeShared<CCZwlrScreencopyManagerV1>(
makeShared<CCZwlrScreencopyManagerV1>(wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &zwlr_screencopy_manager_v1_interface, version))); (wl_proxy*)wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &zwlr_screencopy_manager_v1_interface, version)));
} }
if (INTERFACE == hyprland_global_shortcuts_manager_v1_interface.name) { if (INTERFACE == hyprland_global_shortcuts_manager_v1_interface.name) {
m_sPortals.globalShortcuts = std::make_unique<CGlobalShortcutsPortal>(makeShared<CCHyprlandGlobalShortcutsManagerV1>( m_sPortals.globalShortcuts = std::make_unique<CGlobalShortcutsPortal>(makeShared<CCHyprlandGlobalShortcutsManagerV1>(
wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &hyprland_global_shortcuts_manager_v1_interface, version))); (wl_proxy*)wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &hyprland_global_shortcuts_manager_v1_interface, version)));
} }
else if (INTERFACE == hyprland_toplevel_export_manager_v1_interface.name) { else if (INTERFACE == hyprland_toplevel_export_manager_v1_interface.name) {
m_sWaylandConnection.hyprlandToplevelMgr = makeShared<CCHyprlandToplevelExportManagerV1>( m_sWaylandConnection.hyprlandToplevelMgr = makeShared<CCHyprlandToplevelExportManagerV1>(
wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &hyprland_toplevel_export_manager_v1_interface, version)); (wl_proxy*)wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &hyprland_toplevel_export_manager_v1_interface, version));
} }
else if (INTERFACE == wl_output_interface.name) { else if (INTERFACE == wl_output_interface.name) {
const auto POUTPUT = m_vOutputs const auto POUTPUT = m_vOutputs
.emplace_back(std::make_unique<SOutput>( .emplace_back(std::make_unique<SOutput>(makeShared<CCWlOutput>(
makeShared<CCWlOutput>(wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &wl_output_interface, version)))) (wl_proxy*)wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &wl_output_interface, version))))
.get(); .get();
POUTPUT->id = name; POUTPUT->id = name;
} }
@ -82,7 +82,7 @@ void CPortalManager::onGlobal(uint32_t name, const char* interface, uint32_t ver
} }
m_sWaylandConnection.linuxDmabuf = m_sWaylandConnection.linuxDmabuf =
makeShared<CCZwpLinuxDmabufV1>(wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &zwp_linux_dmabuf_v1_interface, version)); makeShared<CCZwpLinuxDmabufV1>((wl_proxy*)wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &zwp_linux_dmabuf_v1_interface, version));
m_sWaylandConnection.linuxDmabufFeedback = makeShared<CCZwpLinuxDmabufFeedbackV1>(m_sWaylandConnection.linuxDmabuf->sendGetDefaultFeedback()); m_sWaylandConnection.linuxDmabufFeedback = makeShared<CCZwpLinuxDmabufFeedbackV1>(m_sWaylandConnection.linuxDmabuf->sendGetDefaultFeedback());
m_sWaylandConnection.linuxDmabufFeedback->setMainDevice([this](CCZwpLinuxDmabufFeedbackV1* r, wl_array* device_arr) { m_sWaylandConnection.linuxDmabufFeedback->setMainDevice([this](CCZwpLinuxDmabufFeedbackV1* r, wl_array* device_arr) {
@ -180,9 +180,8 @@ void CPortalManager::onGlobal(uint32_t name, const char* interface, uint32_t ver
} }
else if (INTERFACE == wl_shm_interface.name) { else if (INTERFACE == wl_shm_interface.name)
m_sWaylandConnection.shm = makeShared<CCWlShm>(wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &wl_shm_interface, version)); m_sWaylandConnection.shm = makeShared<CCWlShm>((wl_proxy*)wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(), name, &wl_shm_interface, version));
}
else if (INTERFACE == zwlr_foreign_toplevel_manager_v1_interface.name) { else if (INTERFACE == zwlr_foreign_toplevel_manager_v1_interface.name) {
m_sHelpers.toplevel = std::make_unique<CToplevelManager>(name, version); m_sHelpers.toplevel = std::make_unique<CToplevelManager>(name, version);

View file

@ -34,7 +34,8 @@ void CToplevelManager::activate() {
if (m_pManager || m_iActivateLocks < 1) if (m_pManager || m_iActivateLocks < 1)
return; return;
m_pManager = makeShared<CCZwlrForeignToplevelManagerV1>(wl_registry_bind((wl_registry*)g_pPortalManager->m_sWaylandConnection.registry->resource(), m_sWaylandConnection.name, m_pManager =
makeShared<CCZwlrForeignToplevelManagerV1>((wl_proxy*)wl_registry_bind((wl_registry*)g_pPortalManager->m_sWaylandConnection.registry->resource(), m_sWaylandConnection.name,
&zwlr_foreign_toplevel_manager_v1_interface, m_sWaylandConnection.version)); &zwlr_foreign_toplevel_manager_v1_interface, m_sWaylandConnection.version));
m_pManager->setToplevel([this](CCZwlrForeignToplevelManagerV1* r, wl_proxy* newHandle) { m_pManager->setToplevel([this](CCZwlrForeignToplevelManagerV1* r, wl_proxy* newHandle) {