Changeset 109


Ignore:
Timestamp:
Jul 30, 2006, 2:33:26 PM (19 years ago)
Author:
dmik
Message:

Widgets: Fixed: QPopupMenu::exec() did not return before the mouse press event that caused the popup menu closure was delivered as QWidget::keyPressEvent(); as a result, QPushButton::popupPressed() didn't execute setDown( FALSE ) before opening a new popup menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel/qapplication_pm.cpp

    r106 r109  
    25932593                // flip y coordinate
    25942594                wpos.ry() = w->height() - (wpos.y() + 1);
    2595                 QMSG newQmsg = qmsg;
    2596                 newQmsg.hwnd = w->winId();
    2597                 newQmsg.mp1 = MPFROM2SHORT( wpos.x(), wpos.y() );
    2598                 ((QETWidget *) w)->translateMouseEvent( newQmsg );
     2595                // Note: it's important to post this message rather than send:
     2596                // QPushButton::popupPressed() depends on this so that
     2597                // popup->exec() must return before this message is delivered
     2598                // as QWidget::keyPressEvent().
     2599                WinPostMsg( w->winId(), qmsg.msg,
     2600                            MPFROM2SHORT( wpos.x(), wpos.y() ), qmsg.mp2 );
    25992601            }
    26002602        }
Note: See TracChangeset for help on using the changeset viewer.