Commit 10c48c95 authored by Richard M. Stallman's avatar Richard M. Stallman

(xmenu_show): Do BLOCK_INPUT; unblock just before returning.

parent 63e1efd4
...@@ -321,11 +321,13 @@ xmenu_show (parent, startx, starty, line_list, enable_list, pane_list, ...@@ -321,11 +321,13 @@ xmenu_show (parent, startx, starty, line_list, enable_list, pane_list,
if (pane_cnt == 0) if (pane_cnt == 0)
return 0; return 0;
BLOCK_INPUT;
*error = (char *) 0; /* Initialize error pointer to null */ *error = (char *) 0; /* Initialize error pointer to null */
GXMenu = XMenuCreate (XDISPLAY parent, "emacs"); GXMenu = XMenuCreate (XDISPLAY parent, "emacs");
if (GXMenu == NUL) if (GXMenu == NUL)
{ {
*error = "Can't create menu"; *error = "Can't create menu";
UNBLOCK_INPUT;
return (0); return (0);
} }
...@@ -345,6 +347,7 @@ xmenu_show (parent, startx, starty, line_list, enable_list, pane_list, ...@@ -345,6 +347,7 @@ xmenu_show (parent, startx, starty, line_list, enable_list, pane_list,
{ {
XMenuDestroy (XDISPLAY GXMenu); XMenuDestroy (XDISPLAY GXMenu);
*error = "Can't create pane"; *error = "Can't create pane";
UNBLOCK_INPUT;
return (0); return (0);
} }
for (selidx = 0; selidx < line_cnt[panes]; selidx++) for (selidx = 0; selidx < line_cnt[panes]; selidx++)
...@@ -361,6 +364,7 @@ xmenu_show (parent, startx, starty, line_list, enable_list, pane_list, ...@@ -361,6 +364,7 @@ xmenu_show (parent, startx, starty, line_list, enable_list, pane_list,
/* free (datap); */ /* free (datap); */
*error = "Can't add selection to menu"; *error = "Can't add selection to menu";
/* error ("Can't add selection to menu"); */ /* error ("Can't add selection to menu"); */
UNBLOCK_INPUT;
return (0); return (0);
} }
} }
...@@ -412,6 +416,7 @@ xmenu_show (parent, startx, starty, line_list, enable_list, pane_list, ...@@ -412,6 +416,7 @@ xmenu_show (parent, startx, starty, line_list, enable_list, pane_list,
break; break;
} }
XMenuDestroy (XDISPLAY GXMenu); XMenuDestroy (XDISPLAY GXMenu);
UNBLOCK_INPUT;
/* free (datap_save);*/ /* free (datap_save);*/
return (entry); return (entry);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment