httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/support/win32 ApacheMonitor.c
Date Thu, 16 Aug 2001 18:12:46 GMT
wrowe       01/08/16 11:12:46

  Modified:    support/win32 ApacheMonitor.c
  Log:
    Fix the 'never disappearing' popup menu - anchor it to our (hidden)
    global window, which allows TrackPopupMenu to lose focus when any other
    window is selected.
  
  Revision  Changes    Path
  1.11      +8 -4      httpd-2.0/support/win32/ApacheMonitor.c
  
  Index: ApacheMonitor.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/win32/ApacheMonitor.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ApacheMonitor.c	2001/08/16 18:06:30	1.10
  +++ ApacheMonitor.c	2001/08/16 18:12:46	1.11
  @@ -326,9 +326,11 @@
           appendMenuItem(hMenu, 0, "", FALSE, TRUE);
           appendMenuItem(hMenu, IDM_EXIT,  g_lpMsg[IDS_MSG_MNUEXIT-IDS_MSG_FIRST], FALSE,
TRUE);
   
  +        if (!SetForegroundWindow(hWnd))
  +            SetForegroundWindow(NULL);
           GetCursorPos(&pt);
  -        SetForegroundWindow(NULL);
  -        TrackPopupMenu(hMenu, TPM_LEFTALIGN|TPM_RIGHTBUTTON, pt.x, pt.y, 0, hWnd, NULL);
  +        TrackPopupMenu(hMenu, TPM_LEFTALIGN|TPM_RIGHTBUTTON, 
  +                       pt.x, pt.y, 0, hWnd, NULL);
           DestroyMenu(hMenu);
       }
   }
  @@ -350,9 +352,11 @@
           }
           if (i)
           {
  +            if (!SetForegroundWindow(hWnd))
  +                SetForegroundWindow(NULL);
               GetCursorPos(&pt);
  -            SetForegroundWindow(NULL);
  -            TrackPopupMenu(hMenu, TPM_LEFTALIGN|TPM_RIGHTBUTTON, pt.x, pt.y, 0, hWnd, NULL);
  +            TrackPopupMenu(hMenu, TPM_LEFTALIGN|TPM_RIGHTBUTTON, 
  +                           pt.x, pt.y, 0, hWnd, NULL);
               DestroyMenu(hMenu);
           }
       }
  
  
  

Mime
View raw message