Cleanup: Revert Dockerfile, CMakeLists.txt, wayland_poc.cpp to original state and remove generated/cloned files.
This commit is contained in:
parent
14a35b4928
commit
795e6202ac
@ -25,4 +25,3 @@ RUN make
|
|||||||
# You can add commands here to run tests or package the application
|
# You can add commands here to run tests or package the application
|
||||||
# For now, we'll just ensure it builds successfully
|
# For now, we'll just ensure it builds successfully
|
||||||
CMD ["./wayland_poc"]
|
CMD ["./wayland_poc"]
|
||||||
|
|
||||||
|
|||||||
@ -103,37 +103,24 @@ This document summarizes the key challenges, debugging steps, and solutions enco
|
|||||||
* **Diagnosis:** The `clearArguments()` method was removed in Qt 5.15, which is the version likely used in the Docker build environment. The call was also redundant as arguments were being cleared and then immediately re-added.
|
* **Diagnosis:** The `clearArguments()` method was removed in Qt 5.15, which is the version likely used in the Docker build environment. The call was also redundant as arguments were being cleared and then immediately re-added.
|
||||||
* **Fix:** Removed the line `message.clearArguments();` from `wayland_poc.cpp`.
|
* **Fix:** Removed the line `message.clearArguments();` from `wayland_poc.cpp`.
|
||||||
|
|
||||||
* **D-Bus `CreateSession` Signature Mismatch:**
|
* **D-Bus `CreateSession` Signature Mismatch and Argument Evolution:**
|
||||||
* **Problem:** After fixing the `SelectSources` signature, the `CreateSession` call itself started failing with "Type of message, “(oosa{sv})”, does not match expected type “(a{sv})”". This indicated that `CreateSession` also expects only a single dictionary of options (`a{sv}`).
|
* **Problem:** Initially, `wayland_poc` failed to call `CreateSession` due to a signature mismatch, expecting `(oosa{sv})` but receiving `(a{sv})`. Subsequent attempts to fix this by adding a `parent_window` object path argument led to a "Missing token" error, and later, a "Type of message, “(oa{sv})”, does not match expected type “(a{sv})”" error.
|
||||||
* **Diagnosis:** The `xdg-desktop-portal` API for `CreateSession` had changed, and the `handlePath`, `sessionPath`, and `applicationName` arguments were no longer expected.
|
* **Diagnosis:** Through iterative debugging and analysis of error messages (which contradicted some online documentation), it was determined that the `xdg-desktop-portal` implementation on the user's system for `CreateSession` expects *only* a single dictionary of options (`a{sv}`). The `handle`, `session_handle`, `app_id`, and `parent_window` arguments were not expected for this method. The "Missing token" error occurred because, while only an options dictionary was expected, the `handle_token` within that dictionary was a mandatory requirement.
|
||||||
* **Fix:** Modified the `CreateSession` call in `wayland_poc.cpp` to only send an empty `QVariantMap` as its argument.
|
* **Fix:** The `CreateSession` call in `wayland_poc.cpp` was modified to pass only a `QVariantMap` containing the `handle_token` as its sole argument.
|
||||||
|
|
||||||
* **D-Bus `CreateSession` "Missing token" Error:**
|
|
||||||
* **Problem:** After fixing the `CreateSession` signature, the call failed with a "Missing token" error.
|
|
||||||
* **Diagnosis:** The `CreateSession` method, while expecting a single dictionary of options, also requires a `handle_token` within that dictionary.
|
|
||||||
* **Fix:** Added a `handle_token` to the `QVariantMap` passed to the `CreateSession` call in `wayland_poc.cpp`.
|
|
||||||
|
|
||||||
* **D-Bus `CreateSession` Signature Mismatch (Revisited):**
|
|
||||||
* **Problem:** The `CreateSession` call was failing with "Type of message, “(oa{sv})”, does not match expected type “(a{sv})”". This indicated that `CreateSession` expects only a single dictionary of options (`a{sv}`), and the previously added `parent_window` object path argument was unexpected.
|
|
||||||
* **Diagnosis:** The `xdg-desktop-portal` API for `CreateSession` does not expect a `parent_window` argument.
|
|
||||||
* **Fix:** Removed the `QDBusObjectPath("/")` argument from the `CreateSession` call in `wayland_poc.cpp`.
|
|
||||||
|
|
||||||
* **D-Bus `CreateSession` Signature Mismatch (Revisited):**
|
|
||||||
* **Problem:** The `CreateSession` call was failing with "Type of message, “(oa{sv})”, does not match expected type “(a{sv})”". This indicated that `CreateSession` expects only a single dictionary of options (`a{sv}`), and the previously added `parent_window` object path argument was unexpected.
|
|
||||||
* **Diagnosis:** The `xdg-desktop-portal` API for `CreateSession` does not expect a `parent_window` argument.
|
|
||||||
* **Fix:** Removed the `QDBusObjectPath("/")` argument from the `CreateSession` call in `wayland_poc.cpp`.
|
|
||||||
|
|
||||||
* **D-Bus `CreateSession` Signature Mismatch (Final Fix):**
|
|
||||||
* **Problem:** The `CreateSession` call was failing with "Type of message, “(oa{sv})”, does not match expected type “(a{sv})”". This indicated that `CreateSession` expects only a single dictionary of options (`a{sv}`), and the previously added `parent_window` object path argument was unexpected.
|
|
||||||
* **Diagnosis:** The `xdg-desktop-portal` API for `CreateSession` does not expect a `parent_window` argument. The previous `lessons_learned.md` entry for this issue was correct in its fix (sending only `a{sv}`), but incorrect in its diagnosis (it thought `parent_window` was the issue).
|
|
||||||
* **Fix:** Removed the `QDBusObjectPath("/")` argument from the `CreateSession` call in `wayland_poc.cpp`.
|
|
||||||
|
|
||||||
* **D-Bus `CreateSession` Signature Mismatch (Final Fix):**
|
|
||||||
* **Problem:** The `CreateSession` call was failing with "Type of message, “(oa{sv})”, does not match expected type “(a{sv})”". This indicated that `CreateSession` expects only a single dictionary of options (`a{sv}`), and the previously added `parent_window` object path argument was unexpected.
|
|
||||||
* **Diagnosis:** The `xdg-desktop-portal` API for `CreateSession` does not expect a `parent_window` argument. The previous `lessons_learned.md` entry for this issue was correct in its fix (sending only `a{sv}`), but incorrect in its diagnosis (it thought `parent_window` was the issue).
|
|
||||||
* **Fix:** Removed the `QDBusObjectPath("/")` argument from the `CreateSession` call in `wayland_poc.cpp`.
|
|
||||||
|
|
||||||
* **New Runtime Error: "Remote peer disconnected"**
|
|
||||||
* **Problem:** After successfully building and copying `wayland_poc` to the host, running it resulted in "D-Bus call to SelectSources failed: "Remote peer disconnected"".
|
* **Problem:** After successfully building and copying `wayland_poc` to the host, running it resulted in "D-Bus call to SelectSources failed: "Remote peer disconnected"".
|
||||||
* **Diagnosis:** This indicates a problem with the D-Bus connection itself, rather than a rejection from the portal. Possible causes include incorrect D-Bus environment variables on the host, `xdg-desktop-portal` not running, or permission issues.
|
* **Diagnosis:** This indicates a problem with the D-Bus connection itself, rather than a rejection from the portal. Possible causes include incorrect D-Bus environment variables on the host, `xdg-desktop-portal` not running, or permission issues.
|
||||||
* **Next Steps:** Investigate D-Bus environment variables (`DBUS_SESSION_BUS_ADDRESS`) and `xdg-desktop-portal` service status on the host.
|
* **Next Steps:** Investigate D-Bus environment variables (`DBUS_SESSION_BUS_ADDRESS`) and `xdg-desktop-portal` service status on the host.
|
||||||
|
|
||||||
|
* **`wf-recorder` does not use `xdg-desktop-portal` for screen capture:**
|
||||||
|
* **Observation:** Analysis of `wf-recorder/src/main.cpp` shows that it primarily uses Wayland protocols like `wlr-screencopy-v1` and `xdg-output` for screen content capturing. These protocols are specific to wlroots-based compositors.
|
||||||
|
* **Conclusion:** `wf-recorder` does not directly interact with `xdg-desktop-portal` via D-Bus for screen capture. Therefore, it is not a suitable example for understanding the D-Bus interactions required for `xdg-desktop-portal` based screen sharing, which is the approach taken by `wayland_poc.cpp`.
|
||||||
|
|
||||||
|
* **Spectacle's Wayland screen recording uses KDE-specific Wayland protocol, not `xdg-desktop-portal`:**
|
||||||
|
* **Observation:** Analysis of `cloned_repos/spectacle/src/Platforms/screencasting.cpp` reveals that Spectacle utilizes the `zkde_screencast_unstable_v1` Wayland protocol extension for screen recording. This is a KDE-specific protocol.
|
||||||
|
* **Conclusion:** Spectacle's Wayland screen recording, as implemented in this part of the code, relies on a KDE-specific Wayland compositor (like KWin) that implements this protocol. It does not use the generic `xdg-desktop-portal` D-Bus interface for screen capture. Therefore, it is not a suitable example for understanding the D-Bus interactions required for `xdg-desktop-portal` based screen sharing.
|
||||||
|
|
||||||
|
## 10. Revised Wayland Grabber Adaptation Strategy (KDE-specific focus)
|
||||||
|
|
||||||
|
* **User Clarification:** The user has clarified that the Proof of Concept (POC) only needs to run in the current environment, and an implementation relying on KDE-specific tools is acceptable.
|
||||||
|
* **New Strategy:** Based on this clarification, the focus for Wayland screen sharing will shift from the generic `xdg-desktop-portal` D-Bus interface to leveraging KDE-specific Wayland protocols, specifically `zkde_screencast_unstable_v1`, as observed in Spectacle's source code.
|
||||||
|
* **Implication:** This means the `wayland_poc.cpp` will be adapted to use the `zkde_screencast_unstable_v1` protocol directly, rather than going through `xdg-desktop-portal`. This approach is expected to be more direct and potentially simpler for the current environment.
|
||||||
Loading…
x
Reference in New Issue
Block a user