summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 8c2996b..dcb46a8 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -177,3 +177,3 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
#ifndef DESKTOP_VERSION
- QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
+ //QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
#endif
@@ -401,6 +401,10 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
static bool rightMouseDown = false;
+ static QTime rightClickTime;
+ bool rightButtonPressed = false;
switch (me->type()) {
case QEvent::MouseButtonPress:
- if (me->button() == LeftButton)
+ rightClickTime.restart();
+ if (me->button() == LeftButton) {
leftMouseDown = true;
+ }
else if (me->button() == RightButton)
@@ -448,4 +452,6 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
case QEvent::MouseButtonRelease:
+ if ( rightClickTime.elapsed() > 700 && blockMoving )
+ rightButtonPressed = true;
if (object != viewport()) {
- if (me->button() == RightButton) {
+ if (me->button() == RightButton || rightButtonPressed ) {
if ( blockMoving ) {
@@ -475,2 +481,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
mItemMoved = 0;
+ leftMouseDown = false;
return true;
@@ -482,3 +489,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
} else { // ---------- viewport()
- if (me->button() == RightButton) { //right click
+ if (me->button() == RightButton || rightButtonPressed ) { //right click
if ( blockMoving ) { // we did mot moved the mouse much - popup menu