Changeset 784
- Timestamp:
- Oct 7, 2010, 12:17:37 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r748 r784 1747 1747 bool QETWidget::translateMouseEvent(const QMSG &qmsg) 1748 1748 { 1749 #if defined(QT_DEBUGMSGFLOW) && 01750 static const char *msgNames[] = { // 11 items1751 "WM_MOUSEMOVE",1752 "WM_BUTTON1DOWN", "WM_BUTTON1UP", "WM_BUTTON1DBLCLK",1753 "WM_BUTTON2DOWN", "WM_BUTTON2UP", "WM_BUTTON2DBLCLK",1754 "WM_BUTTON3DOWN", "WM_BUTTON3UP", "WM_BUTTON3DBLCLK",1755 "WM_???"1756 };1757 int msgIdx = qmsg.msg - WM_MOUSEMOVE;1758 if (msgIdx < 0 || msgIdx > 9)1759 msgIdx = 10;1760 qDebug("%s (%04lX): [%08lX/%p:%s] %04hd,%04hd hit=%04hX fl=%04hX",1761 msgNames[msgIdx], qmsg.msg, qmsg.hwnd, this, widgetName(this),1762 SHORT1FROMMP(qmsg.mp1), SHORT2FROMMP(qmsg.mp1),1763 SHORT1FROMMP(qmsg.mp2), SHORT2FROMMP(qmsg.mp2));1764 #endif1765 1766 1749 if (!isWindow() && testAttribute(Qt::WA_NativeWindow)) 1767 1750 Q_ASSERT(internalWinId() != NULLHANDLE); … … 2629 2612 debug.nospace() << "SWP(" << swp.x << "," << swp.y 2630 2613 << " " << swp.cx << "x" << swp.cy << " " 2631 << qDebugFmtHex(swp.hwndInsertBehind) 2614 << qDebugFmtHex(swp.hwndInsertBehind) << " " 2632 2615 << fl.constData() << ")"; 2633 2616 return debug.space(); … … 2640 2623 #define myCaseEnd() } 2641 2624 2625 bool isMouse = false; 2626 2642 2627 switch (qmsg.msg) { 2628 2629 #if 1 2630 myCaseBegin(WM_MOUSEMOVE) 2631 isMouse = true; break; 2632 myCaseEnd() 2633 myCaseBegin(WM_BUTTON1DOWN) 2634 isMouse = true; break; 2635 myCaseEnd() 2636 myCaseBegin(WM_BUTTON1UP) 2637 isMouse = true; break; 2638 myCaseEnd() 2639 myCaseBegin(WM_BUTTON1DBLCLK) 2640 isMouse = true; break; 2641 myCaseEnd() 2642 myCaseBegin(WM_BUTTON2DOWN) 2643 isMouse = true; break; 2644 myCaseEnd() 2645 myCaseBegin(WM_BUTTON2UP) 2646 isMouse = true; break; 2647 myCaseEnd() 2648 myCaseBegin(WM_BUTTON2DBLCLK) 2649 isMouse = true; break; 2650 myCaseEnd() 2651 myCaseBegin(WM_BUTTON3DOWN) 2652 isMouse = true; break; 2653 myCaseEnd() 2654 myCaseBegin(WM_BUTTON3UP) 2655 isMouse = true; break; 2656 myCaseEnd() 2657 myCaseBegin(WM_BUTTON3DBLCLK) 2658 isMouse = true; break; 2659 myCaseEnd() 2660 #endif 2643 2661 2644 2662 myCaseBegin(WM_CHAR) … … 2764 2782 myCaseEnd() 2765 2783 2784 myCaseBegin(WM_ADJUSTWINDOWPOS) 2785 break; 2786 myCaseEnd() 2787 2788 myCaseBegin(WM_VRNDISABLED) 2789 break; 2790 myCaseEnd() 2791 myCaseBegin(WM_VRNENABLED) 2792 break; 2793 myCaseEnd() 2794 2795 myCaseBegin(WM_SHOW) 2796 break; 2797 myCaseEnd() 2798 2766 2799 default: 2767 2800 debug.nospace() << "WM_" << qDebugFmtHex(qmsg.msg) << ":"; … … 2771 2804 } 2772 2805 2806 if (isMouse) { 2807 SHORT x = SHORT1FROMMP(qmsg.mp1); 2808 SHORT y = SHORT2FROMMP(qmsg.mp1); 2809 USHORT hit = SHORT1FROMMP(qmsg.mp2); 2810 bool fl = SHORT2FROMMP(qmsg.mp2); 2811 QByteArray hitstr; 2812 myDefFlagEx(hit, HT_NORMAL, hitstr, "NORMAL"); 2813 myDefFlagEx(hit, HT_TRANSPARENT, hitstr, "TRANSPARENT"); 2814 myDefFlagEx(hit, HT_DISCARD, hitstr, "DISCARD"); 2815 myDefFlagEx(hit, HT_ERROR, hitstr, "ERROR"); 2816 QByteArray flstr; 2817 myDefFlagEx(fl, KC_CHAR, flstr, "CHAR"); 2818 myDefFlagEx(fl, KC_VIRTUALKEY, flstr, "VIRT"); 2819 myDefFlagEx(fl, KC_SCANCODE, flstr, "SCAN"); 2820 myDefFlagEx(fl, KC_SHIFT, flstr, "SHIFT"); 2821 myDefFlagEx(fl, KC_CTRL, flstr, "CTRL"); 2822 myDefFlagEx(fl, KC_ALT, flstr, "ALT"); 2823 myDefFlagEx(fl, KC_KEYUP, flstr, "UP"); 2824 myDefFlagEx(fl, KC_PREVDOWN, flstr, "PREVDWN"); 2825 myDefFlagEx(fl, KC_LONEKEY, flstr, "LONE"); 2826 myDefFlagEx(fl, KC_DEADKEY, flstr, "DEAD"); 2827 myDefFlagEx(fl, KC_COMPOSITE, flstr, "COMP"); 2828 myDefFlagEx(fl, KC_INVALIDCOMP, flstr, "INVCMP"); 2829 myDefFlagEx(fl, KC_TOGGLE, flstr, "TGGL"); 2830 myDefFlagEx(fl, KC_INVALIDCHAR, flstr, "INVCHR"); 2831 myDefFlagEx(fl, KC_NONE, flstr, "NONE"); 2832 debug << "x" << x << "y" << y; 2833 debug.nospace() << "HT(" << hitstr.constData() << ")"; 2834 debug.space(); 2835 debug.nospace() << "KC(" << qDebugFmtHex(fl) << "," 2836 << flstr.constData() << ")"; 2837 debug.space(); 2838 } 2839 2773 2840 return debug; 2774 2841
Note:
See TracChangeset
for help on using the changeset viewer.