Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8211302

DragAndDrop no longer works with GTK3

XMLWordPrintable

        ADDITIONAL SYSTEM INFORMATION :
        Linux Mint 19

        A DESCRIPTION OF THE PROBLEM :
        The startDragAndDrop method no longer works with GTK3

        REGRESSION : Last worked in version 10.0.2

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Run the source code and try to drag from the test button. Nothing is happening...

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        The possibility of dragging
        ACTUAL -
        Nothing is happening.

        ---------- BEGIN SOURCE ----------
        import javafx.application.Application;
        import javafx.scene.Scene;
        import javafx.scene.control.Button;
        import javafx.scene.input.ClipboardContent;
        import javafx.scene.input.TransferMode;
        import javafx.stage.Stage;

        //Workaround: -Djdk.gtk.version=2
        public class Fx11draggError extends Application{

        @Override
        public void start(Stage stage) throws Exception {
        Button button = new Button("test");
        button.setOnDragDetected(e -> {
        ClipboardContent content = new ClipboardContent();
        content.putString("It works");
        button.startDragAndDrop(TransferMode.MOVE).setContent(content);
        e.consume();
        });
        stage.setScene(new Scene(button, 200, 200));
        stage.show();
        }

        public static void main(String[] args) {
        launch();
        }
        }
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        use -Djdk.gtk.version=2

        FREQUENCY : always


          1. 8211302-drag-drop-done.patch
            3 kB
            Kevin Rushforth
          2. Fx11draggError.java
            0.7 kB
            Priyanka Mangal

              tsayao Thiago Sayao
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: