diff options
author | Bogdan Gheorghe <gheorghe> | 2007-08-17 21:48:24 +0000 |
---|---|---|
committer | Bogdan Gheorghe <gheorghe> | 2007-08-17 21:48:24 +0000 |
commit | 28aa455ae3ab9d2b8c756bcae7568a88b06cc8eb (patch) | |
tree | 8d93b2622f436723ce446f1579e79ea359453060 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java | |
parent | 5d5d6c8770a1d46c82c940b44d6a2e4884862a10 (diff) | |
download | eclipse.platform.swt-28aa455ae3ab9d2b8c756bcae7568a88b06cc8eb.tar.gz eclipse.platform.swt-28aa455ae3ab9d2b8c756bcae7568a88b06cc8eb.tar.xz eclipse.platform.swt-28aa455ae3ab9d2b8c756bcae7568a88b06cc8eb.zip |
200083 Support BIDI on Linux GTK
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java index 352f3b3ec8..9ac40ee3a0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java @@ -186,14 +186,16 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr) if ((style & SWT.SMOOTH) == 0) { event.detail = SWT.DRAG; } + if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth () - width - event.x; sendEvent (SWT.Selection, event); if (isDisposed ()) return 0; if (event.doit) { dragging = true; lastX = event.x; lastY = event.y; + if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth () - width - lastX; parent.update (true, (style & SWT.SMOOTH) == 0); - drawBand (event.x, event.y, width, height); + drawBand (lastX, event.y, width, height); if ((style & SWT.SMOOTH) != 0) { setBounds (event.x, event.y, width, height); // widget could be disposed at this point @@ -220,6 +222,7 @@ int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ eventPt event.width = width; event.height = height; drawBand (lastX, lastY, width, height); + if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth () - width - event.x; sendEvent (SWT.Selection, event); if (isDisposed ()) return result; if (event.doit) { @@ -290,6 +293,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { event.y = newY; event.width = width; event.height = height; + if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth () - width - event.x; sendEvent (SWT.Selection, event); if (ptrGrabResult == OS.GDK_GRAB_SUCCESS) OS.gdk_pointer_ungrab (OS.GDK_CURRENT_TIME); if (isDisposed ()) break; @@ -297,6 +301,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { if (event.doit) { lastX = event.x; lastY = event.y; + if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth () - width - lastX; if ((style & SWT.SMOOTH) != 0) { setBounds (event.x, event.y, width, height); if (isDisposed ()) break; @@ -361,16 +366,18 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr if ((style & SWT.SMOOTH) == 0) { event.detail = SWT.DRAG; } + if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth() - width - event.x; sendEvent (SWT.Selection, event); if (isDisposed ()) return 0; if (event.doit) { lastX = event.x; lastY = event.y; + if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth () - width - lastX; } parent.update (true, (style & SWT.SMOOTH) == 0); drawBand (lastX, lastY, width, height); if ((style & SWT.SMOOTH) != 0) { - setBounds (lastX, lastY, width, height); + setBounds (event.x, lastY, width, height); // widget could be disposed at this point } return result; |