patches/qt3-0017-qpopup_ignore_mousepos.patch
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 782 a013313b88b4
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
782
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     1
--- qt-x11-free-3.3.8/src/widgets/qpopupmenu.cpp.orig	2008-01-08 22:45:36.500530694 +0530
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     2
+++ qt-x11-free-3.3.8/src/widgets/qpopupmenu.cpp	2008-01-08 22:48:59.914488419 +0530
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     3
@@ -254,6 +254,7 @@
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     4
     QSize calcSize;
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     5
     QRegion mouseMoveBuffer;
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     6
     uint hasmouse : 1;
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     7
+    QPoint ignoremousepos;
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     8
 };
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     9
 
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    10
 static QPopupMenu* active_popup_menu = 0;
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    11
@@ -1356,6 +1357,7 @@
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    12
     popupActive = -1;
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    13
     if(style().styleHint(QStyle::SH_PopupMenu_SubMenuPopupDelay, this))
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    14
 	d->mouseMoveBuffer = QRegion();
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    15
+    d->ignoremousepos = QCursor::pos();
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    16
 }
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    17
 
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    18
 /*!
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    19
@@ -1703,6 +1705,11 @@
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    20
 
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    21
 void QPopupMenu::mouseMoveEvent( QMouseEvent *e )
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    22
 {
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    23
+    if( e->globalPos() == d->ignoremousepos ) {
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    24
+        return;
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    25
+    }
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    26
+    d->ignoremousepos = QPoint();
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    27
+
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    28
     motion++;
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    29
 
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    30
     if ( parentMenu && parentMenu->isPopupMenu ) {