[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Motif DND imported into kdenonbeta
From:       Matt Koss <koss () napri ! sk>
Date:       1999-06-12 7:28:39
[Download RAW message or body]


I have found some interesting code in the latest LessTif.
One guy has written a simple X-lib based Motif DND handler and put it into
Lesstif distribution.
His code is simpler then gdk code form GNOME( gdk code is too much integrated
with other parts of gdk ), that's why I have replaced my former code.

However, the problem with loosing selection is still present and I am not sure
whether I will be able to solve it.
This problem is even present in the code from LessTif. I tried to contact the
author, but he's not working on X anymore.

So the code is here and any xlib hacker can look at it. It's obviously only
some stupid error, but as I said, I am not very much into the low-level X
programming and all info that I got doesn't mention this problem.

What's needed is adding the code for generation of QEvents and the
handler could be possibly put into the KApplication ( or better QApplication ?
) event loop.

I will continue to work no this, but any help will be greatly appreciated.

About the code, there are two main methods :

static MotifDND::setAcceptMotifDrops( QWidget* )
    this works as setAcceptDrops(), which also needs to be called in order to
    get information whether widget accept drops

handleEvent( XEvent *event )
    put this somewhere in your app's x11EventFilter()


    Regards

		Matt

-- 
Matej Koss	e-mail: koss@napri.sk
Kosice		 ICQ# : 19344305
Slovakia

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic