Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by George Sherwood (f0533f24eed5f09352f4e21e29ebcc69d34d3c93)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: George Sherwood <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by George Sherwood (f0533f24eed5f09352f4e21e29ebcc69d34d3c93)
  • Date: Tue, 5 Aug 2008 17:32:10 -0500

GIT changes to master grimoire by George Sherwood <gsherwood AT sourcemage.org>:

devel/tk/HISTORY | 5 +
devel/tk/PRE_BUILD | 2
devel/tk/genericevent.patch | 115
++++++++++++++++++++++++++++++++++++++++++++
devel/tk/tk-lastevent.patch | 29 -----------
4 files changed, 121 insertions(+), 30 deletions(-)

New commits:
commit f0533f24eed5f09352f4e21e29ebcc69d34d3c93
Author: George Sherwood <gsherwood AT sourcemage.org>
Commit: George Sherwood <gsherwood AT sourcemage.org>

tk: Added improved upstream patch and removed initial patch.
Since the old patch works, no need for PATCHLEVEL.

diff --git a/devel/tk/HISTORY b/devel/tk/HISTORY
index 521b586..155c6af 100644
--- a/devel/tk/HISTORY
+++ b/devel/tk/HISTORY
@@ -1,3 +1,8 @@
+2008-08-05 George Sherwood <gsherwood AT sourcemage.org>
+ * PRE_BUILD: Removed initial and added improved upstream patch
+ * genericevent.patch: improved upstream patch for xproto issue
+ * tk-lastevent.patch: Removed patch
+
2008-07-22 George Sherwood <george AT beernabeer.com>
* DETAILS: PATCHLEVEL++
* PRE_BUILD: Added upstream patch
diff --git a/devel/tk/PRE_BUILD b/devel/tk/PRE_BUILD
index 12f5888..0ac8c96 100755
--- a/devel/tk/PRE_BUILD
+++ b/devel/tk/PRE_BUILD
@@ -3,4 +3,4 @@ mk_source_dir $SOURCE2_DIRECTORY &&
unpack_file &&
unpack_file 2 &&
cd $SOURCE2_DIRECTORY &&
-patch -p0 < $SCRIPT_DIRECTORY/tk-lastevent.patch
+patch -p0 < $SCRIPT_DIRECTORY/genericevent.patch
diff --git a/devel/tk/genericevent.patch b/devel/tk/genericevent.patch
new file mode 100644
index 0000000..eba226d
--- /dev/null
+++ b/devel/tk/genericevent.patch
@@ -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
+--- generic/tk.h 19 Jun 2008 19:48:26 -0000 1.112
++++ 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
+--- generic/tkEvent.c 26 Mar 2008 19:04:09 -0000 1.35
++++ 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
+--- unix/tkUnixEvent.c 27 Apr 2008 22:39:13 -0000 1.28
++++ 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;
diff --git a/devel/tk/tk-lastevent.patch b/devel/tk/tk-lastevent.patch
deleted file mode 100644
index 7cb3fcc..0000000
--- a/devel/tk/tk-lastevent.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Date: Sat Jul 12 09:40:30 PDT 2008
-Files: generic/tk.h
-Bugid: 2010422
-
---- generic/tk.h.lastevent.old 2008-07-01 09:59:58.000000000 -0700
-+++ generic/tk.h 2008-07-12 09:40:02.933155263 -0700
-@@ -627,17 +627,15 @@
-
*---------------------------------------------------------------------------
- */
-
--#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



  • [SM-Commit] GIT changes to master grimoire by George Sherwood (f0533f24eed5f09352f4e21e29ebcc69d34d3c93), George Sherwood, 08/05/2008

Archive powered by MHonArc 2.6.24.

Top of Page