- rewrite patch once more - the same way how upstream fix it
This commit is contained in:
parent
0a229a9bd9
commit
ba8d942e3c
@ -1,44 +1,7 @@
|
|||||||
Index: generic/tk.h
|
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
|
||||||
RCS file: /cvsroot/tktoolkit/tk/generic/tk.h,v
|
+++ tk8.5.3/generic/tkEvent.c 2008-08-06 09:47:03.000000000 +0200
|
||||||
retrieving revision 1.112
|
@@ -75,7 +75,7 @@ typedef struct TkWindowEvent {
|
||||||
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 @@
|
|
||||||
* Array of event masks corresponding to each X event:
|
* Array of event masks corresponding to each X event:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -47,7 +10,7 @@ diff -u -r1.35 tkEvent.c
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
KeyPressMask, /* KeyPress */
|
KeyPressMask, /* KeyPress */
|
||||||
@@ -113,7 +113,10 @@
|
@@ -113,7 +113,10 @@ static unsigned long eventMasks[TK_LASTE
|
||||||
0, /* SelectionNotify */
|
0, /* SelectionNotify */
|
||||||
ColormapChangeMask, /* ColormapNotify */
|
ColormapChangeMask, /* ColormapNotify */
|
||||||
0, /* ClientMessage */
|
0, /* ClientMessage */
|
||||||
@ -59,7 +22,7 @@ diff -u -r1.35 tkEvent.c
|
|||||||
VirtualEventMask, /* VirtualEvents */
|
VirtualEventMask, /* VirtualEvents */
|
||||||
ActivateMask, /* ActivateNotify */
|
ActivateMask, /* ActivateNotify */
|
||||||
ActivateMask, /* DeactivateNotify */
|
ActivateMask, /* DeactivateNotify */
|
||||||
@@ -489,7 +492,7 @@
|
@@ -489,7 +492,7 @@ GetTkWindowFromXEvent(
|
||||||
*
|
*
|
||||||
* GetEventMaskFromXEvent --
|
* GetEventMaskFromXEvent --
|
||||||
*
|
*
|
||||||
@ -68,7 +31,7 @@ diff -u -r1.35 tkEvent.c
|
|||||||
* changed to a different mask depending on the state of the event and
|
* changed to a different mask depending on the state of the event and
|
||||||
* window members.
|
* window members.
|
||||||
*
|
*
|
||||||
@@ -506,7 +509,21 @@
|
@@ -506,7 +509,23 @@ static unsigned long
|
||||||
GetEventMaskFromXEvent(
|
GetEventMaskFromXEvent(
|
||||||
XEvent *eventPtr)
|
XEvent *eventPtr)
|
||||||
{
|
{
|
||||||
@ -83,33 +46,39 @@ diff -u -r1.35 tkEvent.c
|
|||||||
+ */
|
+ */
|
||||||
+
|
+
|
||||||
+ if (eventPtr->xany.type <= MappingNotify) {
|
+ if (eventPtr->xany.type <= MappingNotify) {
|
||||||
+ mask = realEventMasks[eventPtr->xany.type];
|
+ mask = realEventMasks[eventPtr->xany.type];
|
||||||
+ } else if (eventPtr->xany.type >= VirtualEvent
|
+ } else if (eventPtr->xany.type >= VirtualEvent
|
||||||
+ && eventPtr->xany.type<TK_LASTEVENT) {
|
+ && eventPtr->xany.type<TK_LASTEVENT) {
|
||||||
+ mask = virtualEventMasks[eventPtr->xany.type - VirtualEvent];
|
+ mask = virtualEventMasks[eventPtr->xany.type - VirtualEvent];
|
||||||
|
+ } else {
|
||||||
|
+ mask = 0;
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Events selected by StructureNotify require special handling. They look
|
* Events selected by StructureNotify require special handling. They look
|
||||||
Index: unix/tkUnixEvent.c
|
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
|
||||||
RCS file: /cvsroot/tktoolkit/tk/unix/tkUnixEvent.c,v
|
+++ tk8.5.3/generic/tk.h 2008-08-06 09:47:40.000000000 +0200
|
||||||
retrieving revision 1.28
|
@@ -627,17 +627,15 @@ typedef struct Tk_GeomMgr {
|
||||||
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 @@
|
|
||||||
|
|
||||||
while (QLength(display) > 0) {
|
-#define VirtualEvent (LASTEvent)
|
||||||
XNextEvent(display, &event);
|
-#define ActivateNotify (LASTEvent + 1)
|
||||||
+#ifdef GenericEvent
|
-#define DeactivateNotify (LASTEvent + 2)
|
||||||
+ if (event.type == GenericEvent) {
|
-#define MouseWheelEvent (LASTEvent + 3)
|
||||||
+ xGenericEvent *xgePtr = (xGenericEvent *) &event;
|
-#define TK_LASTEVENT (LASTEvent + 4)
|
||||||
+
|
+#define VirtualEvent (MappingNotify + 1)
|
||||||
+ Tcl_Panic("Wild GenericEvent; panic! (extension=%d,evtype=%d)",
|
+#define ActivateNotify (MappingNotify + 2)
|
||||||
+ xgePtr->extension, xgePtr->evtype);
|
+#define DeactivateNotify (MappingNotify + 3)
|
||||||
+ }
|
+#define MouseWheelEvent (MappingNotify + 4)
|
||||||
+#endif
|
+#define TK_LASTEVENT (MappingNotify + 5)
|
||||||
if (event.type != KeyPress && event.type != KeyRelease) {
|
|
||||||
if (XFilterEvent(&event, None)) {
|
#define MouseWheelMask (1L << 28)
|
||||||
continue;
|
-
|
||||||
|
#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
|
||||||
|
5
tk.spec
5
tk.spec
@ -4,7 +4,7 @@
|
|||||||
Summary: The graphical toolkit for the Tcl scripting language
|
Summary: The graphical toolkit for the Tcl scripting language
|
||||||
Name: tk
|
Name: tk
|
||||||
Version: %{vers}
|
Version: %{vers}
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: TCL
|
License: TCL
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -115,6 +115,9 @@ rm -rf %{buildroot}
|
|||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Mon Aug 4 2008 Marcela Maslanova <mmaslano@redhat.com> - 1:8.5.3-3
|
||||||
- previous bug - remove my patch, add upstream patch
|
- previous bug - remove my patch, add upstream patch
|
||||||
- Problem is updated xorg, which changed behaviour of GenericEvent
|
- Problem is updated xorg, which changed behaviour of GenericEvent
|
||||||
|
Loading…
Reference in New Issue
Block a user