aboutsummaryrefslogtreecommitdiff
path: root/libXaw/src/MenuButton.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 14:58:33 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 14:58:33 +0200
commit5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 (patch)
treec10939819ba1167cdc905a0c105c7ae4091abbc3 /libXaw/src/MenuButton.c
parent67326634496ef21b4acbf4cef2f05040d34aef9b (diff)
downloadvcxsrv-5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6.tar.gz
vcxsrv-5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6.tar.bz2
vcxsrv-5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6.zip
Updated following packages:
bigreqsproto-1.1.2 fontsproto-2.1.2 recordproto-1.14.2 scrnsaverproto-1.2.2 xcmiscproto-1.2.2 libXt-1.1.3 xhost-1.0.5 kbproto-1.0.6 libXrender-0.9.7 libxkbfile-1.0.8 freetype-2.4.9 libXaw-1.0.10 libXpm-3.5.10 xproto-7.0.23
Diffstat (limited to 'libXaw/src/MenuButton.c')
-rw-r--r--libXaw/src/MenuButton.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/libXaw/src/MenuButton.c b/libXaw/src/MenuButton.c
index 2732a72b3..e1908512d 100644
--- a/libXaw/src/MenuButton.c
+++ b/libXaw/src/MenuButton.c
@@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group.
* Date: May 2, 1989
*
* By: Chris D. Peterson
- * MIT X Consortium
+ * MIT X Consortium
* kit@expo.lcs.mit.edu
*/
@@ -42,7 +42,6 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
-#include <X11/Xmu/SysUtil.h>
#include <X11/Xaw/MenuButtoP.h>
#include <X11/Xaw/XawInit.h>
#include "Private.h"
@@ -65,7 +64,7 @@ static void PopupMenu(Widget, XEvent*, String*, Cardinal*);
*/
#define superclass ((CommandWidgetClass)&commandClassRec)
-static char defaultTranslations[] =
+static char defaultTranslations[] =
"<Enter>:" "highlight()\n"
"<Leave>:" "reset()\n"
"Any<BtnDown>:" "reset() PopupMenu()\n";
@@ -96,7 +95,7 @@ MenuButtonClassRec menuButtonClassRec = {
{
(WidgetClass)superclass, /* superclass */
"MenuButton", /* class_name */
- sizeof(MenuButtonRec), /* size */
+ sizeof(MenuButtonRec), /* size */
XawMenuButtonClassInitialize, /* class_initialize */
NULL, /* class_part_initialize */
False, /* class_inited */
@@ -122,14 +121,14 @@ MenuButtonClassRec menuButtonClassRec = {
NULL, /* accept_focus */
XtVersion, /* version */
NULL, /* callback_private */
- defaultTranslations, /* tm_table */
+ defaultTranslations, /* tm_table */
XtInheritQueryGeometry, /* query_geometry */
XtInheritDisplayAccelerator, /* display_accelerator */
NULL, /* extension */
},
/* simple */
{
- XtInheritChangeSensitive /* change_sensitive */
+ XtInheritChangeSensitive /* change_sensitive */
},
/* label */
{
@@ -212,7 +211,7 @@ PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params)
temp = w;
while(temp != NULL) {
menu = XtNameToWidget(temp, mbw->menu_button.menu_name);
- if (menu == NULL)
+ if (menu == NULL)
temp = XtParent(temp);
else
break;
@@ -221,16 +220,16 @@ PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params)
if (menu == NULL) {
char error_buf[BUFSIZ];
- (void)XmuSnprintf(error_buf, sizeof(error_buf),
- "MenuButton: Could not find menu widget named %s.",
- mbw->menu_button.menu_name);
+ snprintf(error_buf, sizeof(error_buf),
+ "MenuButton: Could not find menu widget named %s.",
+ mbw->menu_button.menu_name);
XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
return;
}
if (!XtIsRealized(menu))
XtRealizeWidget(menu);
-
+
menu_width = XtWidth(menu) + (XtBorderWidth(menu) << 1);
button_height = XtHeight(w) + (XtBorderWidth(w) << 1);
menu_height = XtHeight(menu) + (XtBorderWidth(menu) << 1);
@@ -260,7 +259,7 @@ PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params)
if (menu_x + menu_width > scr_width)
menu_x = scr_width - menu_width;
}
- if (menu_x < 0)
+ if (menu_x < 0)
menu_x = 0;
num_args = 0;