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

List:       kde-devel
Subject:    Re: contentsMouseMoveEvent called wrongly / was: Re: how to avoid race condition between qt-signal-h
From:       Gernot Hillier <gernot () hillier ! de>
Date:       2002-04-28 10:30:54
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

On Saturday 27 April 2002 23:10, Aaron J. Seigo wrote:
> looking at the code i think your problem is this: you aren't checking for
> actual mouse movement but just trusting that if there is a mouse move event
> and the user pressed the mouse button earlier that they want to start a
> drag.

Great, thanks! Now I found the example code in KDE3-API-docs of 
KGlobalSettings, too.

That helped together with a fix in current CVS (another problem was that a 
click to right mouse button set the boolean mouse-press-flag but it wasn't 
deleted when doing the popup) 

> you should probably record the position of the initial mouse click in
> FileListView::contentsMousePressEvent. then in
> FileListView::contentsMouseMoveEvent ensure that the manhattenLength of the
> subsequent movement is > than KGlobalSettings::dndEventDelay() ... this
> should stop the erroneous drags from happening..

Yep, that works. But still another question: KGlobalSettings::dndEventDelay() 
always stays at 2 pixel - not depending on what I set in kcontrol. Is there 
anything I could do to get the current value from the KDE settings or is the 
setting in kcontrol/"mouse section" changing something else? How will this be 
accessed?

> > I found some hint in the KDE3 API docs that when reimplementing this
> > function, the function of the base class should be called. This is not
> > done consequently in ark as far as I can see. Could s.o. tell me what
> > happens when this is forgotten? Should the base function be called at the
> > begin or end of the reimplementation?
>
> it should be called at the end if you want the parent widget to handle the
> movement as it normally would...

Ok, I'll add it there. Thx again!

- -- 
Ciao,

Gernot
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8y89gk997/GGeSeIRAm6mAKCApaFHL43eP9Es2oW8K3ojNMmgdwCaA3A5
G/7+p+ksScNKxpPCMc/GpL4=
=DXjJ
-----END PGP SIGNATURE-----

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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