Ignore:
Timestamp:
Apr 15, 2010, 3:30:06 PM (11 years ago)
Author:
dmik
Message:

Don't process commands that are disabled in the menu while in fullscreen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/gui/lucide.cpp

    r393 r394  
    11801180                }
    11811181            }
    1182         }
    1183         break;
     1182            // in fullscreen, we hide the menu which effectively makes all
     1183            // disabled items work through accelerators which is completely
     1184            // unexpected. Fix it by translating accels manually and checking
     1185            // if they are disabled in the hidden menu
     1186            if ( WinTranslateAccel( hab, hwnd, WinQueryAccelTable( hab, hwnd ),
     1187                                    pqmsg ) ) {
     1188                if ( pqmsg->msg == WM_COMMAND ) {
     1189                    SHORT cm = SHORT1FROMMP(pqmsg->mp1);
     1190                    if ( !WinIsMenuItemEnabled( hWndMenu, cm ) )
     1191                        pqmsg->msg = WM_NULL;
     1192                }
     1193                return (MRESULT)TRUE;
     1194            }
     1195            return (MRESULT)FALSE;
     1196        }
    11841197
    11851198        case WM_SYSCOMMAND:
Note: See TracChangeset for help on using the changeset viewer.