summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvik/gui/Panner.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-04-08 06:34:46 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-04-08 06:34:46 +0000
commit7e0f3484d8cd6eca4abe80d057391d14face5606 (patch)
tree92570fc98a476ecbf696c2ef16d046412d405995 /Build/source/texk/xdvik/gui/Panner.c
parent824f7b0903de8ad7f6ee3d7656005e4c59155e06 (diff)
xdvik 22.86
git-svn-id: svn://tug.org/texlive/trunk@29732 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvik/gui/Panner.c')
-rw-r--r--Build/source/texk/xdvik/gui/Panner.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/Build/source/texk/xdvik/gui/Panner.c b/Build/source/texk/xdvik/gui/Panner.c
index 9acca69ac14..8a8577a617d 100644
--- a/Build/source/texk/xdvik/gui/Panner.c
+++ b/Build/source/texk/xdvik/gui/Panner.c
@@ -48,6 +48,14 @@
extern Bool XmuDistinguishablePixels(); /* not defined in any Xmu headers */
+#if HAVE_XKB_BELL_EXT
+# include <X11/XKBlib.h>
+# define panBell(display, window, percent) \
+ XkbBell(display, window, percent, (Atom) None)
+#else
+# define panBell(display, window, percent) XBell(display, percent)
+#endif
+
/*
======================================================================
begin copy from Simple.c
@@ -1020,7 +1028,7 @@ static void ActionStart (Widget gw, XEvent *event, String *params, Cardinal *num
UNUSED(num_params);
if (!get_event_xy (pw, event, &x, &y)) {
- XBell (XtDisplay(gw), 0); /* should do error message */
+ panBell(XtDisplay(gw), XtWindow(gw), 0); /* should do error message */
return;
}
@@ -1085,7 +1093,7 @@ static void ActionMove (Widget gw, XEvent *event, String *params, Cardinal *num_
if (!pw->panner.tmp.doing) return;
if (!get_event_xy (pw, event, &x, &y)) {
- XBell (XtDisplay(gw), 0); /* should do error message */
+ panBell(XtDisplay(gw), XtWindow(gw), 0); /* should do error message */
return;
}
@@ -1116,7 +1124,7 @@ static void ActionPage (Widget gw, XEvent *event, String *params, Cardinal *num_
UNUSED(num_params);
if (*num_params != 2) {
- XBell (XtDisplay(gw), 0);
+ panBell (XtDisplay(gw), XtWindow(gw), 0);
return;
}
@@ -1205,7 +1213,7 @@ static void ActionSet (Widget gw, XEvent *event, String *params, Cardinal *num_p
if (*num_params < 2 ||
XmuCompareISOLatin1 (params[0], "rubberband") != 0) {
- XBell (XtDisplay(gw), 0);
+ panBell (XtDisplay(gw), XtWindow(gw), 0);
return;
}
@@ -1216,7 +1224,7 @@ static void ActionSet (Widget gw, XEvent *event, String *params, Cardinal *num_p
} else if (XmuCompareISOLatin1 (params[1], "toggle") == 0) {
rb = !pw->panner.rubber_band;
} else {
- XBell (XtDisplay(gw), 0);
+ panBell (XtDisplay(gw), XtWindow(gw), 0);
return;
}