summaryrefslogtreecommitdiff
path: root/src/gtkutil.h
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2009-12-13 13:31:35 +0000
committerJan Djärv <jan.h.d@swipnet.se>2009-12-13 13:31:35 +0000
commite5f0bc9ada3729749b83cfa246b39dd0d6fceca0 (patch)
tree4b64bb983b115353fb9b5be07c06cbfa361e3204 /src/gtkutil.h
parent223e5fc656a6c8a95e5aac334e8c7b82cc9d2a4b (diff)
downloademacs-e5f0bc9ada3729749b83cfa246b39dd0d6fceca0.tar.gz
emacs-e5f0bc9ada3729749b83cfa246b39dd0d6fceca0.tar.bz2
emacs-e5f0bc9ada3729749b83cfa246b39dd0d6fceca0.zip
Bug 5177: Scroll bar thumb did not move when scrolling with mouse wheel.
* xterm.c (xg_scroll_callback): Parameter list changed, use parameter GtkScrollType to determine scroll/line/page. Only allow dragging if a button < 4 is grabbed (bug #5177). (xg_end_scroll_callback): New function. (x_create_toolkit_scroll_bar): Pass xg_end_scroll_callback to xg_create_scroll_bar. * gtkutil.c (xg_gtk_scroll_destroy): Remove XG_LAST_SB_DATA handling. (scroll_end_callback): Remove. (xg_create_scroll_bar): Add parameter end_callback, bind it to button-release-event. Replace value-changed event with change-value, bug #5177, (xg_event_is_for_scrollbar): Only return true if button is less than 4, bug #5177. * gtkutil.h (XG_LAST_SB_DATA): Remove. (xg_create_scroll_bar): Add GCallback end_callback.
Diffstat (limited to 'src/gtkutil.h')
-rw-r--r--src/gtkutil.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 6d9f6da2699..f70a60581c2 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -32,12 +32,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define XG_SB_MAX 10000000
#define XG_SB_RANGE (XG_SB_MAX-XG_SB_MIN)
-/* Key for data that is valid for menus in a frame */
+/* Key for data that is valid for menus and scroll bars in a frame */
#define XG_FRAME_DATA "emacs_frame"
-/* Key for data that is the last scrollbar value */
-#define XG_LAST_SB_DATA "emacs_last_sb_value"
-
/* Key for data that menu items hold. */
#define XG_ITEM_DATA "emacs_menuitem"
@@ -164,6 +161,7 @@ extern int xg_get_scroll_id_for_window P_ ((Display *dpy, Window wid));
extern void xg_create_scroll_bar P_ ((FRAME_PTR f,
struct scroll_bar *bar,
GCallback scroll_callback,
+ GCallback end_callback,
char *scroll_bar_name));
extern void xg_show_scroll_bar P_ ((int scrollbar_id));
extern void xg_remove_scroll_bar P_ ((FRAME_PTR f, int scrollbar_id));