Hi Julien, I've compiled and tested it. Works fine. I read the bug description and there was said, that on Windows Alt works as F6 on Linux - to set focus on the menubar. Now we completely got rid of this with Alt on Linux. Is this intentionally, say that Alt alone has no effect at all?
I slightly changed your patch - removed the unused variable. Thomas On 02/15/2011 10:22 PM, Julien Nabet wrote: > Hello, > > Here is small patch to close the tracker 32552 (alt key opens "File"-menu). > I removed the block quoted in the comments, it compiles but I didn't > test it. I use Gnome and so Gtk on my Debian. > Could someone confirm it's ok (or not) ? > > Julien. > (LGPLv3+ / MPL) > > > > _______________________________________________ > LibreOffice mailing list > LibreOffice@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/libreoffice
>From c9f7793ad6ee79b569ab0c7b6abd080bc108bb85 Mon Sep 17 00:00:00 2001 From: Julien Nabet <serval2...@yahoo.fr> Date: Tue, 15 Feb 2011 22:29:40 +0100 Subject: [PATCH] fdo#32552 (alt key opens "File"-menu) --- 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
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice