diff --git a/emacs-24.1-xevent.patch b/emacs-24.1-xevent.patch new file mode 100644 index 0000000..59ee231 --- /dev/null +++ b/emacs-24.1-xevent.patch @@ -0,0 +1,43 @@ +--- src/xmenu.c ++++ src/xmenu.c 2012-07-03 11:51:37.448009822 +0000 +@@ -964,7 +964,7 @@ set_frame_menubar (FRAME_PTR f, int firs + { + deep_p = 1; + f->output_data.x->saved_menu_event = (XEvent*)xmalloc (sizeof (XEvent)); +- f->output_data.x->saved_menu_event->type = 0; ++ memset(f->output_data.x->saved_menu_event,0,sizeof(XEvent)); + } + + #ifdef USE_GTK +--- src/xselect.c ++++ src/xselect.c 2012-07-03 11:08:10.732010284 +0000 +@@ -2344,7 +2344,14 @@ x_fill_property_data (Display *dpy, Lisp + Lisp_Object o = XCAR (iter); + + if (INTEGERP (o) || FLOATP (o) || CONSP (o)) +- val = cons_to_signed (o, LONG_MIN, LONG_MAX); ++ { ++ if (INTEGERP (o) && (XFASTINT (o) > LONG_MAX || XFASTINT (o) < LONG_MIN)) ++ val = (long) XFASTINT (o); ++ else if (FLOATP (o) && (XFLOAT_DATA (o) > LONG_MAX || XFLOAT_DATA (o) < LONG_MIN)) ++ val = (long) XFLOAT_DATA (o); ++ else ++ val = cons_to_signed (o, LONG_MIN, LONG_MAX); ++ } + else if (STRINGP (o)) + { + BLOCK_INPUT; +--- src/xterm.c ++++ src/xterm.c 2012-07-03 11:47:12.060510503 +0000 +@@ -5753,9 +5753,10 @@ static struct x_display_info *next_noop_ + #define SET_SAVED_BUTTON_EVENT \ + do \ + { \ +- if (f->output_data.x->saved_menu_event == 0) \ ++ if (f->output_data.x->saved_menu_event == 0) { \ + f->output_data.x->saved_menu_event \ + = (XEvent *) xmalloc (sizeof (XEvent)); \ ++ memset(f->output_data.x->saved_menu_event,0,sizeof(XEvent));}\ + *f->output_data.x->saved_menu_event = event; \ + inev.ie.kind = MENU_BAR_ACTIVATE_EVENT; \ + XSETFRAME (inev.ie.frame_or_window, f); \ diff --git a/emacs.changes b/emacs.changes index adffc96..d2482a0 100644 --- a/emacs.changes +++ b/emacs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 3 12:25:05 UTC 2012 - werner@suse.de + +- Don't be fooled by not initialized time stamps of unused XEvent + structures which happens with old GTK-2.0 + ------------------------------------------------------------------- Fri Jun 29 15:22:42 UTC 2012 - werner@suse.de diff --git a/emacs.spec b/emacs.spec index 24314af..fb0591e 100644 --- a/emacs.spec +++ b/emacs.spec @@ -93,6 +93,7 @@ Patch14: emacs-24.1-tinfo.dif Patch15: emacs-22.2-iconic.patch Patch16: emacs-23.1-flyspell.patch Patch22: emacs-24.1-bnc628268.patch +Patch23: emacs-24.1-xevent.patch Patch24: emacs-24.1-xgselect.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %global bug_345669 0 @@ -196,6 +197,7 @@ if test ! -e $HOME/.mh_profile && type -p install-mh > /dev/null 2>&1; then install-mh -auto < /dev/null fi %patch22 +%patch23 %patch24 %if 0%{?suse_version} < 1130 %patch1