[xiph-cvs] cvs commit: postfish mainpanel.c version.h

Monty xiphmont at xiph.org
Fri Oct 17 01:27:22 PDT 2003



xiphmont    03/10/17 04:27:22

  Modified:    .        mainpanel.c version.h
  Log:
  GTK has one unfortunate bit of hardwiring; if a key is held down and
  autorepeats, the default pushbutton widget-unactivate timeout is 250
  ms, far slower than autorepeat, during which time the button will not
  accept new activations.  We must defeat this to have autorepeat
  accellerators function at full speed.

Revision  Changes    Path
1.17      +25 -2     postfish/mainpanel.c

Index: mainpanel.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/mainpanel.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- mainpanel.c	17 Oct 2003 06:28:15 -0000	1.16
+++ mainpanel.c	17 Oct 2003 08:27:21 -0000	1.17
@@ -284,19 +284,38 @@
                            gpointer in){
   postfish_mainpanel *p=in;
 
-#if 0
   fprintf(stderr,"keypress: M%d C%d S%d L%d '%x'\n",
           event->state&GDK_MOD1_MASK,
           event->state&GDK_CONTROL_MASK,
           event->state&GDK_SHIFT_MASK,
           event->state&GDK_LOCK_MASK,
           event->keyval);
-#endif
 
   /* do not capture Alt accellerators */
   if(event->state&GDK_MOD1_MASK) return FALSE;
   if(event->state&GDK_CONTROL_MASK) return FALSE;
 
+
+  switch(event->keyval){
+  case GDK_less:
+  case GDK_comma:
+  case GDK_period:
+  case GDK_greater:
+    
+    /* GTK has one unfortunate bit of hardwiring; if a key is held down
+       and autorepeats, the default pushbutton widget-unactivate timeout
+       is 250 ms, far slower than autorepeat.  We must defeat this to
+       have autorepeat accellerators function at full speed. */
+    
+    {
+      GdkEventKey copy=*event;
+      copy.type=GDK_KEY_RELEASE;
+      gtk_main_do_event((GdkEvent *)(&copy));
+    }
+    while (gtk_events_pending ())  gtk_main_iteration ();
+  }
+
+
   switch(event->keyval){
   case GDK_m:
     /* trigger master dB */
@@ -364,6 +383,10 @@
     gtk_widget_activate(p->deckactive[3]);
     break;
   case GDK_period:
+
+
+
+
     gtk_widget_activate(p->deckactive[4]);
     break;
   case GDK_greater:

<p><p>1.14      +2 -2      postfish/version.h

Index: version.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/version.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- version.h	17 Oct 2003 06:28:15 -0000	1.13
+++ version.h	17 Oct 2003 08:27:21 -0000	1.14
@@ -1,2 +1,2 @@
-#define VERSION "$Id: version.h,v 1.13 2003/10/17 06:28:15 xiphmont Exp $ "
-/* DO NOT EDIT: Automated versioning hack [Fri Oct 17 02:21:29 EDT 2003] */
+#define VERSION "$Id: version.h,v 1.14 2003/10/17 08:27:21 xiphmont Exp $ "
+/* DO NOT EDIT: Automated versioning hack [Fri Oct 17 04:25:26 EDT 2003] */

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list