comparison src/scrollbar-x.c @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 697ef44129c6
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
25 25
26 #include <config.h> 26 #include <config.h>
27 #include "lisp.h" 27 #include "lisp.h"
28 28
29 #include "console-x.h" 29 #include "console-x.h"
30 #include "EmacsFrame.h"
30 #include "glyphs-x.h" 31 #include "glyphs-x.h"
31 #include "gui-x.h" 32 #include "gui-x.h"
32 #include "scrollbar-x.h" 33 #include "scrollbar-x.h"
33 34
34 #include "frame.h" 35 #include "frame.h"
670 XSETWINDOW (window, w); 671 XSETWINDOW (window, w);
671 x_scrollbar_loop (X_SET_SCROLLBAR_POINTER, window, find_window_mirror (w), 672 x_scrollbar_loop (X_SET_SCROLLBAR_POINTER, window, find_window_mirror (w),
672 0, (Window) NULL); 673 0, (Window) NULL);
673 } 674 }
674 675
675 /* Called directly from x_any_window_to_frame in frame-x.c */
676 EMACS_INT
677 x_window_is_scrollbar (struct frame *f, Window win)
678 {
679 if (!FRAME_X_P (f))
680 return 0;
681
682 if (f->mirror_dirty)
683 update_frame_window_mirror (f);
684 return (EMACS_INT) x_scrollbar_loop (X_WINDOW_IS_SCROLLBAR, f->root_window,
685 f->root_mirror, 0, win);
686 }
687
688 /* Make sure that all scrollbars on frame are up-to-date. Called 676 /* Make sure that all scrollbars on frame are up-to-date. Called
689 directly from x_set_frame_properties in frame-x.c*/ 677 directly from x_set_frame_properties in frame-x.c*/
690 void 678 void
691 x_update_frame_scrollbars (struct frame *f) 679 x_update_frame_scrollbars (struct frame *f)
692 { 680 {
743 CONSOLE_HAS_METHOD (x, compute_scrollbar_instance_usage); 731 CONSOLE_HAS_METHOD (x, compute_scrollbar_instance_usage);
744 #endif /* MEMORY_USAGE_STATS */ 732 #endif /* MEMORY_USAGE_STATS */
745 } 733 }
746 734
747 void 735 void
736 reinit_vars_of_scrollbar_x (void)
737 {
738 stupid_vertical_scrollbar_drag_hack = 1;
739 }
740
741 void
748 vars_of_scrollbar_x (void) 742 vars_of_scrollbar_x (void)
749 { 743 {
744 reinit_vars_of_scrollbar_x ();
745
750 #if defined (LWLIB_SCROLLBARS_LUCID) 746 #if defined (LWLIB_SCROLLBARS_LUCID)
751 Fprovide (intern ("lucid-scrollbars")); 747 Fprovide (intern ("lucid-scrollbars"));
752 #elif defined (LWLIB_SCROLLBARS_MOTIF) 748 #elif defined (LWLIB_SCROLLBARS_MOTIF)
753 Fprovide (intern ("motif-scrollbars")); 749 Fprovide (intern ("motif-scrollbars"));
754 #elif defined (LWLIB_SCROLLBARS_ATHENA) 750 #elif defined (LWLIB_SCROLLBARS_ATHENA)
755 Fprovide (intern ("athena-scrollbars")); 751 Fprovide (intern ("athena-scrollbars"));
756 #endif 752 #endif
757 stupid_vertical_scrollbar_drag_hack = 1; 753 }
758 }