Bugzilla – Attachment 179197 Details for
Bug 148258
Allow customization of Alt+<key> on gtk3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Tested fix
bug-148258.patch.txt (text/plain), 6.70 KB, created by
Vince
on 2022-03-30 00:07:58 UTC
(
hide
)
Description:
Tested fix
Filename:
MIME Type:
Creator:
Vince
Created:
2022-03-30 00:07:58 UTC
Size:
6.70 KB
patch
obsolete
>diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx >index feaacb1bdfea..2f53ca293d27 100644 >--- a/sw/source/uibase/docvw/edtwin.cxx >+++ b/sw/source/uibase/docvw/edtwin.cxx >@@ -151,6 +151,11 @@ > #include <txtfrm.hxx> > #include <strings.hrc> > >+#include <bitset> >+ >+#define SW_KEY_TRACE >+#define KEY_TRACE_MSG_PREFIX "Writer:Keyboard: edtwin.cxx: KeyInput: " >+ > using namespace sw::mark; > using namespace ::com::sun::star; > >@@ -1636,6 +1641,15 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) > case SwKeyState::CheckKey: > eKeyState = SwKeyState::KeyToView; // default forward to View > >+ #ifdef SW_KEY_TRACE >+ if ( getenv("SW_KEY_TRACE") ) >+ std::cerr << std::endl << KEY_TRACE_MSG_PREFIX >+ << " [ Keycode=" << rKEvt.GetKeyCode().GetCode() >+ << " Shifted=" << std::bitset<4>(rKEvt.GetKeyCode().GetModifier()>>12) >+ << " Charcode=" << aCh << " ]" >+ << std::endl ; >+ #endif >+ > if (!comphelper::LibreOfficeKit::isActive() && > !rKeyCode.IsMod2() && '=' == aCh && > !rSh.IsTableMode() && rSh.GetTableFormat() && >@@ -1743,6 +1757,28 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) > goto KEYINPUT_CHECKTABLE; > > KEYINPUT_CHECKTABLE: >+ // Resolve bugs 49091, 53190, 93402 and >+ // https://bz.apache.org/ooo/show_bug.cgi?id=113502 >+ // but provide an option for restoring interactive >+ // table sizing functionality when needed. >+ if ( >+ ! (Window::GetIndicatorState() & KeyIndicatorState::CAPSLOCK) >+ && m_rView.KeyInput( aKeyEvent ) >+ ) >+ { >+ if ( getenv("SW_KEY_TRACE") ) >+ std::cerr << KEY_TRACE_MSG_PREFIX >+ << "CheckKey: Table sizing function overridden by keyboard customization" >+ << " [ Keycode=" << rKEvt.GetKeyCode().GetCode() >+ << " Shifted=" << std::bitset<4>(rKEvt.GetKeyCode().GetModifier()>>12) >+ << " ]" >+ << std::endl; >+ bFlushBuffer = true; >+ bNormalChar = false; >+ eKeyState = SwKeyState::End; >+ break ; >+ } >+ > if( rSh.IsTableMode() || !rSh.GetTableFormat() ) > { > if(!pFlyFormat && SwKeyState::KeyToView != eFlyState && >@@ -2197,8 +2233,15 @@ KEYINPUT_CHECKTABLE_INSDEL: > } > break; > } >+ #ifdef SW_KEY_TRACE >+ if ( getenv("SW_KEY_TRACE") && ( eKeyState != SwKeyState::KeyToView ) ) >+ std::cerr << KEY_TRACE_MSG_PREFIX >+ << "CheckKey: Key processed internally" >+ << std::endl; >+ #endif > } > break; >+ > case SwKeyState::CheckDocReadOnlyKeys: > { > eKeyState = SwKeyState::KeyToView; >@@ -2273,6 +2316,7 @@ KEYINPUT_CHECKTABLE_INSDEL: > > case SwKeyState::KeyToView: > { >+ > eKeyState = SwKeyState::End; > bNormalChar = > !rKeyCode.IsMod2() && >@@ -2298,6 +2342,12 @@ KEYINPUT_CHECKTABLE_INSDEL: > } > else if( m_rView.KeyInput( aKeyEvent ) ) > { >+ #ifdef SW_KEY_TRACE >+ if ( getenv("SW_KEY_TRACE") ) >+ std::cerr << KEY_TRACE_MSG_PREFIX >+ << "KeyToView: Keyboard customization function triggered" >+ << std::endl; >+ #endif > bFlushBuffer = true; > bNormalChar = false; > } >@@ -2311,6 +2361,12 @@ KEYINPUT_CHECKTABLE_INSDEL: > > if( !bIsDocReadOnly && bNormalChar ) > { >+ #ifdef SW_KEY_TRACE >+ if ( getenv("SW_KEY_TRACE") ) >+ std::cerr << KEY_TRACE_MSG_PREFIX >+ << "KeyToView: Normal character key processed internally" >+ << std::endl; >+ #endif > const SelectionType nSelectionType = rSh.GetSelectionType(); > const bool bDrawObject = (nSelectionType & SelectionType::DrawObject) && > !(nSelectionType & SelectionType::DrawObjectEditMode) && >@@ -2345,12 +2401,19 @@ KEYINPUT_CHECKTABLE_INSDEL: > } > else > { >+ #ifdef SW_KEY_TRACE >+ if ( getenv("SW_KEY_TRACE") ) >+ std::cerr << KEY_TRACE_MSG_PREFIX >+ << "KeyToView: Key passed to window" >+ << std::endl; >+ #endif > bNormalChar = false; > Window::KeyInput( aKeyEvent ); > } > } > } > break; >+ > case SwKeyState::LaunchOLEObject: > { > rSh.LaunchOLEObj(); >@@ -2400,6 +2463,7 @@ KEYINPUT_CHECKTABLE_INSDEL: > } > aCh = '\t'; > [[fallthrough]]; >+ > case SwKeyState::InsChar: > if (rSh.GetChar(false)==CH_TXT_ATR_FORMELEMENT) > { >diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx >index 29d6c00f78d7..e49162f9ac0b 100644 >--- a/vcl/unx/gtk3/gtkframe.cxx >+++ b/vcl/unx/gtk3/gtkframe.cxx >@@ -3896,14 +3896,18 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, GdkEventKey* pEvent, gpointe > bool bFocusInAnotherGtkWidget = false; > > VclPtr<vcl::Window> xTopLevelInterimWindow; >- > if (GTK_IS_WINDOW(pThis->m_pWindow)) > { >+ /* Resolve (temporarily) bug 146174 at cost of re-establishing bug 144846 >+ There MUST be a better way of solving problem than further sabotaging >+ the user's keyboard customization capability ... >+ > // tdf#144846 If this is registered as a menubar mnemonic then ensure > // that any other widget won't be considered as a candidate by taking > // over the task of launch the menubar menu outself > if (pThis->HandleMenubarMnemonic(pEvent->state, pEvent->keyval)) > return true; >+ */ > > GtkWidget* pFocusWindow = gtk_window_get_focus(GTK_WINDOW(pThis->m_pWindow)); > bFocusInAnotherGtkWidget = pFocusWindow && pFocusWindow != GTK_WIDGET(pThis->m_pFixedContainer);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 148258
:
179196
| 179197 |
179264