[PATCH] fdo#32552 (alt key opens "File"-menu)

Julien Nabet serval2412 at yahoo.fr
Tue Feb 15 13:29:40 PST 2011


---
 vcl/unx/source/window/salframe.cxx |   23 +----------------------
 1 files changed, 1 insertions(+), 22 deletions(-)

diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx
index f52f780..5f40c20 100644
--- a/vcl/unx/source/window/salframe.cxx
+++ b/vcl/unx/source/window/salframe.cxx
@@ -3292,28 +3292,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
         aModEvt.mnCode = nModCode;
         aModEvt.mnTime = pEvent->time;
 
-        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;
+        return CallCallback( SALEVENT_KEYMODCHANGE, &aModEvt );
     }
 
     mbSendExtKeyModChange = mbKeyMenu = false;
-- 
1.7.3.5


--------------020900010102070607090506--


More information about the LibreOffice mailing list