[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/unx

2022-03-22 Thread Tor Lillqvist (via logerrit)
 vcl/unx/generic/print/genpspgraphics.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bd568636bfe85d1f72b93227adb501a959068213
Author: Tor Lillqvist 
AuthorDate: Tue Mar 8 14:29:54 2022 +0200
Commit: Tor Lillqvist 
CommitDate: Tue Mar 22 13:08:12 2022 +0100

Trust the family name in the font file if necessary

Change-Id: I3598179bf85ba3acdaca6058982ba5bf81e68288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131249
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/vcl/unx/generic/print/genpspgraphics.cxx 
b/vcl/unx/generic/print/genpspgraphics.cxx
index 8a53b52d3ee1..3074033df235 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -644,7 +644,8 @@ bool GenPspGraphics::AddTempDevFontHelper( 
PhysicalFontCollection* pFontCollecti
 // prepare font data
 psp::FastPrintFontInfo aInfo;
 rMgr.getFontFastInfo( elem, aInfo );
-aInfo.m_aFamilyName = rFontName;
+if (!rFontName.isEmpty())
+aInfo.m_aFamilyName = rFontName;
 
 // inform glyph cache of new font
 FontAttributes aDFA = GenPspGraphics::Info2FontAttributes( aInfo );


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/unx

2021-12-22 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkframe.cxx |   30 ++
 1 file changed, 22 insertions(+), 8 deletions(-)

New commits:
commit e828b6095c30a261b830592ead10fba673175c6e
Author: Caolán McNamara 
AuthorDate: Fri Apr 23 11:18:01 2021 +0100
Commit: Aron Budea 
CommitDate: Wed Dec 22 17:33:21 2021 +0100

Related: tdf#140659 improve F6 task pane switching

for native gtk widgets inside vcl docking windows. Put vcl focus in
container on F6 so cycling moves between expected panes.

Change-Id: I70bd54493a345ae5bdb801caf79d567bc1ae0438
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114543
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 57138e6cfa1dec2c44d7cca55171dca40d45aaa3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127283
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 8637acd77684..55fc9968e927 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3371,19 +3371,28 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, 
GdkEventKey* pEvent, gpointe
 }
 else
 {
+bool bRestoreDisallowCycleFocusOut = false;
+
+VclPtr xOrigFrameFocusWin;
 VclPtr xOrigFocusWin;
 if (xTopLevelInterimWindow)
 {
-// Focus is inside a full-app InterimItemWindow send unconsumed
+// Focus is inside an InterimItemWindow so send unconsumed
 // keystrokes to by setting it as the mpFocusWin
 VclPtr xVclWindow = pThis->GetWindow();
 ImplFrameData* pFrameData = 
xVclWindow->ImplGetWindowImpl()->mpFrameData;
-xOrigFocusWin = pFrameData->mpFocusWin;
+xOrigFrameFocusWin = pFrameData->mpFocusWin;
 pFrameData->mpFocusWin = xTopLevelInterimWindow;
-if (pEvent->keyval == GDK_KEY_F6)
+
+ImplSVData* pSVData = ImplGetSVData();
+xOrigFocusWin = pSVData->mpWinData->mpFocusWin;
+pSVData->mpWinData->mpFocusWin = xTopLevelInterimWindow;
+
+if (pEvent->keyval == GDK_KEY_F6 && 
pThis->IsCycleFocusOutDisallowed())
 {
 // For F6, allow the focus to leave the InterimItemWindow
 pThis->AllowCycleFocusOut();
+bRestoreDisallowCycleFocusOut = true;
 }
 }
 
@@ -3400,14 +3409,19 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, 
GdkEventKey* pEvent, gpointe
 
 if (xTopLevelInterimWindow)
 {
-// Focus was inside a full-app InterimItemWindow, restore the 
original
-// focus win, unless the focus was changed away from the 
InterimItemWindow
-// which should only be possible with F6
+// Focus was inside an InterimItemWindow, restore the original
+// focus win, unless the focus was changed away from the
+// InterimItemWindow which should only be possible with F6
 VclPtr xVclWindow = pThis->GetWindow();
 ImplFrameData* pFrameData = 
xVclWindow->ImplGetWindowImpl()->mpFrameData;
 if (pFrameData->mpFocusWin == xTopLevelInterimWindow)
-pFrameData->mpFocusWin = xOrigFocusWin;
-if (pEvent->keyval == GDK_KEY_F6)
+pFrameData->mpFocusWin = xOrigFrameFocusWin;
+
+ImplSVData* pSVData = ImplGetSVData();
+if (pSVData->mpWinData->mpFocusWin == xTopLevelInterimWindow)
+pSVData->mpWinData->mpFocusWin = xOrigFocusWin;
+
+if (bRestoreDisallowCycleFocusOut)
 {
 // undo the above AllowCycleFocusOut for F6
 pThis->DisallowCycleFocusOut();