Files
rdp_client/test_new_monitor_approach.py
root 80fd3dde36 Remove /size: parameter conflict with /monitors: for better compatibility
Issue: /monitors:1,2 with /size:3840x1080 still shows only single monitor
Analysis: /size: parameter may conflict with /monitors: in FreeRDP 2.11.5

New approach:
- Use /monitors:1,2 WITHOUT /size: parameter
- Let /monitors: parameter handle monitor layout and sizing automatically
- Remove /size: from command when using specific monitor selection
- Keep /size: only for single monitor or manual resolution settings

Expected behavior:
- /monitors:1,2 should automatically span across monitors 1,2
- Remove potential parameter conflicts causing single monitor fallback
- Maintain fullscreen-like behavior through monitor spanning

Test command change:
Before: xfreerdp /size:3840x1080 /monitors:1,2
After:  xfreerdp /monitors:1,2

This follows FreeRDP documentation that /monitors: should handle sizing.
2025-09-18 11:12:01 +02:00

53 lines
1.8 KiB
Python

#!/usr/bin/env python3
def test_new_monitor_approach():
print("=== Testing New Monitor Approach ===")
print()
# Simulate the command building process
cmd = ["xfreerdp", "/v:test-server", "/u:testuser", "/p:password"]
# Test scenario: 2 Monitors with Full Screen
multimon = "2 Monitors"
resolution = "Full Screen"
use_specific_monitors = multimon in ["2 Monitors", "3 Monitors", "4 Monitors"]
monitor_list = "1,2" # Simulated result
print(f"Testing: {multimon} with {resolution}")
print(f"Monitor list: {monitor_list}")
print()
# Original resolution handling
if resolution == "Full Screen" and not use_specific_monitors:
cmd.append("/f")
print("Step 1: Added /f")
elif resolution == "Full Screen" and use_specific_monitors:
combined_res = "3840x1080" # Simulated calculation
cmd.append(f"/size:{combined_res}")
print(f"Step 1: Added /size:{combined_res}")
else:
cmd.append(f"/size:{resolution}")
print(f"Step 1: Added /size:{resolution}")
cmd.append("/bpp:32")
print("Step 2: Added /bpp:32")
# New monitor handling approach
if use_specific_monitors:
cmd.append(f"/monitors:{monitor_list}")
print(f"Step 3: Added /monitors:{monitor_list}")
# Remove /size: to avoid conflicts
cmd = [x for x in cmd if not x.startswith('/size:')]
print("Step 4: Removed /size: parameter to avoid conflict")
print()
print("Final command:")
cmd_str = ' '.join(cmd).replace("/p:password", "/p:***")
print(cmd_str)
print()
print("Expected behavior: /monitors:1,2 should span across monitors 1 and 2")
print("without /size: interference")
if __name__ == "__main__":
test_new_monitor_approach()