Skip to content

Conversation

@amartya4256
Copy link
Contributor

@amartya4256 amartya4256 commented May 22, 2025

Depends on: eclipse-platform/eclipse.platform.swt#2186

This PR enforces the usage of Rectangle.copyWith and Rectangle.of
while copying a rectangle from an existing rectangle and creating a
rectangle from a Point making sure the internal state of the source
resources are copied to the new resource.

Configuration for reproducing:

Right (Primary) - 150%
Left - 100%
Steps to reproduce:

  • Keep your IDE on the primary monitor.
  • Drag an editor across the monitors.
  • The drag and drop rectangle moves away from the cursor.
  • Expected behaviour: The Drag and Drop region should always have its top left corner around the cursor.

This happens because when a rectangle is copied into a new object using the default constructor, it loses its monitor information. However, the cursor location always has the right monitor zoom in the DnDManager and the rectangle created there should use that monitor reference while creating a rectangle from the cursor location and this rectangle should further only be copied using clone method to copy the right internal state of the rectangle so that we still have the monitor information - leading to right scaling.

contributes to eclipse-platform/eclipse.platform.swt#62 and eclipse-platform/eclipse.platform.swt#128

@github-actions
Copy link
Contributor

github-actions bot commented May 22, 2025

Test Results

 2 778 files  ±0   2 778 suites  ±0   1h 38m 53s ⏱️ - 20m 57s
 7 930 tests ±0   7 702 ✅ ±0  228 💤 ±0  0 ❌ ±0 
23 345 runs  ±0  22 599 ✅ ±0  746 💤 ±0  0 ❌ ±0 

Results for commit 3d9201e. ± Comparison against base commit a4840da.

♻️ This comment has been updated with latest results.

@eclipse-platform-bot
Copy link
Contributor

eclipse-platform-bot commented Jun 18, 2025

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.e4.ui.workbench.addons.swt/META-INF/MANIFEST.MF

⚠️ 🚧 This PR cannot be modified by maintainers because edits are disabled or it is created from an organization repository. To obtain the required changes apply the git patch manually as additional commit.

Git patch
From c89c35664edafc7bab1318917685a326d9825768 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Wed, 18 Jun 2025 12:35:57 +0000
Subject: [PATCH] Version bump(s) for 4.37 stream


diff --git a/bundles/org.eclipse.e4.ui.workbench.addons.swt/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.workbench.addons.swt/META-INF/MANIFEST.MF
index 619bce77e8..7cda4cc33f 100644
--- a/bundles/org.eclipse.e4.ui.workbench.addons.swt/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.ui.workbench.addons.swt/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.e4.ui.workbench.addons.swt;singleton:=true
-Bundle-Version: 1.5.700.qualifier
+Bundle-Version: 1.5.800.qualifier
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-- 
2.49.0

Further information are available in Common Build Issues - Missing version increments.

@amartya4256 amartya4256 force-pushed the dnd_monitor_aware branch 2 times, most recently from 05f4eef to b9efa80 Compare June 18, 2025 13:59
@amartya4256 amartya4256 changed the title WIP: Make DnD consumer monitorAware Make DnD consumer utilize internal state of Rectangle with APIs of and clone Jun 30, 2025
This commit enforces the usage of Rectangle.clone and Rectangle.of
while copying a rectangle from an existing rectangle and creating a
rectangle from a Point making sure the internal state of the source
resources are copied to the new resource.

contributes to
eclipse-platform/eclipse.platform.swt#62 and
eclipse-platform/eclipse.platform.swt#128
@fedejeanne fedejeanne force-pushed the dnd_monitor_aware branch from b9efa80 to 3d9201e Compare July 1, 2025 06:05
Copy link
Member

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it, looks good. Thank you @amartya4256 !

@fedejeanne fedejeanne merged commit bb94f85 into eclipse-platform:master Jul 1, 2025
18 checks passed
@fedejeanne fedejeanne deleted the dnd_monitor_aware branch July 1, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants