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

New commits:
commit 8f07984471add9cb2e7b4fddcfaa505cc7d508fe
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Dec 20 16:37:52 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Dec 20 21:21:22 2023 +0100

    Resolves: tdf#158332 'fake' keystroke exits presentation
    
    the fake keystroke is to make tooltips go away before menus which
    used to be a problem versions of gtk3 < 3.24 that resultsed in no
    menus appearing. Our min is still 3.18 so technically we need to retain
    that until bumping past that as baseline.
    
    Change-Id: I94aa309665c50c8ca310285d1e691030f443934a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161080
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sd/source/ui/slideshow/showwin.cxx 
b/sd/source/ui/slideshow/showwin.cxx
index 5e4018b2ba10..d6ecc19a69d0 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -98,6 +98,12 @@ void ShowWindow::dispose()
 
 void ShowWindow::KeyInput(const KeyEvent& rKEvt)
 {
+    // Ignore workaround of https://gitlab.gnome.org/GNOME/gtk/issues/1785
+    // See calls to GtkSalFrame::makeFakeKeyPress (Fixed in GTK 3.24)
+    bool bFakeKeyPress = rKEvt.GetKeyCode().GetFullCode() == 0;
+    if (bFakeKeyPress)
+        return;
+
     bool bReturn = false;
 
     if( SHOWWINDOWMODE_PREVIEW == meShowWindowMode )
@@ -127,11 +133,7 @@ void ShowWindow::KeyInput(const KeyEvent& rKEvt)
     }
     else if( SHOWWINDOWMODE_BLANK == meShowWindowMode )
     {
-        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 3.24)
-        if (!bFakeKeyPress)
-            RestartShow();
+        RestartShow();
         bReturn = true;
     }
     else if( SHOWWINDOWMODE_PAUSE == meShowWindowMode )
commit 6b05dc79e531633d84a1b6ed60f3d281d02c713e
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Dec 20 16:34:11 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Dec 20 21:21:13 2023 +0100

    comment re GTK 2.34 should be 3.24
    
    Change-Id: I9acc070e6983f7f5e72120029fa968f0f15306e2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161079
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sd/source/ui/slideshow/showwin.cxx 
b/sd/source/ui/slideshow/showwin.cxx
index 4bc0d414307c..5e4018b2ba10 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -129,7 +129,7 @@ void ShowWindow::KeyInput(const KeyEvent& rKEvt)
     {
         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)
+        // See calls to GtkSalFrame::makeFakeKeyPress (Fixed in GTK 3.24)
         if (!bFakeKeyPress)
             RestartShow();
         bReturn = true;
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 3def046ce22a..2bd6b384ce9c 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -11093,7 +11093,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
+            // Fixed in GTK 3.24
             GdkEvent *pKeyEvent = GtkSalFrame::makeFakeKeyPress(pWidget);
             gtk_main_do_event(pKeyEvent);
 
@@ -11455,7 +11455,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
+            // Fixed in GTK 3.24
             GdkEvent *pKeyEvent = GtkSalFrame::makeFakeKeyPress(pWidget);
             gtk_main_do_event(pKeyEvent);
 

Reply via email to