Mercurial > hg > xemacs-beta
diff src/scrollbar-x.c @ 82:6a378aca36af r20-0b91
Import from CVS: tag r20-0b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:07:36 +0200 |
parents | 131b0175ea99 |
children | ac0620f6398e |
line wrap: on
line diff
--- a/src/scrollbar-x.c Mon Aug 13 09:06:45 2007 +0200 +++ b/src/scrollbar-x.c Mon Aug 13 09:07:36 2007 +0200 @@ -46,7 +46,9 @@ scrollbar is incredibly stupid about updating the thumb and causes lots of flicker if it is done too often. */ static int inhibit_thumb_size_change; +int stupid_vertical_scrollbar_drag_hack = 1; +/* Doesn't work with athena */ #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) static int vertical_drag_in_progress; #endif @@ -56,6 +58,7 @@ static int x_inhibit_scrollbar_thumb_size_change (void) { + /* Doeesn't work with Athena */ #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) return inhibit_thumb_size_change; #else @@ -103,7 +106,8 @@ SCROLLBAR_X_ID (instance) = new_lwlib_id (); sprintf (buffer, "scrollbar_%d", SCROLLBAR_X_ID (instance)); SCROLLBAR_X_NAME (instance) = xstrdup (buffer); -#if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) +#if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \ + defined (LWLIB_SCROLLBARS_ATHENA3D) SCROLLBAR_X_VDRAG_ORIG_VALUE (instance) = -1; #endif @@ -157,6 +161,7 @@ UPDATE_DATA_FIELD (scrollbar_x); UPDATE_DATA_FIELD (scrollbar_y); + /* This doesn't work with Athena, why? */ #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) if (w && !vertical_drag_in_progress) { @@ -532,7 +537,8 @@ Depending on where you click the size of the page varies. Motif always does a standard Emacs page. */ case SCROLLBAR_PAGE_UP: -#if !defined (LWLIB_SCROLLBARS_MOTIF) && !defined (LWLIB_SCROLLBARS_LUCID) +#if !defined (LWLIB_SCROLLBARS_MOTIF) && !defined (LWLIB_SCROLLBARS_LUCID) && \ + !defined (LWLIB_SCROLLBARS_ATHENA3D) { double tmp = ((double) data->slider_value / (double) SCROLLBAR_X_POS_DATA(instance).scrollbar_height); @@ -551,7 +557,8 @@ break; case SCROLLBAR_PAGE_DOWN: -#if !defined (LWLIB_SCROLLBARS_MOTIF) && !defined (LWLIB_SCROLLBARS_LUCID) +#if !defined (LWLIB_SCROLLBARS_MOTIF) && !defined (LWLIB_SCROLLBARS_LUCID) && \ + !defined (LWLIB_SCROLLBARS_ATHENA3D) { double tmp = ((double) data->slider_value / (double) SCROLLBAR_X_POS_DATA(instance).scrollbar_height); @@ -591,6 +598,7 @@ SCROLLBAR_X_VDRAG_ORIG_WINDOW_START (instance) = XINT (Fwindow_start (win)); #endif + stupid_vertical_scrollbar_drag_hack = 0; break; case SCROLLBAR_DRAG: @@ -667,6 +675,7 @@ } } #else + stupid_vertical_scrollbar_drag_hack = 0; value = data->slider_value; #endif @@ -738,7 +747,7 @@ inhibit_thumb_size_change = 1; /* #### Fix the damn toolkit code so they all work the same way. Lucid is the one mostly wrong.*/ -#if defined (LWLIB_SCROLLBARS_LUCID) +#if defined (LWLIB_SCROLLBARS_LUCID) || defined (LWLIB_SCROLLBARS_ATHENA3D) signal_special_Xt_user_event (win, Qscrollbar_horizontal_drag, (Fcons (win, make_int (data->slider_value))));