[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xterm.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/xterm.c |
Date: |
Fri, 28 Mar 2003 09:20:10 -0500 |
Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.785 emacs/src/xterm.c:1.786
*** emacs/src/xterm.c:1.785 Sat Mar 22 19:59:23 2003
--- emacs/src/xterm.c Fri Mar 28 09:20:09 2003
***************
*** 351,357 ****
static void x_update_begin P_ ((struct frame *));
static void x_update_window_begin P_ ((struct window *));
static void x_after_update_window_line P_ ((struct glyph_row *));
- static INLINE void take_vertical_position_into_account P_ ((struct it *));
static struct scroll_bar *x_window_to_scroll_bar P_ ((Window));
static void x_scroll_bar_report_motion P_ ((struct frame **, Lisp_Object *,
enum scroll_bar_part *,
--- 351,356 ----
***************
*** 3950,3955 ****
--- 3949,3955 ----
static Boolean xaw3d_pick_top;
+ extern void set_vertical_scroll_bar P_ ((struct window *));
/* Action hook installed via XtAppAddActionHook when toolkit scroll
bars are used.. The hook is responsible for detecting when
***************
*** 3986,3991 ****
--- 3986,3996 ----
x_send_scroll_bar_event (window_being_scrolled,
scroll_bar_end_scroll, 0, 0);
w = XWINDOW (window_being_scrolled);
+
+ if (!NILP (XSCROLL_BAR (w->vertical_scroll_bar)->dragging))
+ /* The thumb size is incorrect while dragging: fix it. */
+ set_vertical_scroll_bar (w);
+
XSCROLL_BAR (w->vertical_scroll_bar)->dragging = Qnil;
window_being_scrolled = Qnil;
last_scroll_bar_part = -1;
***************
*** 4105,4113 ****
/* Minimum and maximum values used for Motif scroll bars. */
- #define XM_SB_MIN 1
#define XM_SB_MAX 10000000
- #define XM_SB_RANGE (XM_SB_MAX - XM_SB_MIN)
/* Scroll bar callback for Motif scroll bars. WIDGET is the scroll
--- 4110,4116 ----
***************
*** 4158,4173 ****
case XmCR_DRAG:
{
int slider_size;
- int dragging_down_p = (INTEGERP (bar->dragging)
- && XINT (bar->dragging) <= cs->value);
/* Get the slider size. */
BLOCK_INPUT;
XtVaGetValues (widget, XmNsliderSize, &slider_size, NULL);
UNBLOCK_INPUT;
! whole = XM_SB_RANGE - slider_size;
! portion = min (cs->value - XM_SB_MIN, whole);
part = scroll_bar_handle;
bar->dragging = make_number (cs->value);
}
--- 4161,4174 ----
case XmCR_DRAG:
{
int slider_size;
/* Get the slider size. */
BLOCK_INPUT;
XtVaGetValues (widget, XmNsliderSize, &slider_size, NULL);
UNBLOCK_INPUT;
! whole = XM_SB_MAX;
! portion = min (cs->value, whole);
part = scroll_bar_handle;
bar->dragging = make_number (cs->value);
}
***************
*** 4382,4388 ****
#ifdef USE_MOTIF
/* Set resources. Create the widget. */
XtSetArg (av[ac], XtNmappedWhenManaged, False); ++ac;
! XtSetArg (av[ac], XmNminimum, XM_SB_MIN); ++ac;
XtSetArg (av[ac], XmNmaximum, XM_SB_MAX); ++ac;
XtSetArg (av[ac], XmNorientation, XmVERTICAL); ++ac;
XtSetArg (av[ac], XmNprocessingDirection, XmMAX_ON_BOTTOM), ++ac;
--- 4383,4389 ----
#ifdef USE_MOTIF
/* Set resources. Create the widget. */
XtSetArg (av[ac], XtNmappedWhenManaged, False); ++ac;
! XtSetArg (av[ac], XmNminimum, 0); ++ac;
XtSetArg (av[ac], XmNmaximum, XM_SB_MAX); ++ac;
XtSetArg (av[ac], XmNorientation, XmVERTICAL); ++ac;
XtSetArg (av[ac], XmNprocessingDirection, XmMAX_ON_BOTTOM), ++ac;
***************
*** 4607,4620 ****
/* Slider size. Must be in the range [1 .. MAX - MIN] where MAX
is the scroll bar's maximum and MIN is the scroll bar's minimum
value. */
! size = shown * XM_SB_RANGE;
! size = min (size, XM_SB_RANGE);
size = max (size, 1);
/* Position. Must be in the range [MIN .. MAX - SLIDER_SIZE]. */
! value = top * XM_SB_RANGE;
value = min (value, XM_SB_MAX - size);
- value = max (value, XM_SB_MIN);
XmScrollBarSetValues (widget, value, size, 0, 0, False);
}
--- 4608,4620 ----
/* Slider size. Must be in the range [1 .. MAX - MIN] where MAX
is the scroll bar's maximum and MIN is the scroll bar's minimum
value. */
! size = shown * XM_SB_MAX;
! size = min (size, XM_SB_MAX);
size = max (size, 1);
/* Position. Must be in the range [MIN .. MAX - SLIDER_SIZE]. */
! value = top * XM_SB_MAX;
value = min (value, XM_SB_MAX - size);
XmScrollBarSetValues (widget, value, size, 0, 0, False);
}
***************
*** 5240,5245 ****
--- 5240,5246 ----
}
+ #ifndef USE_TOOLKIT_SCROLL_BARS
/* Handle an Expose or GraphicsExpose event on a scroll bar. This
is a no-op when using toolkit scroll bars.
***************
*** 5251,5258 ****
struct scroll_bar *bar;
XEvent *event;
{
- #ifndef USE_TOOLKIT_SCROLL_BARS
-
Window w = SCROLL_BAR_X_WINDOW (bar);
FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
GC gc = f->output_data.x->normal_gc;
--- 5252,5257 ----
***************
*** 5272,5279 ****
UNBLOCK_INPUT;
- #endif /* not USE_TOOLKIT_SCROLL_BARS */
}
/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind
is set to something other than NO_EVENT, it is enqueued.
--- 5271,5278 ----
UNBLOCK_INPUT;
}
+ #endif /* not USE_TOOLKIT_SCROLL_BARS */
/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind
is set to something other than NO_EVENT, it is enqueued.
***************
*** 7043,7049 ****
int expected;
{
int count = 0;
- int nbytes = 0;
XEvent event;
int event_found = 0;
struct x_display_info *dpyinfo;
--- 7042,7047 ----
***************
*** 8859,8870 ****
#ifdef USE_GTK
if (FRAME_GTK_OUTER_WIDGET (f))
! {
! gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f));
! goto out;
! }
#endif
!
#ifdef HAVE_X11R4
if (! XWithdrawWindow (FRAME_X_DISPLAY (f), window,
--- 8857,8866 ----
#ifdef USE_GTK
if (FRAME_GTK_OUTER_WIDGET (f))
! gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f));
! else
#endif
! {
#ifdef HAVE_X11R4
if (! XWithdrawWindow (FRAME_X_DISPLAY (f), window,
***************
*** 8898,8905 ****
/* Unmap the window ourselves. Cheeky! */
XUnmapWindow (FRAME_X_DISPLAY (f), window);
#endif /* ! defined (HAVE_X11R4) */
- out:
/* We can't distinguish this from iconification
just by the event that we get from the server.
So we can't win using the usual strategy of letting
--- 8894,8901 ----
/* Unmap the window ourselves. Cheeky! */
XUnmapWindow (FRAME_X_DISPLAY (f), window);
#endif /* ! defined (HAVE_X11R4) */
+ }
/* We can't distinguish this from iconification
just by the event that we get from the server.
So we can't win using the usual strategy of letting
- [Emacs-diffs] Changes to emacs/src/xterm.c, (continued)
- [Emacs-diffs] Changes to emacs/src/xterm.c, Jan Djärv, 2003/03/09
- [Emacs-diffs] Changes to emacs/src/xterm.c, Kim F. Storm, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/xterm.c, Andreas Schwab, 2003/03/12
- [Emacs-diffs] Changes to emacs/src/xterm.c, Jan Djärv, 2003/03/14
- [Emacs-diffs] Changes to emacs/src/xterm.c, Kim F. Storm, 2003/03/16
- [Emacs-diffs] Changes to emacs/src/xterm.c, Jan Djärv, 2003/03/17
- [Emacs-diffs] Changes to emacs/src/xterm.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xterm.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xterm.c, Kim F. Storm, 2003/03/21
- [Emacs-diffs] Changes to emacs/src/xterm.c, Jan Djärv, 2003/03/22
- [Emacs-diffs] Changes to emacs/src/xterm.c,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/src/xterm.c, Stefan Monnier, 2003/03/28
- [Emacs-diffs] Changes to emacs/src/xterm.c, Stefan Monnier, 2003/03/28
- [Emacs-diffs] Changes to emacs/src/xterm.c, Kim F. Storm, 2003/03/31