rpms/emacs/devel emacs-23.1-scroll.patch, NONE, 1.1 emacs.spec, 1.144, 1.145
Daniel Novotny
dnovotny at fedoraproject.org
Wed Dec 2 16:50:21 UTC 2009
- Previous message (by thread): rpms/earth-and-moon-backgrounds/F-11 .cvsignore, 1.2, 1.3 earth-and-moon-backgrounds.spec, 1.1, 1.2 sources, 1.2, 1.3
- Next message (by thread): rpms/emacs/F-12 emacs-23.1-scroll.patch, NONE, 1.1 emacs.spec, 1.142, 1.143
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dnovotny
Update of /cvs/extras/rpms/emacs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23700
Modified Files:
emacs.spec
Added Files:
emacs-23.1-scroll.patch
Log Message:
- fix #543046 - Using scroll bar in emacs highlights/selects text
emacs-23.1-scroll.patch:
gtkutil.c | 32 ++++++++++++++++++++++++++++++++
gtkutil.h | 2 ++
xterm.c | 11 +++++++++++
3 files changed, 45 insertions(+)
--- NEW FILE emacs-23.1-scroll.patch ---
diff -up emacs-23.1/src/gtkutil.c.scroll emacs-23.1/src/gtkutil.c
--- emacs-23.1/src/gtkutil.c.scroll 2009-06-21 06:38:15.000000000 +0200
+++ emacs-23.1/src/gtkutil.c 2009-12-02 17:10:08.000000000 +0100
@@ -3401,6 +3401,38 @@ xg_set_toolkit_scroll_bar_thumb (bar, po
}
}
+/* Return non-zero if EVENT is for a scroll bar in frame F.
+ When the same X window is used for several Gtk+ widgets, we cannot
+ say for sure based on the X window alone if an event is for the
+ frame. This function does additional checks.
+
+ Return non-zero if the event is for a scroll bar, zero otherwise. */
+
+int
+xg_event_is_for_scrollbar (f, event)
+ FRAME_PTR f;
+ XEvent *event;
+{
+ int retval = 0;
+
+ if (f && event->type == ButtonPress)
+ {
+ /* Check if press occurred outside the edit widget. */
+ GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
+ retval = gdk_display_get_window_at_pointer (gdpy, NULL, NULL)
+ != f->output_data.x->edit_widget->window;
+ }
+ else if (f && (event->type != ButtonRelease || event->type != MotionNotify))
+ {
+ /* If we are releasing or moving the scroll bar, it has the grab. */
+ retval = gtk_grab_get_current () != 0
+ && gtk_grab_get_current () != f->output_data.x->edit_widget;
+ }
+
+ return retval;
+}
+
+
/***********************************************************************
Tool bar functions
diff -up emacs-23.1/src/gtkutil.h.scroll emacs-23.1/src/gtkutil.h
--- emacs-23.1/src/gtkutil.h.scroll 2009-06-21 06:38:15.000000000 +0200
+++ emacs-23.1/src/gtkutil.h 2009-12-02 17:10:08.000000000 +0100
@@ -180,6 +180,8 @@ extern void xg_set_toolkit_scroll_bar_th
int position,
int whole));
+extern int xg_event_is_for_scrollbar P_ ((FRAME_PTR f, XEvent *event));
+
extern void update_frame_tool_bar P_ ((FRAME_PTR f));
extern void free_frame_tool_bar P_ ((FRAME_PTR f));
diff -up emacs-23.1/src/xterm.c.scroll emacs-23.1/src/xterm.c
--- emacs-23.1/src/xterm.c.scroll 2009-06-21 06:38:20.000000000 +0200
+++ emacs-23.1/src/xterm.c 2009-12-02 17:13:24.000000000 +0100
@@ -6743,6 +6743,12 @@ handle_one_xevent (dpyinfo, eventp, fini
clear_mouse_face (dpyinfo);
}
+
+#ifdef USE_GTK
+ if (f && xg_event_is_for_scrollbar (f, &event))
+ f = 0;
+#endif
+
if (f)
{
@@ -6899,6 +6905,11 @@ handle_one_xevent (dpyinfo, eventp, fini
else
f = x_window_to_frame (dpyinfo, event.xbutton.window);
+#ifdef USE_GTK
+ if (f && xg_event_is_for_scrollbar (f, &event))
+ f = 0;
+#endif
+
if (f)
{
/* Is this in the tool-bar? */
Index: emacs.spec
===================================================================
RCS file: /cvs/extras/rpms/emacs/devel/emacs.spec,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -p -r1.144 -r1.145
--- emacs.spec 30 Nov 2009 13:04:42 -0000 1.144
+++ emacs.spec 2 Dec 2009 16:50:20 -0000 1.145
@@ -4,7 +4,7 @@ Summary: GNU Emacs text editor
Name: emacs
Epoch: 1
Version: 23.1
-Release: 14%{?dist}
+Release: 15%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors
@@ -29,6 +29,7 @@ Patch3: rpm-spec-mode-utc.patch
Patch4: emacs-gtk.patch
Patch5: emacs-23.1-xdg.patch
Patch6: emacs-23.1-cpp.patch
+Patch7: emacs-23.1-scroll.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: atk-devel, cairo-devel, desktop-file-utils, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel
@@ -124,6 +125,7 @@ Emacs packages or see some elisp example
%patch4 -p1 -b .gtk
%patch5 -p1 -b .xdg
%patch6 -p1
+%patch7 -p1 -b .scroll
# install rest of site-lisp files
( cd site-lisp
@@ -395,6 +397,9 @@ alternatives --install %{_bindir}/etags
%dir %{_datadir}/emacs/%{version}
%changelog
+* Wed Dec 02 2009 Daniel Novotny <dnovotny at redhat.com> 1:23.1-15
+- fix #543046 - Using scroll bar in emacs highlights/selects text
+
* Mon Nov 30 2009 Daniel Novotny <dnovotny at redhat.com> 1:23.1-14
- fixed FTBFS in F12 and higher (#540921)
- Previous message (by thread): rpms/earth-and-moon-backgrounds/F-11 .cvsignore, 1.2, 1.3 earth-and-moon-backgrounds.spec, 1.1, 1.2 sources, 1.2, 1.3
- Next message (by thread): rpms/emacs/F-12 emacs-23.1-scroll.patch, NONE, 1.1 emacs.spec, 1.142, 1.143
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list