Listbox Drag and Drop rendering weird on linux

Can anyone else verify that when dragging items from a listbox on linux, rather than just getting a nice alpha’d version of the selected item, you get this:

Note the large white rectangle, and curious lack of alpha channeling.

Is anyone else seeing this? I’m getting it on Mandriva installs in our lab.

Dragging works as expected with treeview items, so I’m not sure what’s going on with the listbox (or more to the point, why it would be platform specific).

Why the list box needs to create an image that is the full size of the view port is another question.

Yeah, I’ve had this on my to-do list for a while. You’re only seeing it because it can’t use a transparent window. I’ll get it sorted out soon!

well, i have already noticed that long time ago:

http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=2513&start=0&postdays=0&postorder=asc&highlight=listbox

the problem is that the ListBox code create new windows, that on linux can’t be transparent cause they don’t use the new ARGB visuals when a composite manager is running.

until we rewrite the windowing code to make use of 32 bits
i’ve hacked the listbox to preserve the old behaviour on wacky systems that don’t have argb visuals.

http://code.google.com/p/juced/source/browse/trunk/juce/src/juce_appframework/gui/components/controls/juce_ListBox.cpp#155

at least is good looking now…

:smiley:

This version of the linux Windowing system should add JUCE_USE_GLX, which in turn (when enabled) add support for ARGB visuals for cards that support glx contexts with alpha channels, leaving the fallback for non-semi-transparent windows:

juce_linux_Windowing.cpp

valley: your listbox multiple windows dragging should work on linux too now (if you are running a composite manager like compiz or xcompmgr).

The only drawback for now is that i have to map the window (and sync with the server) to correctly initialize the openGL engine, so the window will flash on the taskbar. I’ll soon add some check in order to initialize the opengl engine only when the window is mapped the first time.

Unfortunately I can’t make that assumption.

I’ll take a look at your changes though, and see if I can get something that works for the short term.

Thanks kraken.

if you are not running a composite manager, then there is no way you can get argb visuals at all, so you will at least see the background rectangle when selecting more lines from the list.

or you can apply my hack in ListBox (checking if Desktop::canUseSemiTransparentWindows), and disable multiple window drag if you only need to drag in the same window.

what about letting the user decide how the listbox dragging image will look like when dragging (so i can only change the mouse cursor specifying a zero sized image, or use a rectangle icon for example) ?

Yeah, I realize that.

That’s what I’m hoping to do. The treeview drag works just fine on Linux, so there’s no need for the listbox to be busted.

[quote]
what about letting the user decide how the listbox dragging image will look like when dragging (so i can only change the mouse cursor specifying a zero sized image, or use a rectangle icon for example) ?[/quote]

I use the drag and drop to allow users to move items around in a list, or to drag files from a file list into their current worklist. As such, it’s useful for them to be able to see the list of items they are dragging, so that they can easily grasp the effect of dropping them at the current insertion point.

Currently, because the file list view is most of the screen is size, dragging an item from it effectively obscures most of the application, which looks a little arse, to say the least. :oops: