Hi,
Here is a patch to remove the menu when the alt key is pressed, it is
not the case with GTK apps, and is disturbing. And the code to show the
menu wasn't at the right place, so, even if we should have this menu, it
is dirty IMO.
See this Launchpad bug:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/123500
And this OOo bug:
http://qa.openoffice.org/issues/show_bug.cgi?id=80604
Lucas
PS: this time, I used git format-patch, tell me if there is any problem.
From 89424d87cc50f1aebd555a2f077d8e83bacf743a Mon Sep 17 00:00:00 2001
From: Lucas Baudin <xapantu@gmail.com>
Date: Fri, 28 Jan 2011 16:41:29 +0100
Subject: [PATCH] Remove the menu when Left Alt Key was pressed; for GTK
---
vcl/unx/gtk/window/gtkframe.cxx | 30 ------------------------------
1 files changed, 0 insertions(+), 30 deletions(-)
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index cfd8b3b..15612d4 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3136,36 +3136,6 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer
frame
pThis->CallCallback( SALEVENT_KEYMODCHANGE, &aModEvt );
- if( ! aDel.isDeleted() )
- {
- // emulate KEY_MENU
- if( ( pEvent->keyval == GDK_Alt_L || pEvent->keyval == GDK_Alt_R ) &&
- ( nModCode & ~(KEY_MOD3|KEY_MOD2)) == 0 )
- {
- if( pEvent->type == GDK_KEY_PRESS )
- pThis->m_bSingleAltPress = true;
-
- else if( pThis->m_bSingleAltPress )
- {
- SalKeyEvent aKeyEvt;
-
- aKeyEvt.mnCode = KEY_MENU | nModCode;
- aKeyEvt.mnRepeat = 0;
- aKeyEvt.mnTime = pEvent->time;
- aKeyEvt.mnCharCode = 0;
-
- // simulate KEY_MENU
- pThis->CallCallback( SALEVENT_KEYINPUT, &aKeyEvt );
- if( ! aDel.isDeleted() )
- {
- pThis->CallCallback( SALEVENT_KEYUP, &aKeyEvt );
- pThis->m_bSingleAltPress = false;
- }
- }
- }
- else
- pThis->m_bSingleAltPress = false;
- }
}
else
{
--
1.7.1
Context
- [Libreoffice] [PATCH] GTK: remove menu when we press the alt key · xapantu
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.