aboutsummaryrefslogtreecommitdiffstats
path: root/lwlib
diff options
context:
space:
mode:
authorJan Djärv <[email protected]>2006-05-23 07:19:45 +0000
committerJan Djärv <[email protected]>2006-05-23 07:19:45 +0000
commit1f5df1f78300c861f579886268bc97293857d3fa (patch)
tree757e29946eb83a197a42b13a8dfd5df112a9d8e7 /lwlib
parent0277e36c147f47e12aedbc945760324b8e3bb015 (diff)
* xlwmenu.c: Include xterm.h if emacs instead of declaring functions
used. (string_width): Declare as static. (Start, pop_up_menu): Set is_hint to 0 before calling handle_motion_event. (pop_up_menu): Return value and parameters for x_catch_errors and x_uncatch_errors changed.
Diffstat (limited to 'lwlib')
-rw-r--r--lwlib/ChangeLog10
-rw-r--r--lwlib/xlwmenu.c26
2 files changed, 17 insertions, 19 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index 0bd79a323c..0a8480b772 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,13 @@
+2006-05-23 Jan Dj,Ad(Brv <[email protected]>
+
+ * xlwmenu.c: Include xterm.h if emacs instead of declaring functions
+ used.
+ (string_width): Declare as static.
+ (Start, pop_up_menu): Set is_hint to 0 before calling
+ handle_motion_event.
+ (pop_up_menu): Return value and parameters for x_catch_errors and
+ x_uncatch_errors changed.
+
2005-09-27 Dan Nicolaescu <[email protected]>
* xlwmenu.c (find_next_selectable):
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 0a5d82c467..77cc50e9d7 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -53,21 +53,8 @@ extern int gray_bitmap_width;
extern int gray_bitmap_height;
extern char *gray_bitmap_bits;
-/* Defined in xterm.c. */
-extern int x_alloc_nearest_color_for_widget __P ((Widget, Colormap, XColor*));
-extern int x_alloc_lighter_color_for_widget __P ((Widget, Display*, Colormap,
- unsigned long *,
- double, int));
-extern int x_catch_errors __P ((Display*));
-extern void x_uncatch_errors P_ ((Display *, int));
-extern int x_had_errors_p __P ((Display*));
-extern void x_clear_errors __P ((Display*));
-extern unsigned long x_copy_dpy_color __P ((Display *, Colormap,
- unsigned long));
-
-/* Defined in xfaces.c. */
-extern void x_free_dpy_colors __P ((Display *, Screen *, Colormap,
- unsigned long *pixels, int npixels));
+#include "xterm.h"
+
#else /* not emacs */
#include <X11/bitmaps/gray>
@@ -352,7 +339,7 @@ make_old_stack_space (mw, n)
}
/* Size code */
-int
+static int
string_width (mw, s)
XlwMenuWidget mw;
char *s;
@@ -2088,6 +2075,7 @@ Start (w, ev, params, num_params)
mw->menu.windows [0].y = ev->xmotion.y_root - ev->xmotion.y;
/* handles the down like a move, slots are compatible */
+ ev->xmotion.is_hint = 0;
handle_motion_event (mw, &ev->xmotion);
}
}
@@ -2425,7 +2413,6 @@ pop_up_menu (mw, event)
int borderwidth = mw->menu.shadow_thickness;
Screen* screen = XtScreen (mw);
Display *display = XtDisplay (mw);
- int count;
next_release_must_exit = 0;
@@ -2472,7 +2459,7 @@ pop_up_menu (mw, event)
}
#ifdef emacs
- count = x_catch_errors (display);
+ x_catch_errors (display);
#endif
if (XtGrabPointer ((Widget)mw, False,
(PointerMotionMask
@@ -2500,9 +2487,10 @@ pop_up_menu (mw, event)
pointer_grabbed = 0;
XtUngrabPointer ((Widget)mw, event->time);
}
- x_uncatch_errors (display, count);
+ x_uncatch_errors ();
#endif
+ ((XMotionEvent*)event)->is_hint = 0;
handle_motion_event (mw, (XMotionEvent*)event);
}