Listbox Drag and Drop rendering weird on linux.

For Linux specific issues

Listbox Drag and Drop rendering weird on linux.

Postby valley » Wed Mar 04, 2009 3:56 pm

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:


Image

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.
valley
JUCE UberWeenie
 
Posts: 679
Joined: Sat Sep 04, 2004 4:32 am
Location: Chicago

Postby jules » Wed Mar 04, 2009 4:58 pm

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!
User avatar
jules
Fearless Leader
 
Posts: 17216
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Postby kraken » Wed Mar 04, 2009 10:35 pm

well, i have already noticed that long time ago:

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/b ... ox.cpp#155

at least is good looking now...

:D
Last edited by kraken on Thu Mar 12, 2009 9:12 am, edited 1 time in total.
User avatar
kraken
JUCE UberWeenie
 
Posts: 1063
Joined: Wed Feb 09, 2005 10:31 am
Location: Venice, Italy

Postby kraken » Mon Mar 09, 2009 11:51 am

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.
Last edited by kraken on Thu Mar 12, 2009 9:14 am, edited 1 time in total.
Image
User avatar
kraken
JUCE UberWeenie
 
Posts: 1063
Joined: Wed Feb 09, 2005 10:31 am
Location: Venice, Italy

Postby valley » Mon Mar 09, 2009 2:37 pm

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


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.
valley
JUCE UberWeenie
 
Posts: 679
Joined: Sat Sep 04, 2004 4:32 am
Location: Chicago

Postby kraken » Mon Mar 09, 2009 3:02 pm

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) ?
Image
User avatar
kraken
JUCE UberWeenie
 
Posts: 1063
Joined: Wed Feb 09, 2005 10:31 am
Location: Venice, Italy

Postby valley » Mon Mar 09, 2009 3:28 pm

kraken wrote: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.


Yeah, I realize that.

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.


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.

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) ?


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:
valley
JUCE UberWeenie
 
Posts: 679
Joined: Sat Sep 04, 2004 4:32 am
Location: Chicago


Return to Linux

Who is online

Users browsing this forum: No registered users and 0 guests