[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: kdenetwork/kmail [RFC:Problem]
From: Zack Rusin <zackrat () att ! net>
Date: 2002-04-30 18:26:11
[Download RAW message or body]
<snip>
Great, it looks like we agreed on that. It would be even nicer if we
could actually implement it. I just looked into it and here's what's
up:
DragObjects are QObject not QWidgets, they don't receive key events.
"Aha! installEventFilter sucker!", on what ? The drag&drop operations
in QT are handled by QDragManager class and that's the one that
actually gets the key press events. "Just move up the inheritance
hierarchy checking if isA("QDragManager")" you say - won't work because
DragObjects don't inherit QDragManager, and since QDragManager is
static within qdragobjects.cpp, we don't have access to it. Declaring
it extern also won't work since other QT classes use the same name
(manager) for other things and compilation breaks. Creating a drag
object inheriting from QWidget and QDragObject won't work because key
events are still handled by QDragManager and QWidget just messes things
up. Filtering events from kApp also won't work because key press events
during dragging are never delivered to it. What does work (that's what
you expected to hear isn't it?) is installing x11EventFilter in
KMailApplication and emitting some specific signals on KeyPress and
KeyRelease XEvent. Why not sendEvent from QApplication? Because
processing XEvent requires some XLib headers, and since we have
QEvent:KeyPress and XLib::KeyPress we have a conflict and it won't
compile. If I'm missing something please tell me.
Proposed solution? I don't have one, I don't really like processing x11
events from within KMailApplication as it slows things down and is
rather ungraceful. I'm working on KDE internal DragManager to make the
drag icons semi-transparent, it still has a rather large amount of
visual artifacts and it's hard to say when I'll be done with it, but if
you feel like that would be a solution then we might just wait for
that. We could also add a simple option "[x] display drag popup" in
config dialog and make it a default. Or just disable the popup for now.
Let me know what you think.
Zack
--
Jesus saves...Passes to Gretzky...Gretzky shoots...He SCORES!
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic