[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 2 commits - vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Tue Feb 1 00:45:55 PST 2011


 vcl/unx/gtk/window/gtkframe.cxx      |   38 -----------------------------------
 vcl/unx/inc/plugins/gtk/gtkframe.hxx |    1 
 2 files changed, 39 deletions(-)

New commits:
commit 1a4f2c597e4881271d6ffe1a4d726ec738f66b7e
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Jan 28 17:15:32 2011 +0000

    remove obsolete m_bSingleAltPress
    (cherry picked from commit a63e78439ca947499a4678cea4dd8e9e07054ab9)
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 56552b3..3061ae0 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -559,7 +559,6 @@ void GtkSalFrame::InitCommon()
     // init members
     m_pCurrentCursor    = NULL;
     m_nKeyModifiers     = 0;
-    m_bSingleAltPress   = false;
     m_bFullscreen       = false;
     m_nState			= GDK_WINDOW_STATE_WITHDRAWN;
     m_nVisibility		= GDK_VISIBILITY_FULLY_OBSCURED;
@@ -2851,7 +2850,6 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
     if( !pEvent->in )
     {
         pThis->m_nKeyModifiers = 0;
-        pThis->m_bSingleAltPress = false;
         pThis->m_bSendModChangeOnRelease = false;
     }
 
@@ -3055,10 +3053,7 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame
     if( pThis->m_pIMHandler )
     {
         if( pThis->m_pIMHandler->handleKeyEvent( pEvent ) )
-        {
-            pThis->m_bSingleAltPress = false;
             return TRUE;
-        }
     }
     GTK_YIELD_GRAB();
 
@@ -3157,10 +3152,7 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame
                               (pEvent->type == GDK_KEY_PRESS),
                               false );
         if( ! aDel.isDeleted() )
-        {
             pThis->m_bSendModChangeOnRelease = false;
-            pThis->m_bSingleAltPress = false;
-        }
     }
 
     if( !aDel.isDeleted() && pThis->m_pIMHandler )
diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
index 350185c..2831f33 100644
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
@@ -185,7 +185,6 @@ class GtkSalFrame : public SalFrame
     guint                           m_nGSMCookie;
     int                             m_nWorkArea;
     bool                            m_bFullscreen;
-    bool                            m_bSingleAltPress;
     bool                            m_bDefaultPos;
     bool                            m_bDefaultSize;
     bool                            m_bSendModChangeOnRelease;
commit ba110ce308ac66d568a1f6430d4e3217a1849716
Author: Lucas Baudin <xapantu at gmail.com>
Date:   Fri Jan 28 16:41:29 2011 +0100

    Remove the menu when Left Alt Key was pressed; for GTK
    (cherry picked from commit db1f9d326bdd678c177eea337997b3c0aefa0c19)
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 18ac631..56552b3 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3145,36 +3145,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
     {


More information about the Libreoffice-commits mailing list