Re: Drag-and-Drop Support

iw9cmd flavio <[email protected]> Sat, 01 Oct 2005 20:27:49 +0200
Newsgroups gmane.compw.window-managers.windowmaker.user
Message-ID <[email protected]>
Brandin Creech ha scritto:
> Hi.
> 
> I really like Window Maker; I think I'm addicted. But there's this
> expiremental feature in the source (XDND) and am having trouble getting it to
> work.

me too...but...

> I uncommented the line so that '#define XDND' appears in src/wconfig.h,
> then rebuilt.

it's not enough because perhaps there is a bug in the code.

> I know the XDND support is active and enabled because it
> activates the extra menu under the Application Icon preferences ("do this
> action on drag-and-drop"), but the drag-and-drop support only works
> sometimes.

lucky man. On my system DnD don't work if I only decomment the line in 
wconfig.h.
I don't remember whether the compilation goes on or hangs up.
I have done it about 4 month ago.

> It's hard to reproduce. When I first start wmaker, the XDND
> support does not work at all--all objects dropped are rejected as though the
> DND support was nonexistent. But then after a certain amount of time, the DND
> support starts working fine--objects dropped launch the application with the
> dropped filename as an argument. The drag-and-drop support continues until
> wmaker ends or it crashes.
> 

I think there is a bug in file
src/misc.c
line 842:

if (!dropped_thing) {
                     dropped_thing = get_dnd_selection(scr);
                 }

there isn't any get_dnd_selection(scr) in the file neither in the header 
file included.
So I got a previuos version of wmaker (0.80) that I had successfully 
compiled with dnd and I compared their sources.
Wmaker 0.80 didn't use XDND (it was experimental) but Offix DND.
I looked for get_dnd_selection function in misc.c and surprisingly I 
found it so I thought the developers have forgotten to delete that lines 
in the two last releases.
I *comment* that lines and compile the program and...it works.

Please, try and tell me.

I hope that this few lines are useful for someone.

bye
iw9cmd flavio

_______________________________________________
INFO: https://windowmaker.org/lists/listinfo/wm-user
ARCHIVE: https://windowmaker.org/lists/archive/wm-user/
FAQ: http://windowmaker.org/faq.html