You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2023/05/26 13:25:32 UTC

[jmeter] branch master updated: fix: refresh UI when dragging JMeter window from one monitor to another, so rich syntax text areas are properly editable after window movement

This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 4d9d99a364 fix: refresh UI when dragging JMeter window from one monitor to another, so rich syntax text areas are properly editable after window movement
4d9d99a364 is described below

commit 4d9d99a364d0533782e14209a399b60672fa7032
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Fri May 26 16:24:53 2023 +0300

    fix: refresh UI when dragging JMeter window from one monitor to another, so rich syntax text areas are properly editable after window movement
    
    Different monitors might have different scaling factors, so JMeter should
    refresh DPI when graphics configuration changes.
---
 src/core/src/main/java/org/apache/jmeter/gui/MainFrame.java | 4 ++++
 xdocs/changes.xml                                           | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/core/src/main/java/org/apache/jmeter/gui/MainFrame.java b/src/core/src/main/java/org/apache/jmeter/gui/MainFrame.java
index 10264b95db..8bed41363f 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/MainFrame.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/MainFrame.java
@@ -257,6 +257,10 @@ public class MainFrame extends JFrame implements TestStateListener, Remoteable,
                 JMeterUtils.refreshUI();
             }
         });
+        addPropertyChangeListener("graphicsConfiguration", evt -> {
+            // Update UI when JMeter window moves to a different monitor as it might have different scaling settings
+            JMeterUtils.refreshUI();
+        });
     }
 
     /**
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 1c0b11a1e1..75293c340c 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -200,6 +200,7 @@ Summary
   <li><bug>66157</bug><pr>719</pr>Correct theme for darklaf on rsyntaxtextarea</li>
   <li><issue>5872</issue><pr>5874</pr>Trim name in Argument objects.</li>
   <li><pr>693</pr>Avoid wrong results when <code>Object.hashCode()</code> happen to collide. Use <code>IdentityHashMap</code> instead of <code>HashMap</code> when key is <code>TestElement</code></li>
+  <li>Refresh UI when dragging JMeter window from one monitor to another, so rich syntax text areas are properly editable after window movement</li>
 </ul>
 
  <!--  =================== Thanks =================== -->