~ubuntu-branches/ubuntu/precise/wine/precise

« back to all changes in this revision

Viewing changes to dlls/user32/tests/win.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2008-06-17 10:22:39 UTC
  • mfrom: (1.1.41 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617102239-s8olx8ehtsdejmhz
Tags: 1.0.0-1ubuntu1
* New upstream release
  - First stable release of Wine
* Change to 1.0.0 versioning scheme since Wine will make a 1.0.1
* Remove dh_installchangelogs since the upstream changelog was removed
  - It is now available online at winehq.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
#define COUNTOF(arr) (sizeof(arr)/sizeof(arr[0]))
61
61
 
 
62
static void dump_minmax_info( const MINMAXINFO *minmax )
 
63
{
 
64
    trace("Reserved=%d,%d MaxSize=%d,%d MaxPos=%d,%d MinTrack=%d,%d MaxTrack=%d,%d\n",
 
65
          minmax->ptReserved.x, minmax->ptReserved.y,
 
66
          minmax->ptMaxSize.x, minmax->ptMaxSize.y,
 
67
          minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
 
68
          minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
 
69
          minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
 
70
}
 
71
 
62
72
/* try to make sure pending X events have been processed before continuing */
63
73
static void flush_events( BOOL remove_messages )
64
74
{
552
562
            MINMAXINFO* minmax = (MINMAXINFO *)lparam;
553
563
 
554
564
            trace("hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx\n", hwnd, wparam, lparam);
555
 
            trace("ptReserved (%d,%d), ptMaxSize (%d,%d), ptMaxPosition (%d,%d)\n"
556
 
                  "       ptMinTrackSize (%d,%d), ptMaxTrackSize (%d,%d)\n",
557
 
                  minmax->ptReserved.x, minmax->ptReserved.y,
558
 
                  minmax->ptMaxSize.x, minmax->ptMaxSize.y,
559
 
                  minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
560
 
                  minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
561
 
                  minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
 
565
            dump_minmax_info( minmax );
562
566
            SetWindowLongPtrA(hwnd, GWLP_USERDATA, 0x20031021);
563
567
            break;
564
568
        }
652
656
            MINMAXINFO* minmax = (MINMAXINFO *)lparam;
653
657
 
654
658
            trace("hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx\n", hwnd, wparam, lparam);
655
 
            trace("ptReserved (%d,%d), ptMaxSize (%d,%d), ptMaxPosition (%d,%d)\n"
656
 
                  "       ptMinTrackSize (%d,%d), ptMaxTrackSize (%d,%d)\n",
657
 
                  minmax->ptReserved.x, minmax->ptReserved.y,
658
 
                  minmax->ptMaxSize.x, minmax->ptMaxSize.y,
659
 
                  minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
660
 
                  minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
661
 
                  minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
 
659
            dump_minmax_info( minmax );
662
660
            SetWindowLongPtrA(hwnd, GWLP_USERDATA, 0x20031021);
663
661
            break;
664
662
        }
732
730
 
733
731
    ok(info->dwStyle == (DWORD)GetWindowLongA(hwnd, GWL_STYLE),
734
732
       "wrong dwStyle: %08x != %08x\n", info->dwStyle, GetWindowLongA(hwnd, GWL_STYLE));
735
 
    /* Windows reports a not documented exstyle 0x800 in WINDOWINFO, but
736
 
     * doesn't return it in GetWindowLong(hwnd, GWL_EXSTYLE).
 
733
    /* Windows reports some undocumented exstyles in WINDOWINFO, but
 
734
     * doesn't return them in GetWindowLong(hwnd, GWL_EXSTYLE).
737
735
     */
738
 
    ok((info->dwExStyle & ~0x800) == (DWORD)GetWindowLongA(hwnd, GWL_EXSTYLE),
 
736
    ok((info->dwExStyle & ~0xe0000800) == (DWORD)GetWindowLongA(hwnd, GWL_EXSTYLE),
739
737
       "wrong dwExStyle: %08x != %08x\n", info->dwExStyle, GetWindowLongA(hwnd, GWL_EXSTYLE));
740
738
    status = (GetActiveWindow() == hwnd) ? WS_ACTIVECAPTION : 0;
741
739
    ok(info->dwWindowStatus == status, "wrong dwWindowStatus: %04x != %04x\n",
742
740
       info->dwWindowStatus, status);
743
741
 
744
 
    trace("rcWindow: %d,%d - %d,%d\n", rcWindow.left, rcWindow.top, rcWindow.right, rcWindow.bottom);
745
 
    trace("rcClient: %d,%d - %d,%d\n", rcClient.left, rcClient.top, rcClient.right, rcClient.bottom);
746
 
 
747
742
    /* win2k and XP return broken border info in GetWindowInfo most of
748
743
     * the time, so there is no point in testing it.
749
744
     */
1422
1417
                style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
1423
1418
            AdjustWindowRectEx(&rc, style, 0, exstyle);
1424
1419
            trace("MDI child: calculated max window size = (%d x %d)\n", rc.right-rc.left, rc.bottom-rc.top);
1425
 
 
1426
 
            trace("ptReserved = (%d,%d)\n"
1427
 
                  "ptMaxSize = (%d,%d)\n"
1428
 
                  "ptMaxPosition = (%d,%d)\n"
1429
 
                  "ptMinTrackSize = (%d,%d)\n"
1430
 
                  "ptMaxTrackSize = (%d,%d)\n",
1431
 
                  minmax->ptReserved.x, minmax->ptReserved.y,
1432
 
                  minmax->ptMaxSize.x, minmax->ptMaxSize.y,
1433
 
                  minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
1434
 
                  minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
1435
 
                  minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
 
1420
            dump_minmax_info( minmax );
1436
1421
 
1437
1422
            ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n",
1438
1423
               minmax->ptMaxSize.x, rc.right - rc.left);
1441
1426
 
1442
1427
            DefMDIChildProcA(hwnd, msg, wparam, lparam);
1443
1428
 
1444
 
            trace("DefMDIChildProc returned:\n"
1445
 
                  "ptReserved = (%d,%d)\n"
1446
 
                  "ptMaxSize = (%d,%d)\n"
1447
 
                  "ptMaxPosition = (%d,%d)\n"
1448
 
                  "ptMinTrackSize = (%d,%d)\n"
1449
 
                  "ptMaxTrackSize = (%d,%d)\n",
1450
 
                  minmax->ptReserved.x, minmax->ptReserved.y,
1451
 
                  minmax->ptMaxSize.x, minmax->ptMaxSize.y,
1452
 
                  minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
1453
 
                  minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
1454
 
                  minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
 
1429
            trace("DefMDIChildProc returned:\n");
 
1430
            dump_minmax_info( minmax );
1455
1431
 
1456
1432
            MDI_ChildGetMinMaxInfo(client, hwnd, &my_minmax);
1457
1433
            ok(minmax->ptMaxSize.x == my_minmax.ptMaxSize.x, "default width of maximized child %d != %d\n",
1529
1505
                style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
1530
1506
            AdjustWindowRectEx(&rc, style, 0, exstyle);
1531
1507
            trace("calculated max child window size = (%d x %d)\n", rc.right-rc.left, rc.bottom-rc.top);
1532
 
 
1533
 
            trace("ptReserved = (%d,%d)\n"
1534
 
                  "ptMaxSize = (%d,%d)\n"
1535
 
                  "ptMaxPosition = (%d,%d)\n"
1536
 
                  "ptMinTrackSize = (%d,%d)\n"
1537
 
                  "ptMaxTrackSize = (%d,%d)\n",
1538
 
                  minmax->ptReserved.x, minmax->ptReserved.y,
1539
 
                  minmax->ptMaxSize.x, minmax->ptMaxSize.y,
1540
 
                  minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
1541
 
                  minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
1542
 
                  minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
 
1508
            dump_minmax_info( minmax );
1543
1509
 
1544
1510
            ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n",
1545
1511
               minmax->ptMaxSize.x, rc.right - rc.left);