1 /* $XConsortium: FocusAct.c /main/5 1995/07/15 20:50:59 drk $ */
2 /*
3  * Motif
4  *
5  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
6  *
7  * These libraries and programs are free software; you can
8  * redistribute them and/or modify them under the terms of the GNU
9  * Lesser General Public License as published by the Free Software
10  * Foundation; either version 2 of the License, or (at your option)
11  * any later version.
12  *
13  * These libraries and programs are distributed in the hope that
14  * they will be useful, but WITHOUT ANY WARRANTY; without even the
15  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16  * PURPOSE. See the GNU Lesser General Public License for more
17  * details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with these librararies and programs; if not, write
21  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
22  * Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 /*
26  * HISTORY
27  */
28 
29 #ifdef HAVE_CONFIG_H
30 #include <config.h>
31 #endif
32 
33 
34 #include "XmI.h"
35 #include "PrimitiveI.h"
36 #include "UniqueEvnI.h"
37 
38 /**********************************************************************
39  *
40  * _XmMenuButtonTakeFocus
41  *
42  *********************************************************************/
43 /*ARGSUSED*/
44 void
_XmMenuButtonTakeFocus(Widget wid,XEvent * event,String * params,Cardinal * num_params)45 _XmMenuButtonTakeFocus(
46         Widget wid,
47         XEvent *event,
48         String *params,		/* unused */
49         Cardinal *num_params )	/* unused */
50 {
51    /* Support menu replay, free server input queue until next button event */
52    XAllowEvents(XtDisplay(wid), SyncPointer, CurrentTime);
53 
54    XmProcessTraversal(wid, XmTRAVERSE_CURRENT);
55 
56    _XmRecordEvent (event);
57 }
58 
59 /**********************************************************************
60  *
61  * _XmMenuButtonTakeFocusUp
62  *
63  *********************************************************************/
64 /*ARGSUSED*/
65 void
_XmMenuButtonTakeFocusUp(Widget wid,XEvent * event,String * params,Cardinal * num_params)66 _XmMenuButtonTakeFocusUp(
67         Widget wid,
68         XEvent *event,
69         String *params,		/* unused */
70         Cardinal *num_params )	/* unused */
71 {
72    /* Support menu replay, free server input queue until next button event */
73    XAllowEvents(XtDisplay(wid), SyncPointer, CurrentTime);
74    _XmRecordEvent (event);
75 }
76 
77 
78 
79