diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-02-17 13:48:00 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-02-17 13:52:10 +0100 |
commit | 07a5b5a6cce711133a07887dd8b349615adb1bd8 (patch) | |
tree | 4a654f191d77408f9d7105df2d485da776de683a | |
parent | 2b9977d7a57a118d90d1157bee8f0dbf2fa6d591 (diff) |
fdo#32552 alt key opens "File" menu
-rw-r--r-- | vcl/unx/inc/salframe.h | 1 | ||||
-rw-r--r-- | vcl/unx/source/window/salframe.cxx | 24 |
2 files changed, 2 insertions, 23 deletions
diff --git a/vcl/unx/inc/salframe.h b/vcl/unx/inc/salframe.h index 7b82f86f53cc..e9c6331fcb70 100644 --- a/vcl/unx/inc/salframe.h +++ b/vcl/unx/inc/salframe.h @@ -91,7 +91,6 @@ class VCL_DLLPUBLIC X11SalFrame : public SalFrame USHORT nKeyCode_; // last key code USHORT nKeyState_; // last key state int nCompose_; // compose state - bool mbKeyMenu; bool mbSendExtKeyModChange; USHORT mnExtKeyMod; diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx index 5223fdaaf5f5..ef813e4fc8d6 100644 --- a/vcl/unx/source/window/salframe.cxx +++ b/vcl/unx/source/window/salframe.cxx @@ -679,7 +679,6 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, ULONG nSalFrameStyle, SystemParentD nKeyCode_ = 0; nKeyState_ = 0; nCompose_ = -1; - mbKeyMenu = false; mbSendExtKeyModChange = false; mnExtKeyMod = 0; @@ -3294,29 +3293,10 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent ) int nRet = CallCallback( SALEVENT_KEYMODCHANGE, &aModEvt ); - // emulate KEY_MENU - if ( ( (nKeySym == XK_Alt_L) || (nKeySym == XK_Alt_R) ) && - ( (nModCode & ~(KEY_MOD3|KEY_MOD2)) == 0 ) ) - { - if( pEvent->type == XLIB_KeyPress ) - mbKeyMenu = true; - else if( mbKeyMenu ) - { - // simulate KEY_MENU - aKeyEvt.mnCode = KEY_MENU | nModCode; - aKeyEvt.mnRepeat = 0; - aKeyEvt.mnTime = pEvent->time; - aKeyEvt.mnCharCode = 0; - nRet = CallCallback( SALEVENT_KEYINPUT, &aKeyEvt ); - nRet = CallCallback( SALEVENT_KEYUP, &aKeyEvt ); - } - } - else - mbKeyMenu = false; return nRet; } - mbSendExtKeyModChange = mbKeyMenu = false; + mbSendExtKeyModChange = false; // try to figure out the vcl code for the keysym // #i52338# use the unmodified KeySym if there is none for the real KeySym @@ -3515,7 +3495,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent ) else { mbInputFocus = False; - mbSendExtKeyModChange = mbKeyMenu = false; + mbSendExtKeyModChange = false; mnExtKeyMod = 0; return CallCallback( SALEVENT_LOSEFOCUS, 0 ); } |