Blame SOURCES/motifzone_1665.patch

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