diff --git a/rdp_client.py b/rdp_client.py index 380ca25..2f9beeb 100755 --- a/rdp_client.py +++ b/rdp_client.py @@ -289,6 +289,8 @@ class RDPClient: # Fallback to a reasonable default return "3840x1080" # Assume dual 1920x1080 monitors + + def _get_best_monitor_selection(self, count): """Get the best monitor selection based on layout""" try: result = subprocess.run(['xfreerdp', '/monitor-list'], diff --git a/test_method_fix.py b/test_method_fix.py new file mode 100644 index 0000000..6f2eef3 --- /dev/null +++ b/test_method_fix.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 + +import sys +import os +sys.path.append('/home/rwiegand/skripte') + +# Test if the method is properly accessible +def test_method(): + try: + from rdp_client import RDPClient + import logging + logging.basicConfig(level=logging.INFO) + + # Create a test instance + client = RDPClient() + print('Testing _get_best_monitor_selection method...') + + # Test the method + result = client._get_best_monitor_selection(2) + print(f'✅ Method works! Result: {result}') + + # Test combined resolution method too + combined_res = client._get_monitors_combined_resolution(result) + print(f'✅ Combined resolution method works! Result: {combined_res}') + + return True + + except Exception as e: + print(f'❌ Error: {e}') + import traceback + traceback.print_exc() + return False + +if __name__ == "__main__": + print("=== Testing RDPClient Methods ===") + success = test_method() + if success: + print("✅ All methods working correctly!") + else: + print("❌ There are still issues to fix.") \ No newline at end of file