From 931d4fc02adb424340cb900065524fc2a36d71c7 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 18 Sep 2025 11:28:21 +0200 Subject: [PATCH] Fix: Add /multimon flag with /monitors: to match working bash script --- rdp_client.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/rdp_client.py b/rdp_client.py index e43e1dc..d2ac7aa 100755 --- a/rdp_client.py +++ b/rdp_client.py @@ -327,17 +327,9 @@ class RDPClient: # For debugging, log the monitor layout self.logger.info(f"Monitor layout detected: {[(m[0], m[1], 'primary' if m[2] else 'secondary') for m in monitors]}") - # TEST: Use monitors 0,2 instead of 1,2 - if count == 2: - selected_str = "0,2" - self.logger.info(f"TEST: Forcing selection of monitors 0,2 for testing") - elif count == 3: - selected_str = "0,1,2" - self.logger.info(f"TEST: Using all monitors 0,1,2") - else: - # Return the leftmost monitors (excluding position and primary flag) - selected = [str(m[0]) for m in monitors[:count]] - selected_str = ','.join(selected) + # Return the leftmost monitors (excluding position and primary flag) + selected = [str(m[0]) for m in monitors[:count]] + selected_str = ','.join(selected) self.logger.info(f"Selected {count} monitors: {selected_str}") return selected_str @@ -921,10 +913,11 @@ Multi-Monitor Support: color_depth = conn.get("color_depth", 32) cmd.append(f"/bpp:{color_depth}") - # Multiple monitors - use /f + /monitors for fullscreen across specific monitors + # Multiple monitors - use /multimon + /monitors for specific monitor selection (like working bash script) if use_specific_monitors: + cmd.append("/multimon") cmd.append(f"/monitors:{monitor_list}") - self.logger.info(f"Using fullscreen across specific monitors for {multimon}: {monitor_list}") + self.logger.info(f"Using /multimon /monitors:{monitor_list} for {multimon} (like working bash script)") elif multimon == "All Monitors": cmd.append("/multimon")