Skip to content

Commit

Permalink
screencast: support portal version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
columbarius committed Feb 20, 2023
1 parent 926965d commit 970351d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/screencast_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

// this seems to be right based on
// https://github.com/flatpak/xdg-desktop-portal/blob/309a1fc0cf2fb32cceb91dbc666d20cf0a3202c2/src/screen-cast.c#L955
#define XDP_CAST_PROTO_VER 2
#define XDP_CAST_PROTO_VER 3

enum cursor_modes {
HIDDEN = 1,
Expand Down
5 changes: 3 additions & 2 deletions src/screencast/screencast.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,10 @@ static int method_screencast_start(sd_bus_message *msg, void *data,
logprint(DEBUG, "dbus: start: returning node %d", (int)cast->node_id);
ret = sd_bus_message_append(reply, "ua{sv}", PORTAL_RESPONSE_SUCCESS, 1,
"streams", "a(ua{sv})", 1,
cast->node_id, 2,
cast->node_id, 3,
"position", "(ii)", 0, 0,
"size", "(ii)", cast->screencopy_frame_info[WL_SHM].width, cast->screencopy_frame_info[WL_SHM].height);
"size", "(ii)", cast->screencopy_frame_info[WL_SHM].width, cast->screencopy_frame_info[WL_SHM].height,
"source_type", "u", 1 << MONITOR);

if (ret < 0) {
return ret;
Expand Down

0 comments on commit 970351d

Please sign in to comment.