diff options
| author | dec05eba <dec05eba@protonmail.com> | 2026-05-11 19:45:03 +0200 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2026-05-11 19:45:03 +0200 |
| commit | 84933ab3aaa8542db80187137aa89159ec1de2fd (patch) | |
| tree | 62ca1297c3214d1db0d2a8eb8644877b6769cec2 /src/dbus.c | |
| parent | 04ce1f775d32332f6ae4f3522f0f6aa03d715c0e (diff) | |
portal: use cursor metadata instead of embedded, to allow the wayland compositor to do a direct scanout
Diffstat (limited to 'src/dbus.c')
| -rw-r--r-- | src/dbus.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -650,8 +650,16 @@ int gsr_dbus_screencast_select_sources(gsr_dbus *self, const char *session_handl uint32_t available_cursor_modes = 0; gsr_dbus_desktop_portal_get_property(self, "org.freedesktop.portal.ScreenCast", "AvailableCursorModes", &available_cursor_modes); if(available_cursor_modes == 0) - fprintf(stderr, "gsr error: gsr_dbus_screencast_select_sources: no cursors modes are available\n"); + fprintf(stderr, "gsr warning: gsr_dbus_screencast_select_sources: no cursors modes are available\n"); + + if(cursor_mode == GSR_PORTAL_CURSOR_MODE_METADATA && !(available_cursor_modes & GSR_PORTAL_CURSOR_MODE_METADATA)) { + fprintf(stderr, "gsr warning: gsr_dbus_screencast_select_sources: cursor mode metadata is not available, using cursor mode embedded instead\n"); + fprintf(stderr, "gsr warning: this may disable direct scanout. Capture a monitor directly with -w <monitor> instead of -w portal if you experience performance issues\n"); + cursor_mode = GSR_PORTAL_CURSOR_MODE_EMBEDDED; + } cursor_mode = unset_unsupported_cursor_modes(cursor_mode, available_cursor_modes); + if(cursor_mode == 0) + cursor_mode = GSR_PORTAL_CURSOR_MODE_HIDDEN; char handle_token[64]; gsr_dbus_portal_get_unique_handle_token(self, handle_token, sizeof(handle_token)); |
