On Fri, 6 Aug 2021 02:18:38 GMT, Thiago Milczarek Sayao <[email protected]> wrote:
> It seems raw images need to be converted BRGA -> RGBA. > > It was being converted on gtk2 code path, but gtk3 only uses > `gtk_drag_set_icon_pixbuf`. > > I have simplified the gtk2 `DragView::View::expose` to paint with > `gdk_cairo_set_source_pixbuf` (that is available since Gtk 2.8) because the > old way was somehow converting again. > > Run the issue sample with `-Djdk.gtk.version=2` to test the gtk2 code path. > > To test: > > `./gradlew apps` > > > java @build/run.args -cp apps/toys/DragDrop/dist/DragDrop.jar > dragdrop.DragDropWithControls > java @build/run.args -cp apps/toys/DragDrop/dist/DragDrop.jar > dragdrop.DragDropColor > > java -Djdk.gtk.version=2 @build/run.args -cp > apps/toys/DragDrop/dist/DragDrop.jar dragdrop.DragDropWithControls > java -Djdk.gtk.version=2 @build/run.args -cp > apps/toys/DragDrop/dist/DragDrop.jar dragdrop.DragDropColor This pull request has now been integrated. Changeset: b2ecfacf Author: Thiago Milczarek Sayao <[email protected]> Committer: Kevin Rushforth <[email protected]> URL: https://git.openjdk.java.net/jfx/commit/b2ecfacf0d8c9512d0b4cc13c1ac6c104a20f396 Stats: 112 lines in 2 files changed: 93 ins; 18 del; 1 mod 8271398: GTK3 drag view image swaps red and blue color channels Reviewed-by: pbansal, kcr ------------- PR: https://git.openjdk.java.net/jfx/pull/599
