- previous bug - remove my patch, add upstream patch
- Problem is updated xorg, which changed behaviour of GenericEvent
This commit is contained in:
parent
18af36e2f0
commit
0a229a9bd9
115
genericevent.patch
Normal file
115
genericevent.patch
Normal file
@ -0,0 +1,115 @@
|
||||
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 @@
|
||||
* Array of event masks corresponding to each X event:
|
||||
*/
|
||||
|
||||
-static unsigned long eventMasks[TK_LASTEVENT] = {
|
||||
+static unsigned long realEventMasks[MappingNotify+1] = {
|
||||
0,
|
||||
0,
|
||||
KeyPressMask, /* KeyPress */
|
||||
@@ -113,7 +113,10 @@
|
||||
0, /* SelectionNotify */
|
||||
ColormapChangeMask, /* ColormapNotify */
|
||||
0, /* ClientMessage */
|
||||
- 0, /* Mapping Notify */
|
||||
+ 0 /* Mapping Notify */
|
||||
+};
|
||||
+
|
||||
+static unsigned long virtualEventMasks[TK_LASTEVENT-VirtualEvent] = {
|
||||
VirtualEventMask, /* VirtualEvents */
|
||||
ActivateMask, /* ActivateNotify */
|
||||
ActivateMask, /* DeactivateNotify */
|
||||
@@ -489,7 +492,7 @@
|
||||
*
|
||||
* GetEventMaskFromXEvent --
|
||||
*
|
||||
- * The event type is looked up in our eventMasks table, and may be
|
||||
+ * The event type is looked up in our eventMasks tables, and may be
|
||||
* changed to a different mask depending on the state of the event and
|
||||
* window members.
|
||||
*
|
||||
@@ -506,7 +509,21 @@
|
||||
GetEventMaskFromXEvent(
|
||||
XEvent *eventPtr)
|
||||
{
|
||||
- unsigned long mask = eventMasks[eventPtr->xany.type];
|
||||
+ unsigned long mask;
|
||||
+
|
||||
+ /*
|
||||
+ * Get the event mask from the correct table. Note that there are two
|
||||
+ * tables here because that means we no longer need this code to rely on
|
||||
+ * the exact value of VirtualEvent, which has caused us problems in the
|
||||
+ * past when X11 changed the value of LASTEvent. [Bug ???]
|
||||
+ */
|
||||
+
|
||||
+ if (eventPtr->xany.type <= MappingNotify) {
|
||||
+ mask = realEventMasks[eventPtr->xany.type];
|
||||
+ } else if (eventPtr->xany.type >= VirtualEvent
|
||||
+ && eventPtr->xany.type<TK_LASTEVENT) {
|
||||
+ mask = virtualEventMasks[eventPtr->xany.type - VirtualEvent];
|
||||
+ }
|
||||
|
||||
/*
|
||||
* 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 @@
|
||||
|
||||
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;
|
@ -1,23 +0,0 @@
|
||||
diff -up tk8.5.3/library/tk.tcl.olde tk8.5.3/library/tk.tcl
|
||||
--- tk8.5.3/library/tk.tcl.olde 2008-06-30 05:37:37.000000000 +0200
|
||||
+++ tk8.5.3/library/tk.tcl 2008-07-29 09:19:52.000000000 +0200
|
||||
@@ -510,7 +510,7 @@ proc ::tk::AmpWidget {class path args} {
|
||||
}
|
||||
}
|
||||
set result [$class $path {*}$options]
|
||||
- if {[string match "*button" $class]} {
|
||||
+ if {$class eq "button"} {
|
||||
bind $path <<AltUnderlined>> [list $path invoke]
|
||||
}
|
||||
return $result
|
||||
@@ -539,8 +539,8 @@ proc ::tk::AmpMenuArgs {widget add type
|
||||
#
|
||||
proc ::tk::FindAltKeyTarget {path char} {
|
||||
switch -- [winfo class $path] {
|
||||
- Button - Label -
|
||||
- TButton - TLabel - TCheckbutton {
|
||||
+ Button -
|
||||
+ Label {
|
||||
if {[string equal -nocase $char \
|
||||
[string index [$path cget -text] [$path cget -underline]]]} {
|
||||
return $path
|
10
tk.spec
10
tk.spec
@ -4,7 +4,7 @@
|
||||
Summary: The graphical toolkit for the Tcl scripting language
|
||||
Name: tk
|
||||
Version: %{vers}
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Epoch: 1
|
||||
License: TCL
|
||||
Group: Development/Languages
|
||||
@ -23,7 +23,7 @@ Obsoletes: tile <= 0.8.2
|
||||
Provides: tile = 0.8.2
|
||||
Patch1: tk8.5-make.patch
|
||||
Patch2: tk8.5-conf.patch
|
||||
Patch3: tk-8.5.3-crash.patch
|
||||
Patch3: genericevent.patch
|
||||
|
||||
%description
|
||||
When paired with the Tcl scripting language, Tk provides a fast and powerful
|
||||
@ -47,7 +47,7 @@ The package contains the development files and man pages for tk.
|
||||
|
||||
%patch1 -p1 -b .make
|
||||
%patch2 -p1 -b .conf
|
||||
%patch3 -p1 -b .crash
|
||||
%patch3 -p1 -b .crash1
|
||||
|
||||
%build
|
||||
cd unix
|
||||
@ -115,6 +115,10 @@ rm -rf %{buildroot}
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
* Tue Jul 29 2008 Marcela Maslanova <mmaslano@redhat.com> - 1:8.5.3-2
|
||||
- fix 456922 - crash gitk resolved
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user