1830 TheClient->iWs.Flush(); |
1835 TheClient->iWs.Flush(); |
1831 } |
1836 } |
1832 |
1837 |
1833 void CTEventTest::InvisibleWindow_NextSetOfEvents() |
1838 void CTEventTest::InvisibleWindow_NextSetOfEvents() |
1834 { |
1839 { |
|
1840 const TPoint winpos(EWinPositionX, EWinPositionY); |
|
1841 |
1835 switch(iEventSet++) |
1842 switch(iEventSet++) |
1836 { |
1843 { |
1837 case 0: |
1844 case 0: |
1838 SimulatePointer(TRawEvent::EButton1Down,45,30); |
1845 { |
1839 SimulatePointer(TRawEvent::EButton1Up,45,30); |
1846 TPoint p1(45,30); |
1840 SimulatePointer(TRawEvent::EButton1Down,20,10); |
1847 TPoint p2(20,10); |
1841 SimulatePointer(TRawEvent::EButton1Up,20,10); |
1848 TPoint p3(46,31); |
|
1849 |
|
1850 SimulatePointer(TRawEvent::EButton1Down, p1); |
|
1851 SimulatePointer(TRawEvent::EButton1Up, p1); |
|
1852 SimulatePointer(TRawEvent::EButton1Down, p2); |
|
1853 SimulatePointer(TRawEvent::EButton1Up, p2); |
1842 TheClient->iWs.Flush(); |
1854 TheClient->iWs.Flush(); |
1843 iQueueClient->iChildWin->BaseWin()->SetVisible(EFalse); |
1855 iQueueClient->iChildWin->BaseWin()->SetVisible(EFalse); |
1844 iQueueClient->iChildWin->BaseWin()->SetVisible(ETrue); |
1856 iQueueClient->iChildWin->BaseWin()->SetVisible(ETrue); |
1845 iQueueClient->iWs.Flush(); |
1857 iQueueClient->iWs.Flush(); |
1846 SimulatePointer(TRawEvent::EButton1Down,46,31); |
1858 SimulatePointer(TRawEvent::EButton1Down, p3); |
1847 SimulatePointer(TRawEvent::EButton1Up,46,31); |
1859 SimulatePointer(TRawEvent::EButton1Up, p3); |
1848 AddExpectedEvent(EEventFocusGained); |
1860 AddExpectedEvent(EEventFocusGained); |
1849 AddExpectedPointer(TPointerEvent::EButton1Down, TPoint(20-EWinPositionX,10-EWinPositionY)); |
1861 |
1850 AddExpectedPointer(TPointerEvent::EButton1Up, TPoint(20-EWinPositionX,10-EWinPositionY)); |
1862 // adjust expected pointer coordinates for window position |
1851 AddExpectedPointer(TPointerEvent::EButton1Down, TPoint(46-EWinPositionX,31-EWinPositionY)); |
1863 p1-=winpos; |
1852 AddExpectedPointer(TPointerEvent::EButton1Up, TPoint(46-EWinPositionX,31-EWinPositionY)); |
1864 p2-=winpos; |
|
1865 p3-=winpos; |
|
1866 |
|
1867 // p1 expected post ou1cimx1#460496, previously queued events were deleted when a window was made invisible. |
|
1868 AddExpectedPointer(TPointerEvent::EButton1Down, p1); |
|
1869 AddExpectedPointer(TPointerEvent::EButton1Up, p1); |
|
1870 AddExpectedPointer(TPointerEvent::EButton1Down, p2); |
|
1871 AddExpectedPointer(TPointerEvent::EButton1Up, p2); |
|
1872 AddExpectedPointer(TPointerEvent::EButton1Down, p3); |
|
1873 AddExpectedPointer(TPointerEvent::EButton1Up, p3); |
|
1874 } |
1853 break; |
1875 break; |
1854 case 1: |
1876 case 1: |
1855 SimulatePointer(TRawEvent::EButton1Down,21,11); |
1877 { |
1856 SimulatePointer(TRawEvent::EButton1Up,21,11); |
1878 TPoint p1(21,11); |
1857 SimulatePointer(TRawEvent::EButton1Down,44,30); |
1879 TPoint p2(44,30); |
1858 SimulatePointer(TRawEvent::EButton1Up,44,30); |
1880 TPoint p3(19,12); |
|
1881 TPoint p4(47,32); |
|
1882 |
|
1883 SimulatePointer(TRawEvent::EButton1Down, p1); |
|
1884 SimulatePointer(TRawEvent::EButton1Up, p1); |
|
1885 SimulatePointer(TRawEvent::EButton1Down, p2); |
|
1886 SimulatePointer(TRawEvent::EButton1Up, p2); |
1859 TheClient->iWs.Flush(); |
1887 TheClient->iWs.Flush(); |
1860 iQueueClient->iWin->BaseWin()->SetVisible(EFalse); |
1888 iQueueClient->iWin->BaseWin()->SetVisible(EFalse); |
1861 iQueueClient->iWin->BaseWin()->SetVisible(ETrue); |
1889 iQueueClient->iWin->BaseWin()->SetVisible(ETrue); |
1862 iQueueClient->iWs.Flush(); |
1890 iQueueClient->iWs.Flush(); |
1863 SimulatePointer(TRawEvent::EButton1Down,19,12); |
1891 SimulatePointer(TRawEvent::EButton1Down, p3); |
1864 SimulatePointer(TRawEvent::EButton1Up,19,12); |
1892 SimulatePointer(TRawEvent::EButton1Up, p3); |
1865 SimulatePointer(TRawEvent::EButton1Down,47,32); |
1893 SimulatePointer(TRawEvent::EButton1Down, p4); |
1866 SimulatePointer(TRawEvent::EButton1Up,47,32); |
1894 SimulatePointer(TRawEvent::EButton1Up, p4); |
1867 /*AddExpectedPointer(TPointerEvent::EButton1Down, TPoint(44-EWinPositionX,30-EWinPositionY)); |
1895 |
1868 AddExpectedPointer(TPointerEvent::EButton1Up, TPoint(44-EWinPositionX,30-EWinPositionY));*/ |
1896 // adjust expected pointer coordinates for window position |
1869 AddExpectedPointer(TPointerEvent::EButton1Down, TPoint(19-EWinPositionX,12-EWinPositionY)); |
1897 p1-=winpos; |
1870 AddExpectedPointer(TPointerEvent::EButton1Up, TPoint(19-EWinPositionX,12-EWinPositionY)); |
1898 p2-=winpos; |
1871 AddExpectedPointer(TPointerEvent::EButton1Down, TPoint(47-EWinPositionX,32-EWinPositionY)); |
1899 p3-=winpos; |
1872 AddExpectedPointer(TPointerEvent::EButton1Up, TPoint(47-EWinPositionX,32-EWinPositionY)); |
1900 p4-=winpos; |
|
1901 |
|
1902 // p1 expected post ou1cimx1#460496, previously queued events were deleted when a window was made invisible. |
|
1903 AddExpectedPointer(TPointerEvent::EButton1Down, p1); |
|
1904 AddExpectedPointer(TPointerEvent::EButton1Up, p1); |
|
1905 // p2 expected post ou1cimx1#460496, previously queued events were deleted when a window was made invisible. |
|
1906 AddExpectedPointer(TPointerEvent::EButton1Down, p2); |
|
1907 AddExpectedPointer(TPointerEvent::EButton1Up, p2); |
|
1908 AddExpectedPointer(TPointerEvent::EButton1Down, p3); |
|
1909 AddExpectedPointer(TPointerEvent::EButton1Up, p3); |
|
1910 AddExpectedPointer(TPointerEvent::EButton1Down, p4); |
|
1911 AddExpectedPointer(TPointerEvent::EButton1Up, p4); |
|
1912 } |
1873 break; |
1913 break; |
1874 default: |
1914 default: |
1875 CActiveScheduler::Stop(); |
1915 CActiveScheduler::Stop(); |
1876 break; |
1916 break; |
1877 } |
1917 } |