mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-23 22:55:58 +01:00
fix warnings
This commit is contained in:
parent
3faa42ca5b
commit
c9347d8e9b
2 changed files with 6 additions and 27 deletions
|
@ -280,30 +280,6 @@ static const hyprland_toplevel_export_frame_v1_listener hyprlandFrameListener =
|
||||||
|
|
||||||
// --------------------------------------------------------- //
|
// --------------------------------------------------------- //
|
||||||
|
|
||||||
static void onCloseRequest(sdbus::MethodCall& call, CScreencopyPortal::SSession* sess) {
|
|
||||||
Debug::log(TRACE, "[screencopy] Close Request {}", (void*)sess);
|
|
||||||
|
|
||||||
if (!sess || !sess->request)
|
|
||||||
return;
|
|
||||||
|
|
||||||
auto r = call.createReply();
|
|
||||||
r.send();
|
|
||||||
|
|
||||||
sess->request.release();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void onCloseSession(sdbus::MethodCall& call, CScreencopyPortal::SSession* sess) {
|
|
||||||
Debug::log(TRACE, "[screencopy] Close Session {}", (void*)sess);
|
|
||||||
|
|
||||||
if (!sess || !sess->session)
|
|
||||||
return;
|
|
||||||
|
|
||||||
auto r = call.createReply();
|
|
||||||
r.send();
|
|
||||||
|
|
||||||
sess->session.release();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CScreencopyPortal::onCreateSession(sdbus::MethodCall& call) {
|
void CScreencopyPortal::onCreateSession(sdbus::MethodCall& call) {
|
||||||
sdbus::ObjectPath requestHandle, sessionHandle;
|
sdbus::ObjectPath requestHandle, sessionHandle;
|
||||||
|
|
||||||
|
@ -445,8 +421,8 @@ void CScreencopyPortal::onSelectSources(sdbus::MethodCall& call) {
|
||||||
if (windowHandle != 0 || !windowClass.empty()) {
|
if (windowHandle != 0 || !windowClass.empty()) {
|
||||||
if (windowHandle != 0) {
|
if (windowHandle != 0) {
|
||||||
for (auto& h : g_pPortalManager->m_sHelpers.toplevel->m_vToplevels) {
|
for (auto& h : g_pPortalManager->m_sHelpers.toplevel->m_vToplevels) {
|
||||||
if (h->handle == windowHandle) {
|
if ((uint64_t)h->handle == windowHandle) {
|
||||||
restoreData.windowHandle = h->handle;
|
restoreData.windowHandle = (uint64_t)h->handle;
|
||||||
Debug::log(LOG, "[screencopy] token v3 window found by handle {}", (void*)windowHandle);
|
Debug::log(LOG, "[screencopy] token v3 window found by handle {}", (void*)windowHandle);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -457,7 +433,7 @@ void CScreencopyPortal::onSelectSources(sdbus::MethodCall& call) {
|
||||||
// try class
|
// try class
|
||||||
for (auto& h : g_pPortalManager->m_sHelpers.toplevel->m_vToplevels) {
|
for (auto& h : g_pPortalManager->m_sHelpers.toplevel->m_vToplevels) {
|
||||||
if (h->windowClass == windowClass) {
|
if (h->windowClass == windowClass) {
|
||||||
restoreData.windowHandle = h->handle;
|
restoreData.windowHandle = (uint64_t)h->handle;
|
||||||
Debug::log(LOG, "[screencopy] token v3 window found by class {}", windowClass);
|
Debug::log(LOG, "[screencopy] token v3 window found by class {}", windowClass);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <spa/pod/builder.h>
|
#include <spa/pod/builder.h>
|
||||||
|
|
||||||
|
#undef SPA_VERSION_POD_BUILDER_CALLBACKS
|
||||||
#define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
|
#define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
|
||||||
#include <spa/buffer/meta.h>
|
#include <spa/buffer/meta.h>
|
||||||
#include <spa/utils/result.h>
|
#include <spa/utils/result.h>
|
||||||
|
@ -11,6 +13,7 @@ extern "C" {
|
||||||
#include <spa/param/format-utils.h>
|
#include <spa/param/format-utils.h>
|
||||||
#include <spa/param/video/format-utils.h>
|
#include <spa/param/video/format-utils.h>
|
||||||
#include <spa/pod/dynamic.h>
|
#include <spa/pod/dynamic.h>
|
||||||
|
#undef SPA_VERSION_POD_BUILDER_CALLBACKS
|
||||||
#define SPA_VERSION_POD_BUILDER_CALLBACKS 0
|
#define SPA_VERSION_POD_BUILDER_CALLBACKS 0
|
||||||
}
|
}
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
|
|
Loading…
Reference in a new issue