Attach to the X server on the active VT and keep a retryable DXGI frame from tearing down the capturer

Claude-Session: https://claude.ai/code/session_01QKDYfH4WKLbpNQHccpVo3P
This commit is contained in:
Viktor Liu
2026-08-29 16:59:05 +02:00
parent 15d6e3bea9
commit fecd7cfff5
17 changed files with 476 additions and 85 deletions

View File

@@ -5,6 +5,8 @@ package services
import (
"context"
log "github.com/sirupsen/logrus"
"github.com/netbirdio/netbird/client/proto"
)
@@ -27,10 +29,20 @@ func (a *Approval) Respond(ctx context.Context, requestID string, accept, viewOn
if err != nil {
return err
}
_, err = cli.RespondApproval(ctx, &proto.RespondApprovalRequest{
resp, err := cli.RespondApproval(ctx, &proto.RespondApprovalRequest{
RequestId: requestID,
Accept: accept,
ViewOnly: viewOnly,
})
return err
if err != nil {
return err
}
if !resp.GetMatched() {
// Not an error to the caller: the dialog closes either way, and the
// connection has already been denied by the broker's timeout. Logged so
// a report of "I clicked accept and it still disconnected" has a record
// showing the click landed after the prompt had expired.
log.Infof("approval %s was no longer pending; the daemon had already answered it", requestID)
}
return nil
}