diff options
| author | Jan Djärv | 2006-05-23 07:19:45 +0000 |
|---|---|---|
| committer | Jan Djärv | 2006-05-23 07:19:45 +0000 |
| commit | 1f5df1f78300c861f579886268bc97293857d3fa (patch) | |
| tree | 757e29946eb83a197a42b13a8dfd5df112a9d8e7 | |
| parent | 0277e36c147f47e12aedbc945760324b8e3bb015 (diff) | |
| download | emacs-1f5df1f78300c861f579886268bc97293857d3fa.tar.gz emacs-1f5df1f78300c861f579886268bc97293857d3fa.zip | |
* 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.
| -rw-r--r-- | lwlib/ChangeLog | 10 | ||||
| -rw-r--r-- | lwlib/xlwmenu.c | 26 |
2 files changed, 17 insertions, 19 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 0bd79a323c7..0a8480b7724 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2006-05-23 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xlwmenu.c: Include xterm.h if emacs instead of declaring functions | ||
| 4 | used. | ||
| 5 | (string_width): Declare as static. | ||
| 6 | (Start, pop_up_menu): Set is_hint to 0 before calling | ||
| 7 | handle_motion_event. | ||
| 8 | (pop_up_menu): Return value and parameters for x_catch_errors and | ||
| 9 | x_uncatch_errors changed. | ||
| 10 | |||
| 1 | 2005-09-27 Dan Nicolaescu <dann@ics.uci.edu> | 11 | 2005-09-27 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 12 | ||
| 3 | * xlwmenu.c (find_next_selectable): | 13 | * xlwmenu.c (find_next_selectable): |
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 0a5d82c4671..77cc50e9d7a 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c | |||
| @@ -53,21 +53,8 @@ extern int gray_bitmap_width; | |||
| 53 | extern int gray_bitmap_height; | 53 | extern int gray_bitmap_height; |
| 54 | extern char *gray_bitmap_bits; | 54 | extern char *gray_bitmap_bits; |
| 55 | 55 | ||
| 56 | /* Defined in xterm.c. */ | 56 | #include "xterm.h" |
| 57 | extern int x_alloc_nearest_color_for_widget __P ((Widget, Colormap, XColor*)); | 57 | |
| 58 | extern int x_alloc_lighter_color_for_widget __P ((Widget, Display*, Colormap, | ||
| 59 | unsigned long *, | ||
| 60 | double, int)); | ||
| 61 | extern int x_catch_errors __P ((Display*)); | ||
| 62 | extern void x_uncatch_errors P_ ((Display *, int)); | ||
| 63 | extern int x_had_errors_p __P ((Display*)); | ||
| 64 | extern void x_clear_errors __P ((Display*)); | ||
| 65 | extern unsigned long x_copy_dpy_color __P ((Display *, Colormap, | ||
| 66 | unsigned long)); | ||
| 67 | |||
| 68 | /* Defined in xfaces.c. */ | ||
| 69 | extern void x_free_dpy_colors __P ((Display *, Screen *, Colormap, | ||
| 70 | unsigned long *pixels, int npixels)); | ||
| 71 | #else /* not emacs */ | 58 | #else /* not emacs */ |
| 72 | 59 | ||
| 73 | #include <X11/bitmaps/gray> | 60 | #include <X11/bitmaps/gray> |
| @@ -352,7 +339,7 @@ make_old_stack_space (mw, n) | |||
| 352 | } | 339 | } |
| 353 | 340 | ||
| 354 | /* Size code */ | 341 | /* Size code */ |
| 355 | int | 342 | static int |
| 356 | string_width (mw, s) | 343 | string_width (mw, s) |
| 357 | XlwMenuWidget mw; | 344 | XlwMenuWidget mw; |
| 358 | char *s; | 345 | char *s; |
| @@ -2088,6 +2075,7 @@ Start (w, ev, params, num_params) | |||
| 2088 | mw->menu.windows [0].y = ev->xmotion.y_root - ev->xmotion.y; | 2075 | mw->menu.windows [0].y = ev->xmotion.y_root - ev->xmotion.y; |
| 2089 | 2076 | ||
| 2090 | /* handles the down like a move, slots are compatible */ | 2077 | /* handles the down like a move, slots are compatible */ |
| 2078 | ev->xmotion.is_hint = 0; | ||
| 2091 | handle_motion_event (mw, &ev->xmotion); | 2079 | handle_motion_event (mw, &ev->xmotion); |
| 2092 | } | 2080 | } |
| 2093 | } | 2081 | } |
| @@ -2425,7 +2413,6 @@ pop_up_menu (mw, event) | |||
| 2425 | int borderwidth = mw->menu.shadow_thickness; | 2413 | int borderwidth = mw->menu.shadow_thickness; |
| 2426 | Screen* screen = XtScreen (mw); | 2414 | Screen* screen = XtScreen (mw); |
| 2427 | Display *display = XtDisplay (mw); | 2415 | Display *display = XtDisplay (mw); |
| 2428 | int count; | ||
| 2429 | 2416 | ||
| 2430 | next_release_must_exit = 0; | 2417 | next_release_must_exit = 0; |
| 2431 | 2418 | ||
| @@ -2472,7 +2459,7 @@ pop_up_menu (mw, event) | |||
| 2472 | } | 2459 | } |
| 2473 | 2460 | ||
| 2474 | #ifdef emacs | 2461 | #ifdef emacs |
| 2475 | count = x_catch_errors (display); | 2462 | x_catch_errors (display); |
| 2476 | #endif | 2463 | #endif |
| 2477 | if (XtGrabPointer ((Widget)mw, False, | 2464 | if (XtGrabPointer ((Widget)mw, False, |
| 2478 | (PointerMotionMask | 2465 | (PointerMotionMask |
| @@ -2500,9 +2487,10 @@ pop_up_menu (mw, event) | |||
| 2500 | pointer_grabbed = 0; | 2487 | pointer_grabbed = 0; |
| 2501 | XtUngrabPointer ((Widget)mw, event->time); | 2488 | XtUngrabPointer ((Widget)mw, event->time); |
| 2502 | } | 2489 | } |
| 2503 | x_uncatch_errors (display, count); | 2490 | x_uncatch_errors (); |
| 2504 | #endif | 2491 | #endif |
| 2505 | 2492 | ||
| 2493 | ((XMotionEvent*)event)->is_hint = 0; | ||
| 2506 | handle_motion_event (mw, (XMotionEvent*)event); | 2494 | handle_motion_event (mw, (XMotionEvent*)event); |
| 2507 | } | 2495 | } |
| 2508 | 2496 | ||