Skip to content

Instantly share code, notes, and snippets.

@ibeckermayer
Last active June 4, 2024 18:53
Show Gist options
  • Save ibeckermayer/7591333275e87ad0d7afa028a7bb54cb to your computer and use it in GitHub Desktop.
Save ibeckermayer/7591333275e87ad0d7afa028a7bb54cb to your computer and use it in GitHub Desktop.
Patch for Teleport Test Plan items under Desktop Access Warnings/Errors
diff --git a/lib/srv/desktop/rdp/rdpclient/client.go b/lib/srv/desktop/rdp/rdpclient/client.go
index e3c2ff3afe..1f789c496a 100644
--- a/lib/srv/desktop/rdp/rdpclient/client.go
+++ b/lib/srv/desktop/rdp/rdpclient/client.go
@@ -475,6 +475,17 @@ func (c *Client) handleTDPInput(msg tdp.Message) error {
return trace.Errorf("MouseButton: client_write_rdp_pointer: %v", errCode)
}
case tdp.MouseWheel:
+ // ##############################################################
+ // ## Test code for inducing a TDP notification/error when the ##
+ // ## mouse wheel is scrolled. ##
+ // ##############################################################
+ if err := c.cfg.Conn.WriteMessage(tdp.Notification{
+ Severity: tdp.SeverityError,
+ Message: "Testing tdp.Notification",
+ }); err != nil {
+ c.cfg.Logger.ErrorContext(context.Background(), "sending tdp.Notification failed", "error", err)
+ }
+ // ######### End test code #########
var wheel C.CGOPointerWheel
switch m.Axis {
case tdp.VerticalWheelAxis:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment