Ignore:
Timestamp:
Oct 24, 2001, 5:41:54 PM (24 years ago)
Author:
sandervl
Message:

double click fix + double click on system menu now works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/menu.cpp

    r7079 r7195  
    1 /* $Id: menu.cpp,v 1.38 2001-10-16 14:49:45 sandervl Exp $*/
     1/* $Id: menu.cpp,v 1.39 2001-10-24 15:41:53 sandervl Exp $*/
    22/*
    33 * Menu functions
     
    3535#include "pmwindow.h"
    3636#include "win32wmisc.h"
     37#include "oslibmsg.h"
    3738
    3839#define DBG_LOCALLOG    DBG_menu
     
    28272828    }
    28282829
    2829     //EVENT_Capture( mt.hOwnerWnd, HTMENU ); //CB: todo
     2830#ifdef __WIN32OS2__
    28302831    //SvL: Set keyboard & mouse event capture
    28312832    SetCapture(mt.hOwnerWnd);
     2833    //SetCapture breaks system menu (double click), must generate double
     2834    //clicks manually
     2835    SetMenuDoubleClick(TRUE);
     2836#else
     2837    EVENT_Capture( mt.hOwnerWnd, HTMENU );
     2838#endif
    28322839
    28332840    while (!fEndMenu)
     
    28382845        /* we have to keep the message in the queue until it's
    28392846         * clear that menu loop is not over yet. */
    2840 //        if (!GetMessageA(&msg,msg.hwnd,0,0)) break;
     2847#ifdef __WIN32OS2__
    28412848        //SvL: Getting messages for only the menu delays background paints (i.e. VPBuddy logo)
    28422849        if (!GetMessageA(&msg,0,0,0)) break;
     2850#else
     2851        if (!GetMessageA(&msg,msg.hwnd,0,0)) break;
     2852#endif
    28432853        TranslateMessage( &msg );
    28442854        mt.pt = msg.pt;
     
    28682878                    if (bSysMenu && (hmenu == mt.hTopMenu))
    28692879                    {
     2880#ifdef __WIN32OS2__
     2881                        //double click on system menu -> close application
     2882                        PostMessageA(hwnd, WM_SYSCOMMAND,SC_CLOSE, msg.lParam);
     2883#endif
    28702884                        fEndMenu = TRUE;
    28712885                        break;
     
    30623076        else if (msg.message == WM_SYSCOMMAND)
    30633077        {
    3064                 /* The user clicked on the system menu/button */
    3065         fEndMenu = TRUE;
    3066         break;
     3078            /* The user clicked on the system menu/button */
     3079            fEndMenu = TRUE;
     3080            break;
    30673081        }
    30683082        else
     
    30793093        else mt.trackFlags &= ~TF_SKIPREMOVE;
    30803094    }
    3081 
     3095#ifdef __WIN32OS2__
     3096    SetMenuDoubleClick(FALSE);
    30823097    ReleaseCapture();
     3098#endif
    30833099
    30843100    menu = MENU_GetMenu(mt.hTopMenu);
Note: See TracChangeset for help on using the changeset viewer.