mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Disable text drag on GTK for now because of SWT bug 151197
This commit is contained in:
parent
06016b3405
commit
197ef4fc33
1 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.ui.dnd;
|
package org.eclipse.cdt.internal.ui.dnd;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.jface.text.BadLocationException;
|
import org.eclipse.jface.text.BadLocationException;
|
||||||
import org.eclipse.jface.text.BadPositionCategoryException;
|
import org.eclipse.jface.text.BadPositionCategoryException;
|
||||||
import org.eclipse.jface.text.DefaultPositionUpdater;
|
import org.eclipse.jface.text.DefaultPositionUpdater;
|
||||||
|
@ -100,6 +101,11 @@ public class TextViewerDragAdapter extends DragSourceAdapter {
|
||||||
* @see org.eclipse.swt.dnd.DragSourceListener#dragStart(org.eclipse.swt.dnd.DragSourceEvent)
|
* @see org.eclipse.swt.dnd.DragSourceListener#dragStart(org.eclipse.swt.dnd.DragSourceEvent)
|
||||||
*/
|
*/
|
||||||
public void dragStart(DragSourceEvent event) {
|
public void dragStart(DragSourceEvent event) {
|
||||||
|
// disable text drag on GTK until bug 151197 is fixed
|
||||||
|
if (Platform.WS_GTK.equals(Platform.getWS())) {
|
||||||
|
event.doit = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
/// convert screen coordinates to widget offest
|
/// convert screen coordinates to widget offest
|
||||||
int offset= getOffsetAtLocation(event.x, event.y, false);
|
int offset= getOffsetAtLocation(event.x, event.y, false);
|
||||||
// convert further to a document offset
|
// convert further to a document offset
|
||||||
|
|
Loading…
Add table
Reference in a new issue