Changeset 41 for trunk/bitmap.cpp


Ignore:
Timestamp:
Mar 17, 2018, 11:00:45 PM (7 years ago)
Author:
Gregg Young
Message:

Fix hang on non-full screen capture of window with a menu open; Fix failure of widow to come to the top when program set as always on top are running. Add part of window title to auto file names; Major overhaul of settings dialog for Gotcha Quiet. More _QUIET_ ifdefs added to split code where Gotcha and Gotcha Quiet differ.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bitmap.cpp

    r28 r41  
    3333    SWP     swp;
    3434    SHORT   sWidth, sHeight;
    35     CHAR    ach[32];
     35    CHAR    ach[32] = {0};
    3636
    3737    // wait for the selected window to rise to the surface
    3838    if (f)
    3939    {
    40         WinSetWindowPos (hwndParent, HWND_TOP, 0,0, 0,0, SWP_ZORDER);
     40        WinSetFocus(HWND_DESKTOP, hwndParent);
    4141        // FIXME uh, yukki! polling! but seems to be the easiest way for now.
    4242        for (USHORT i = 0; i < MAX_WAIT; i++)
    4343        {
    4444            DosSleep (100);
     45            if (hwndParent == WinQueryFocus(HWND_DESKTOP)) {
     46                break;
     47            }
     48            else
     49            {
     50                // check if topmost window is a menu
     51                WinQueryClassName (WinQueryFocus(HWND_DESKTOP),
     52                                   sizeof (ach), ach);
     53                if (stricmp (ach, "#4") == 0)
     54                    break;
     55            }
    4556            WinQueryWindowPos (hwndParent, &swp);
    4657            if ((swp.hwndInsertBehind == HWND_TOP) ||
    47                 (swp.hwndInsertBehind == hwndSnapshot))
     58                (swp.hwndInsertBehind == hwndSnapshot)) {
    4859                break;
     60            }
    4961            else
    5062            {
Note: See TracChangeset for help on using the changeset viewer.