Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2002-06-12 23:08:44 +0000
committerSilenio Quarti2002-06-12 23:08:44 +0000
commitf89f5bee84ba708dc093c5f453b77c81f29bdc9a (patch)
treec035fedf56f97af739378119193d1246d93cfc86
parent44d04241b701a3760bfc388747d6cea8273f6b21 (diff)
downloadeclipse.platform.swt-f89f5bee84ba708dc093c5f453b77c81f29bdc9a.tar.gz
eclipse.platform.swt-f89f5bee84ba708dc093c5f453b77c81f29bdc9a.tar.xz
eclipse.platform.swt-f89f5bee84ba708dc093c5f453b77c81f29bdc9a.zip
*** empty log message ***v2045d
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java22
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java12
2 files changed, 21 insertions, 13 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
index f40e731f20..c898b47224 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
@@ -478,16 +478,18 @@ int processMouse (int info) {
/* Grab pointer */
if (!(menu != null && pe.buttons == OS.Ph_BUTTON_MENU)) {
- PhRect_t rect = new PhRect_t ();
- PhPoint_t pos = new PhPoint_t();
- pos.x = pe.pos_x;
- pos.y = pe.pos_y;
- rect.ul_x = rect.lr_x = (short) (pos.x + ev.translation_x);
- rect.ul_y = rect.lr_y = (short) (pos.y + ev.translation_y);
- int rid = OS.PtWidgetRid (handle);
- int input_group = OS.PhInputGroup (0);
- int flags = OS.Ph_DRAG_KEY_MOTION | OS.Ph_DRAG_TRACK | OS.Ph_TRACK_DRAG;
- OS.PhInitDrag (rid, flags, rect, null, input_group, null, null, null, pos, null);
+ if (pe.click_count == 1) {
+ PhRect_t rect = new PhRect_t ();
+ PhPoint_t pos = new PhPoint_t();
+ pos.x = pe.pos_x;
+ pos.y = pe.pos_y;
+ rect.ul_x = rect.lr_x = (short) (pos.x + ev.translation_x);
+ rect.ul_y = rect.lr_y = (short) (pos.y + ev.translation_y);
+ int rid = OS.PtWidgetRid (handle);
+ int input_group = OS.PhInputGroup (0);
+ int flags = OS.Ph_DRAG_KEY_MOTION | OS.Ph_DRAG_TRACK | OS.Ph_TRACK_DRAG;
+ OS.PhInitDrag (rid, flags, rect, null, input_group, null, null, null, pos, null);
+ }
}
int result = super.processMouse (info);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
index 58472d0cdc..dcb4fe634a 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
@@ -1408,9 +1408,15 @@ int processShow (int info) {
PtCallbackInfo_t cbinfo = new PtCallbackInfo_t ();
OS.memmove (cbinfo, info, PtCallbackInfo_t.sizeof);
if (cbinfo.reason == OS.Pt_CB_MENU) {
- if (menu != null && !menu.isDisposed ()) {
- menu.setVisible (true);
- }
+ //TEMPORARY CODE
+ Display display = getDisplay ();
+ display.asyncExec(new Runnable () {
+ public void run() {
+ if (menu != null && !menu.isDisposed ()) {
+ menu.setVisible (true);
+ }
+ }
+ });
}
return OS.Pt_CONTINUE;
}

Back to the top