Blame SOURCES/motifzone_1665.patch

e911fa
From 5583843084fe8ce68e6e0072e2e85d79bbd8edb8 Mon Sep 17 00:00:00 2001
e911fa
From: Carlos Soriano <csoriano@gnome.org>
e911fa
Date: Wed, 8 Nov 2017 00:27:55 +0100
e911fa
Subject: [PATCH] CascadeBG: Fix shortcuts not working after mouse click
e911fa
e911fa
The situation is that when a menu is clicked twice to open and close,
e911fa
the shorcuts stop working.
e911fa
e911fa
This happens because when the mouse click to close the pop menu finishes,
e911fa
it starts a drag. When a drag is started, the bit "wasposted" is set to
e911fa
prevent the menu from being messed with.
e911fa
e911fa
When the user clicks again with the mouse, this bit is unset and all is
e911fa
fine.
e911fa
e911fa
However, when using the keyboard this was not unset and when trying to
e911fa
select the menu it realized it was in a drag and instead of opening it
e911fa
was closing it, effectively preventing to use the shortcuts closing the
e911fa
menu while trying to opening it.
e911fa
e911fa
There are three possibilities:
e911fa
1- Don't start a drag when the pop menu is dismissed
e911fa
2- Unset the bit before selecting the menu when arming
e911fa
3- Not disarming the menu when the "wasposted" bit is on
e911fa
e911fa
This patch goes with the option 2.
e911fa
---
e911fa
 lib/Xm/CascadeBG.c | 4 ++++
e911fa
 1 file changed, 4 insertions(+)
e911fa
e911fa
diff --git a/lib/Xm/CascadeBG.c b/lib/Xm/CascadeBG.c
e911fa
index 720cb732..c08c88d3 100644
e911fa
--- a/lib/Xm/CascadeBG.c
e911fa
+++ b/lib/Xm/CascadeBG.c
e911fa
@@ -1394,6 +1394,10 @@ ArmAndActivate(
e911fa
 	  else
e911fa
 	     menuSTrait -> menuBarCleanup((Widget) parent);
e911fa
 
e911fa
+      /* if we are arming and activating doesn't make sense to have the menu bar
e911fa
+       * as posted, so clean the state in case we initiated a drag in the last
e911fa
+       * mouse click event */
e911fa
+      CBG_SetWasPosted(cb, FALSE);
e911fa
 	  /* do the select without calling the cascading callbacks again */
e911fa
 	  Select (cb, event, FALSE);
e911fa
 
e911fa
-- 
e911fa
2.14.3
e911fa