[Libreoffice-commits] core.git: sd/source vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 19 20:06:20 UTC 2021


 sd/source/ui/slideshow/showwin.cxx |    7 +++++--
 vcl/unx/gtk3/gtk3gtkinst.cxx       |    2 ++
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit ed8a157666c4aef5a28f9292e545095520c0dfaf
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Feb 19 17:07:36 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Feb 19 21:05:35 2021 +0100

    ignore "fake" keypress in slideshow
    
    where the fake keypress is needed to workaround
    https://gitlab.gnome.org/GNOME/gtk/issues/1785 which exists as a problem
    in gtk < 3.24
    
    Change-Id: If8cdd536668f515327ab8fc11033e5f9c6e56a35
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111237
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index becc8b8ea4e2..c142dcba0945 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -123,7 +123,11 @@ void ShowWindow::KeyInput(const KeyEvent& rKEvt)
     }
     else if( SHOWWINDOWMODE_BLANK == meShowWindowMode )
     {
-        RestartShow();
+        bool bFakeKeyPress = rKEvt.GetKeyCode().GetFullCode() == 0;
+        // Ignore workaround of https://gitlab.gnome.org/GNOME/gtk/issues/1785
+        // See calls to GtkSalFrame::makeFakeKeyPress (Fixed in GTK 2.34)
+        if (!bFakeKeyPress)
+            RestartShow();
         bReturn = true;
     }
     else if( SHOWWINDOWMODE_PAUSE == meShowWindowMode )
@@ -408,7 +412,6 @@ void ShowWindow::RestartShow()
 }
 
 void ShowWindow::RestartShow( sal_Int32 nPageIndexToRestart )
-
 {
     ShowWindowMode eOldShowWindowMode = meShowWindowMode;
 
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 0d0c28b15b80..9f1804a78791 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -7854,6 +7854,7 @@ private:
             // Send a keyboard event through gtk_main_do_event to toggle any active tooltip offs
             // before trying to launch the menu
             // https://gitlab.gnome.org/GNOME/gtk/issues/1785
+            // Fixed in GTK 2.34
             GdkEvent *pKeyEvent = GtkSalFrame::makeFakeKeyPress(pWidget);
             gtk_main_do_event(pKeyEvent);
 
@@ -8159,6 +8160,7 @@ public:
             // Send a keyboard event through gtk_main_do_event to toggle any active tooltip offs
             // before trying to launch the menu
             // https://gitlab.gnome.org/GNOME/gtk/issues/1785
+            // Fixed in GTK 2.34
             GdkEvent *pKeyEvent = GtkSalFrame::makeFakeKeyPress(pWidget);
             gtk_main_do_event(pKeyEvent);
 


More information about the Libreoffice-commits mailing list