- rewrite patch once more - the same way how upstream fix it

This commit is contained in:
Marcela Mašláňová 2008-08-06 07:50:19 +00:00
parent 0a229a9bd9
commit ba8d942e3c
2 changed files with 40 additions and 68 deletions

View File

@ -1,44 +1,7 @@
Index: generic/tk.h
===================================================================
RCS file: /cvsroot/tktoolkit/tk/generic/tk.h,v
retrieving revision 1.112
diff -u -r1.112 tk.h
--- tk8.5.3/generic/tk.h 19 Jun 2008 19:48:26 -0000 1.112
+++ tk8.5.3/ generic/tk.h 28 Jul 2008 12:38:26 -0000
@@ -627,17 +627,18 @@
*---------------------------------------------------------------------------
*/
-#define VirtualEvent (LASTEvent)
-#define ActivateNotify (LASTEvent + 1)
-#define DeactivateNotify (LASTEvent + 2)
-#define MouseWheelEvent (LASTEvent + 3)
-#define TK_LASTEVENT (LASTEvent + 4)
+#if (TK_MAJOR_VERSION > 8)
+#error Maintenance todo: Fix GenericEvent/VirtualEvent clash. [Bug 2010422]
+#endif
+#define VirtualEvent (MappingNotify + 1)
+#define ActivateNotify (MappingNotify + 2)
+#define DeactivateNotify (MappingNotify + 3)
+#define MouseWheelEvent (MappingNotify + 4)
+#define TK_LASTEVENT (MappingNotify + 5)
#define MouseWheelMask (1L << 28)
-
#define ActivateMask (1L << 29)
#define VirtualEventMask (1L << 30)
-#define TK_LASTEVENT (LASTEvent + 4)
/*
* A virtual event shares most of its fields with the XKeyEvent and
Index: generic/tkEvent.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/generic/tkEvent.c,v
retrieving revision 1.35
diff -u -r1.35 tkEvent.c
--- tk8.5.3/generic/tkEvent.c 26 Mar 2008 19:04:09 -0000 1.35
+++ tk8.5.3/ generic/tkEvent.c 28 Jul 2008 12:38:27 -0000
@@ -75,7 +75,7 @@
diff -up tk8.5.3/generic/tkEvent.c.crash1 tk8.5.3/generic/tkEvent.c
--- tk8.5.3/generic/tkEvent.c.crash1 2008-03-26 20:04:09.000000000 +0100
+++ tk8.5.3/generic/tkEvent.c 2008-08-06 09:47:03.000000000 +0200
@@ -75,7 +75,7 @@ typedef struct TkWindowEvent {
* Array of event masks corresponding to each X event:
*/
@ -47,7 +10,7 @@ diff -u -r1.35 tkEvent.c
0,
0,
KeyPressMask, /* KeyPress */
@@ -113,7 +113,10 @@
@@ -113,7 +113,10 @@ static unsigned long eventMasks[TK_LASTE
0, /* SelectionNotify */
ColormapChangeMask, /* ColormapNotify */
0, /* ClientMessage */
@ -59,7 +22,7 @@ diff -u -r1.35 tkEvent.c
VirtualEventMask, /* VirtualEvents */
ActivateMask, /* ActivateNotify */
ActivateMask, /* DeactivateNotify */
@@ -489,7 +492,7 @@
@@ -489,7 +492,7 @@ GetTkWindowFromXEvent(
*
* GetEventMaskFromXEvent --
*
@ -68,7 +31,7 @@ diff -u -r1.35 tkEvent.c
* changed to a different mask depending on the state of the event and
* window members.
*
@@ -506,7 +509,21 @@
@@ -506,7 +509,23 @@ static unsigned long
GetEventMaskFromXEvent(
XEvent *eventPtr)
{
@ -87,29 +50,35 @@ diff -u -r1.35 tkEvent.c
+ } else if (eventPtr->xany.type >= VirtualEvent
+ && eventPtr->xany.type<TK_LASTEVENT) {
+ mask = virtualEventMasks[eventPtr->xany.type - VirtualEvent];
+ } else {
+ mask = 0;
+ }
/*
* Events selected by StructureNotify require special handling. They look
Index: unix/tkUnixEvent.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/unix/tkUnixEvent.c,v
retrieving revision 1.28
diff -u -r1.28 tkUnixEvent.c
--- tk8.5.3/unix/tkUnixEvent.c 27 Apr 2008 22:39:13 -0000 1.28
+++ tk8.5.3/ unix/tkUnixEvent.c 28 Jul 2008 12:38:28 -0000
@@ -289,6 +289,14 @@
diff -up tk8.5.3/generic/tk.h.crash1 tk8.5.3/generic/tk.h
--- tk8.5.3/generic/tk.h.crash1 2008-06-30 05:37:37.000000000 +0200
+++ tk8.5.3/generic/tk.h 2008-08-06 09:47:40.000000000 +0200
@@ -627,17 +627,15 @@ typedef struct Tk_GeomMgr {
*---------------------------------------------------------------------------
*/
while (QLength(display) > 0) {
XNextEvent(display, &event);
+#ifdef GenericEvent
+ if (event.type == GenericEvent) {
+ xGenericEvent *xgePtr = (xGenericEvent *) &event;
+
+ Tcl_Panic("Wild GenericEvent; panic! (extension=%d,evtype=%d)",
+ xgePtr->extension, xgePtr->evtype);
+ }
+#endif
if (event.type != KeyPress && event.type != KeyRelease) {
if (XFilterEvent(&event, None)) {
continue;
-#define VirtualEvent (LASTEvent)
-#define ActivateNotify (LASTEvent + 1)
-#define DeactivateNotify (LASTEvent + 2)
-#define MouseWheelEvent (LASTEvent + 3)
-#define TK_LASTEVENT (LASTEvent + 4)
+#define VirtualEvent (MappingNotify + 1)
+#define ActivateNotify (MappingNotify + 2)
+#define DeactivateNotify (MappingNotify + 3)
+#define MouseWheelEvent (MappingNotify + 4)
+#define TK_LASTEVENT (MappingNotify + 5)
#define MouseWheelMask (1L << 28)
-
#define ActivateMask (1L << 29)
#define VirtualEventMask (1L << 30)
-#define TK_LASTEVENT (LASTEvent + 4)
/*
* A virtual event shares most of its fields with the XKeyEvent and

View File

@ -4,7 +4,7 @@
Summary: The graphical toolkit for the Tcl scripting language
Name: tk
Version: %{vers}
Release: 3%{?dist}
Release: 4%{?dist}
Epoch: 1
License: TCL
Group: Development/Languages
@ -115,6 +115,9 @@ rm -rf %{buildroot}
%{_mandir}/man3/*
%changelog
* Wed Aug 6 2008 Marcela Maslanova <mmaslano@redhat.com> - 1:8.5.3-4
- rewrite patch once more - the same way how upstream fix it
* Mon Aug 4 2008 Marcela Maslanova <mmaslano@redhat.com> - 1:8.5.3-3
- previous bug - remove my patch, add upstream patch
- Problem is updated xorg, which changed behaviour of GenericEvent