VirtualBox

Changeset 107025 in vbox


Ignore:
Timestamp:
Nov 18, 2024 1:16:33 PM (3 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165969
Message:

ValKit: A tool to keep all guest displays filled with a uniform color, simplify to have all displays filled with blue. bugref:10714

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/nt/ntDisplay.cpp

    r106555 r107025  
    196196        if (RT_LIKELY(hdc))
    197197        {
    198             int k, idScreen = -1;
    199 
    200             for(k = 0; k < g_cHWnd; k++)
    201             {
    202                 if (hWnd == g_aHWnd[k])
    203                 {
    204                     idScreen = k;
    205                     RTPrintf("WM_PAINT for DISPLAY%d hWnd 0x%x\n", idScreen, hWnd);
    206                     break;
    207                 }
    208             }
    209 
    210             if (idScreen >= 0)
    211             {
    212                 RECT r;
    213 
    214                 SelectObject(hdc, g_ahBrush[idScreen % 3]);
    215                 r = ps.rcPaint;
    216                 PatBlt(hdc, r.left, r.top, r.right - r.left, r.bottom - r.top, PATCOPY);
    217             }
     198            RECT r;
     199
     200            SelectObject(hdc, g_ahBrush[0]);
     201            r = ps.rcPaint;
     202            PatBlt(hdc, r.left, r.top, r.right - r.left, r.bottom - r.top, PATCOPY);
    218203
    219204            EndPaint(hWnd, &ps);
     
    235220{
    236221    DISPLAY_DEVICE dev;
    237     HWND hWndPrimaryNew = g_hWndPrimary;
     222    HWND hWndPrimaryNew = NULL;
    238223    int k;
     224
     225    RT_ZERO(g_aHWnd);
     226    g_cHWnd = 0;
    239227
    240228    dev.cb = sizeof(dev);
     
    327315                {
    328316                    if (RT_LIKELY(g_aHWnd[k]))
     317                    {
    329318                        DestroyWindow(g_aHWnd[k]);
     319                        g_aHWnd[k] = NULL;
     320                    }
    330321                }
    331 
    332                 RT_ZERO(g_aHWnd);
    333                 g_cHWnd = 0;
    334322
    335323                CreateWindowForEachDisplay();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette