Changeset 353 for trunk/src/gui/kernel/qkeymapper_pm.cpp
- Timestamp:
- Nov 27, 2009, 1:20:02 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qkeymapper_pm.cpp
r180 r353 375 375 KeyRecord *rec = key_recorder.findKey(chm.scancode, false); 376 376 377 if (state == Qt::AltModifier) { 378 // Special handling of global PM hotkeys 379 switch (code) { 380 case Qt::Key_Space: { 381 // show system menu 382 HWND fId = widget->window()->internalFrameWinId(); 383 HWND sysMenu = WinWindowFromID(fId, FID_SYSMENU); 384 if (!sysMenu) 385 break; // no menu for this window 386 WinPostMsg(sysMenu, MM_STARTMENUMODE, 387 MPFROM2SHORT(TRUE, FALSE), 0); 388 return true; 389 } 390 case Qt::Key_F4: { 391 // we handle this key combination ourselves because not 392 // all top-level widgets have the system menu 393 WinPostMsg(widget->window()->internalFrameWinId(), 394 WM_CLOSE, 0, 0); 395 return true; 396 } 397 default: 398 break; 399 } 400 } 401 377 402 // If rec's state doesn't match the current state, something has changed behind our back 378 403 // (Consumed by modal widget is one possibility) So, remove the record from the list
Note:
See TracChangeset
for help on using the changeset viewer.