From nobody@FreeBSD.org  Mon Aug 10 11:17:20 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ED3A610656D3
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Aug 2009 11:17:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id DBB508FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Aug 2009 11:17:19 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n7ABHJTe076989
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Aug 2009 11:17:19 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n7ABHJ8O076988;
	Mon, 10 Aug 2009 11:17:19 GMT
	(envelope-from nobody)
Message-Id: <200908101117.n7ABHJ8O076988@www.freebsd.org>
Date: Mon, 10 Aug 2009 11:17:19 GMT
From: Matti Saarinen <mjsaarin@cc.helsinki.fi>
To: freebsd-gnats-submit@FreeBSD.org
Subject: multimedia/vlc breaks keyboard input processing
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: jsa@wickedmachine.net

>Number:         137635
>Category:       ports
>Synopsis:       multimedia/vlc breaks keyboard input processing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 10 11:20:01 UTC 2009
>Closed-Date:    Tue Nov 17 22:00:55 UTC 2009
>Last-Modified:  Tue Nov 17 22:10:01 UTC 2009
>Originator:     Matti Saarinen
>Release:        7.1
>Organization:
>Environment:
FreeBSD lagavulin.it.helsinki.fi 7.1-STABLE FreeBSD 7.1-STABLE #11: Mon Mar  2 13:50:57 EET 2009     root@lagavulin.it.helsinki.fi:/usr/obj/usr/src/sys/LAGAVULIN  i386
>Description:
I upgraded ports today Aug 10. The upgrade didn't upgrade vlc but it did upgrade some libraries on which vlc depend. After the upgrade vlc began to behave badly. When vlc is started X11 doesn't process keyboard input anymore. Mouse still works and focus appears to follows mouse. If I move focus to another window keyboard input doesn't reach the window. Only thing that happens is that the frame of currently focused window blinks. The same thing happens even if I start vlc with dummy interface. I tried two window managers and the effect was the same.  

The only way to recover from this is to switch to another virtual console and kill vlc from there. 

Below is the list of packages vlc depends on that are installed on the computer. 

Information for vlc-1.0.0_1,3:

Depends on:
Dependency: xineramaproto-1.1.2
Dependency: xf86vidmodeproto-2.2.2
Dependency: xextproto-7.0.5
Dependency: renderproto-0.9.3
Dependency: randrproto-1.3.0
Dependency: kbproto-1.0.3
Dependency: inputproto-1.5.0
Dependency: fixesproto-4.0
Dependency: dri2proto-2.0
Dependency: damageproto-1.1.0_2
Dependency: compositeproto-0.4
Dependency: font-util-1.0.1
Dependency: encodings-1.0.2,1
Dependency: libebml-0.7.8
Dependency: expat-2.0.1
Dependency: gnome_subr-1.0
Dependency: dmidecode-2.10
Dependency: win32-codecs-3.1.0.r1,1
Dependency: libmpeg2-0.5.1
Dependency: libmatroska-0.8.1
Dependency: libdvdcss-1.2.10_1
Dependency: libdvdread-4.1.3_1
Dependency: libdvdnav-0.1.10_4
Dependency: libdvbpsi-0.1.6
Dependency: pciids-20090807
Dependency: hicolor-icon-theme-0.10_2
Dependency: gnomehier-2.3_12
Dependency: djbfft-0.76_2
Dependency: python26-2.6.2_1
Dependency: xcb-proto-1.5
Dependency: perl-5.8.9_3
Dependency: svgalib-1.4.3_5
Dependency: png-1.2.38
Dependency: jpeg-7
Dependency: tiff-3.8.2_4
Dependency: jasper-1.900.1_8
Dependency: pkg-config-0.23_1
Dependency: xtrans-1.2.3
Dependency: xproto-7.0.15
Dependency: pixman-0.15.4
Dependency: libtasn1-2.1
Dependency: libfontenc-1.0.4
Dependency: libdca-0.0.5
Dependency: libXdmcp-1.0.2_1
Dependency: libXau-1.0.4
Dependency: libICE-1.0.4_1,1
Dependency: libSM-1.1.0_1,1
Dependency: freetype2-2.3.9_1
Dependency: mkfontscale-1.0.6
Dependency: mkfontdir-1.0.4
Dependency: fontconfig-2.6.0,1
Dependency: font-misc-meltho-1.0.0_1
Dependency: font-misc-ethiopic-1.0.0
Dependency: font-bh-ttf-1.0.0
Dependency: bitstream-vera-1.10_4
Dependency: xorg-fonts-truetype-7.4
Dependency: pcre-7.9
Dependency: libvolume_id-0.81.1
Dependency: libunicode-0.4_9
Dependency: libtar-1.2.11_2
Dependency: libpthread-stubs-0.1
Dependency: libxcb-1.4
Dependency: xcb-util-0.3.5
Dependency: libdrm-2.4.12
Dependency: libX11-1.2.1_1,1
Dependency: libXt-1.0.5_1
Dependency: libXrender-0.9.4_1
Dependency: libXft-2.1.13
Dependency: libXfixes-4.0.3_1
Dependency: libXext-1.0.5,1
Dependency: libXxf86vm-1.0.2
Dependency: libXrandr-1.3.0
Dependency: libXpm-3.5.7
Dependency: libXinerama-1.0.3,1
Dependency: libXi-1.2.1,1
Dependency: libXdamage-1.1.1
Dependency: libXcursor-1.1.9_1
Dependency: libXcomposite-0.4.0,1
Dependency: aalib-1.4.r5_4
Dependency: libGL-7.4.4
Dependency: libGLU-7.4.4
Dependency: gpac-libgpac-0.4.5_2,1
Dependency: x264-0.0.20081218
Dependency: cairo-1.8.8,1
Dependency: libdaemon-0.12
Dependency: gdbm-1.8.3_3
Dependency: libiconv-1.13.1
Dependency: sdl-1.2.13_4,2
Dependency: sdl_image-1.2.7_1
Dependency: samba-libsmbclient-3.0.35
Dependency: libxml2-2.7.3
Dependency: gettext-0.17_1
Dependency: popt-1.14
Dependency: libzvbi-0.2.33
Dependency: libgpg-error-1.7
Dependency: libgcrypt-1.4.4
Dependency: gnutls-2.6.5
Dependency: gnome-mime-data-2.18.0_3
Dependency: glib-2.20.4
Dependency: qt4-corelib-4.5.2
Dependency: qt4-gui-4.5.2
Dependency: gamin-0.1.10_3
Dependency: gio-fam-backend-2.20.4
Dependency: shared-mime-info-0.60_1
Dependency: pango-1.24.5
Dependency: libIDL-0.8.13
Dependency: dbus-1.2.4.6
Dependency: dbus-glib-0.82
Dependency: policykit-0.9_4
Dependency: cups-client-1.3.10_3
Dependency: consolekit-0.3.0_8
Dependency: hal-0.5.11_25
Dependency: avahi-app-0.6.25_2
Dependency: ORBit2-2.14.17
Dependency: taglib-1.5
Dependency: libogg-1.1.4,4
Dependency: speex-1.2.r1_2,1
Dependency: libvorbis-1.2.3,3
Dependency: libtheora-1.0_1
Dependency: libmpcdec-1.2.6
Dependency: libmodplug-0.8.7
Dependency: libmad-0.15.1b_2
Dependency: libid3tag-0.15.1b
Dependency: libcddb-1.3.0
Dependency: liba52-0.7.4_2
Dependency: lame-3.98.2_1
Dependency: flac-1.2.1_1
Dependency: libsndfile-1.0.20_1
Dependency: twolame-0.3.12
Dependency: faad2-2.7_1,1
Dependency: ffmpeg-2008.07.27_11
Dependency: transcode-1.1.3_1
Dependency: cdparanoia-3.9.8_8
Dependency: libcdio-0.78.2_2
Dependency: vcdimager-0.7.23_5
Dependency: atk-1.26.0
Dependency: gtk-2.16.5_1
Dependency: libnotify-0.4.5_1
Dependency: gconf2-2.26.2_1
Dependency: gnome-vfs-2.24.1_1


>How-To-Repeat:
By starting vlc from xterm.
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon Aug 10 11:20:16 UTC 2009 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=137635 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: jsa@wickedmachine.net
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/137635: multimedia/vlc breaks keyboard input processing
Date: Mon, 10 Aug 2009 11:20:14 UT

 Maintainer of multimedia/vlc,
 
 Please note that PR ports/137635 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/137635
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: "Joseph S. Atkinson" <jsa.bsd@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/137635: multimedia/vlc breaks keyboard input processing
Date: Mon, 10 Aug 2009 16:08:05 +0000

 --0015175cdebe8f32de0470cbcafd
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Did you rebuild VLC against these new libraries?
 
 --0015175cdebe8f32de0470cbcafd
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 <font color="#888888">Did you rebuild VLC against these new libraries?<br></font>
 
 --0015175cdebe8f32de0470cbcafd--

From: Doug Barton <dougb@dougbarton.us>
To: bug-followup@FreeBSD.org, mjsaarin@cc.helsinki.fi
Cc:  
Subject: Re: ports/137635: multimedia/vlc breaks keyboard input processing
Date: Sat, 22 Aug 2009 22:14:10 -0700

 "Me too." With just-committed vlc 1.0.1 and up to date ports and -current.
 
 
 Doug

From: Matti Saarinen <mjsaarin@cc.helsinki.fi>
To: bug-followup@FreeBSD.org
Cc:  
Subject: ports/137635: multimedia/vlc breaks keyboard input processing
Date: Tue, 03 Nov 2009 13:26:58 +0200

 This problem still persists. I tried compiling and installing vlc 1.0.2
 today. It didn't work either. Vlc 0.9.8.a_4 works fine and doesn't
 prevent keyboard input.
 
 // Matti
 

From: "Joseph S. Atkinson" <jsa.bsd@gmail.com>
To: bug-followup@FreeBSD.org, Matti Saarinen <mjsaarin@cc.helsinki.fi>, 
 Doug Barton <dougb@dougbarton.us>,
 Eric Muller <ecmuller@gmail.com>
Cc:  
Subject: Re: ports/137635: multimedia/vlc breaks keyboard input processing
Date: Tue, 17 Nov 2009 15:32:32 -0500

 This is a multi-part message in MIME format.
 --------------070000050208080500000302
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 This appears to be a known issue. It's not something I could duplicate 
 personally, but was widely reported. VLC fixed this in git, but I got them to 
 backport it to the bugfix branch from which 1.0.4 will be cut.
 
 This is a diff to apply to 1.0.3.
 
 To test it, put it in ${PORTSDIR}/multimedia/vlc/files/ and `make build 
 deinstall reinstall`.
 
 Sorry that it has taken me so long to address this.
 
 If this works for you all (and I have one report that it does so far), dougb@ 
 should be able to commit it.
 
 --------------070000050208080500000302
 Content-Type: text/plain;
  name="patch-modules__control__globalhotkeys__xcb.c"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-modules__control__globalhotkeys__xcb.c"
 
 --- ./modules/control/globalhotkeys/xcb.c.orig	2009-05-10 19:03:55.000000000 -0400
 +++ ./modules/control/globalhotkeys/xcb.c	2009-11-17 13:39:36.000000000 -0500
 @@ -28,6 +28,7 @@
  #include <vlc_interface.h>
  #include <vlc_keys.h>
  #include <ctype.h>
 +#include <errno.h>
  
  #include <xcb/xcb.h>
  #include <xcb/xcb_keysyms.h>
 @@ -56,7 +57,11 @@
  
  typedef struct
  {
 +#ifdef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
      xcb_keycode_t i_x11;
 +#else
 +    xcb_keycode_t *p_keys;
 +#endif
      unsigned      i_modifier;
      int           i_action;
  } hotkey_mapping_t;
 @@ -96,7 +101,7 @@
      p_sys->p_connection = xcb_connect( psz_display, &i_screen_default );
      free( psz_display );
  
 -    if( !p_sys->p_connection )
 +    if( xcb_connection_has_error( p_sys->p_connection ) )
          goto error;
  
      /* Get the root windows of the default screen */
 @@ -125,6 +130,10 @@
      if( vlc_clone( &p_sys->thread, Thread, p_intf, VLC_THREAD_PRIORITY_LOW ) )
      {
          Unregister( p_intf );
 +#ifndef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
 +        if( p_sys->p_map )
 +            free( p_sys->p_map->p_keys );
 +#endif
          free( p_sys->p_map );
          goto error;
      }
 @@ -133,8 +142,7 @@
  error:
      if( p_sys->p_symbols )
          xcb_key_symbols_free( p_sys->p_symbols );
 -    if( p_sys->p_connection )
 -        xcb_disconnect( p_sys->p_connection );
 +    xcb_disconnect( p_sys->p_connection );
      free( p_sys );
      return VLC_EGENERIC;
  }
 @@ -151,6 +159,10 @@
      vlc_join( p_sys->thread, NULL );
  
      Unregister( p_intf );
 +#ifndef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
 +    if( p_sys->p_map )
 +        free( p_sys->p_map->p_keys );
 +#endif
      free( p_sys->p_map );
  
      xcb_key_symbols_free( p_sys->p_symbols );
 @@ -164,16 +176,43 @@
  static unsigned GetModifier( xcb_connection_t *p_connection, xcb_key_symbols_t *p_symbols, xcb_keysym_t sym )
  {
      static const unsigned pi_mask[8] = {
 -        XCB_MOD_MASK_SHIFT, XCB_MOD_MASK_LOCK, XCB_MOD_MASK_CONTROL, XCB_MOD_MASK_1,
 -        XCB_MOD_MASK_2, XCB_MOD_MASK_3, XCB_MOD_MASK_4, XCB_MOD_MASK_5
 +        XCB_MOD_MASK_SHIFT, XCB_MOD_MASK_LOCK, XCB_MOD_MASK_CONTROL,
 +        XCB_MOD_MASK_1, XCB_MOD_MASK_2, XCB_MOD_MASK_3,
 +        XCB_MOD_MASK_4, XCB_MOD_MASK_5
      };
  
 +    if( sym == 0 )
 +        return 0; /* no modifier */
 +
 +#ifdef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
      const xcb_keycode_t key = xcb_key_symbols_get_keycode( p_symbols, sym );
      if( key == 0 )
          return 0;
 +#else
 +    const xcb_keycode_t *p_keys = xcb_key_symbols_get_keycode( p_symbols, sym );
 +    if( !p_keys )
 +        return 0;
  
 -    xcb_get_modifier_mapping_cookie_t r = xcb_get_modifier_mapping( p_connection );
 -    xcb_get_modifier_mapping_reply_t *p_map = xcb_get_modifier_mapping_reply( p_connection, r, NULL );
 +    int i = 0;
 +    bool no_modifier = true;
 +    while( p_keys[i] != XCB_NO_SYMBOL )
 +    {
 +        if( p_keys[i] != 0 )
 +        {
 +            no_modifier = false;
 +            break;
 +        }
 +        i++;
 +    }
 +
 +    if( no_modifier )
 +        return 0;
 +#endif
 +
 +    xcb_get_modifier_mapping_cookie_t r =
 +            xcb_get_modifier_mapping( p_connection );
 +    xcb_get_modifier_mapping_reply_t *p_map =
 +            xcb_get_modifier_mapping_reply( p_connection, r, NULL );
      if( !p_map )
          return 0;
  
 @@ -181,20 +220,30 @@
      if( !p_keycode )
          return 0;
  
 -    unsigned i_mask = 0;
      for( int i = 0; i < 8; i++ )
 -    {
          for( int j = 0; j < p_map->keycodes_per_modifier; j++ )
 -        {
 +#ifdef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
              if( p_keycode[i * p_map->keycodes_per_modifier + j] == key )
 -                i_mask = pi_mask[i];
 -        }
 -    }
 +            {
 +                free( p_map );
 +                return pi_mask[i];
 +            }
 +#else
 +            for( int k = 0; p_keys[k] != XCB_NO_SYMBOL; k++ )
 +                if( p_keycode[i*p_map->keycodes_per_modifier + j] == p_keys[k])
 +                {
 +                    free( p_map );
 +                    return pi_mask[i];
 +                }
 +#endif
  
      free( p_map ); // FIXME to check
 -    return i_mask;
 +    return 0;
  }
 -static unsigned GetX11Modifier( xcb_connection_t *p_connection, xcb_key_symbols_t *p_symbols, unsigned i_vlc )
 +
 +
 +static unsigned GetX11Modifier( xcb_connection_t *p_connection,
 +        xcb_key_symbols_t *p_symbols, unsigned i_vlc )
  {
      unsigned i_mask = 0;
  
 @@ -225,7 +274,6 @@
  
      { XK_Return, KEY_ENTER },
      { XK_KP_Enter, KEY_ENTER },
 -    { XK_space, KEY_SPACE },
      { XK_Escape, KEY_ESC },
  
      { XK_Menu, KEY_MENU },
 @@ -253,16 +301,16 @@
  };
  static xcb_keysym_t GetX11Key( unsigned i_vlc )
  {
 +    /* X11 and VLC use ASCII for printable ASCII characters */
 +    if( i_vlc >= 32 && i_vlc <= 127 )
 +        return i_vlc;
 +
      for( int i = 0; x11keys_to_vlckeys[i].i_vlc != 0; i++ )
      {
          if( x11keys_to_vlckeys[i].i_vlc == i_vlc )
              return x11keys_to_vlckeys[i].i_x11;
      }
  
 -    /* Copied from xcb, it seems that xcb use ascii code for ascii characters */
 -    if( isascii( i_vlc ) )
 -        return i_vlc;
 -
      return XK_VoidSymbol;
  }
  
 @@ -281,7 +329,7 @@
      p_sys->p_map = NULL;
  
      /* Registering of Hotkeys */
 -    for( struct hotkey *p_hotkey = p_intf->p_libvlc->p_hotkeys;
 +    for( const struct hotkey *p_hotkey = p_intf->p_libvlc->p_hotkeys;
              p_hotkey->psz_action != NULL;
              p_hotkey++ )
      {
 @@ -291,23 +339,34 @@
  
          const int i_vlc_action = p_hotkey->i_action;
          const int i_vlc_key = config_GetInt( p_intf, psz_hotkey );
 -
          free( psz_hotkey );
  
          if( !i_vlc_key )
              continue;
 +#ifdef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
 +        const xcb_keycode_t key = xcb_key_symbols_get_keycode(
 +                p_sys->p_symbols, GetX11Key( i_vlc_key & ~KEY_MODIFIER ) );
 +#else
 +        xcb_keycode_t *p_keys = xcb_key_symbols_get_keycode(
 +                p_sys->p_symbols, GetX11Key( i_vlc_key & ~KEY_MODIFIER ) );
 +        if( !p_keys )
 +            continue;
 +#endif
 +        const unsigned i_modifier = GetX11Modifier( p_sys->p_connection,
 +                p_sys->p_symbols, i_vlc_key & KEY_MODIFIER );
  
 -        const xcb_keycode_t key = xcb_key_symbols_get_keycode( p_sys->p_symbols, GetX11Key( i_vlc_key & ~KEY_MODIFIER ) );
 -        const unsigned i_modifier = GetX11Modifier( p_sys->p_connection, p_sys->p_symbols, i_vlc_key & KEY_MODIFIER );
 -
 -        for( int j = 0; j < sizeof(p_x11_modifier_ignored)/sizeof(*p_x11_modifier_ignored); j++ )
 +        const size_t max = sizeof(p_x11_modifier_ignored) /
 +                sizeof(*p_x11_modifier_ignored);
 +        for( unsigned int i = 0; i < max; i++ )
          {
 -            const unsigned i_ignored = GetModifier( p_sys->p_connection, p_sys->p_symbols, p_x11_modifier_ignored[j] );
 -            if( j != 0 && i_ignored == 0x00)
 +            const unsigned i_ignored = GetModifier( p_sys->p_connection,
 +                    p_sys->p_symbols, p_x11_modifier_ignored[i] );
 +            if( i != 0 && i_ignored == 0)
                  continue;
  
              hotkey_mapping_t *p_map_old = p_sys->p_map;
 -            p_sys->p_map = realloc( p_sys->p_map, sizeof(*p_sys->p_map) * (p_sys->i_map+1) );
 +            p_sys->p_map = realloc( p_sys->p_map,
 +                    sizeof(*p_sys->p_map) * (p_sys->i_map+1) );
              if( !p_sys->p_map )
              {
                  p_sys->p_map = p_map_old;
 @@ -315,7 +374,11 @@
              }
              hotkey_mapping_t *p_map = &p_sys->p_map[p_sys->i_map++];
  
 +#ifdef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
              p_map->i_x11 = key;
 +#else
 +            p_map->p_keys = p_keys;
 +#endif
              p_map->i_modifier = i_modifier|i_ignored;
              p_map->i_action = i_vlc_action;
          }
 @@ -329,9 +392,18 @@
      for( int i = 0; i < p_sys->i_map; i++ )
      {
          const hotkey_mapping_t *p_map = &p_sys->p_map[i];
 +#ifdef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
          xcb_grab_key( p_sys->p_connection, true, p_sys->root,
                        p_map->i_modifier, p_map->i_x11,
                        XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC );
 +#else
 +        for( int j = 0; p_map->p_keys[j] != XCB_NO_SYMBOL; j++ )
 +        {
 +            xcb_grab_key( p_sys->p_connection, true, p_sys->root,
 +                          p_map->i_modifier, p_map->p_keys[j],
 +                          XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC );
 +        }
 +#endif
      }
  }
  static void Unregister( intf_thread_t *p_intf )
 @@ -341,7 +413,14 @@
      for( int i = 0; i < p_sys->i_map; i++ )
      {
          const hotkey_mapping_t *p_map = &p_sys->p_map[i];
 -        xcb_ungrab_key( p_sys->p_connection, p_map->i_x11, p_sys->root, p_map->i_modifier );
 +#ifdef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
 +        xcb_ungrab_key( p_sys->p_connection, p_map->i_x11, p_sys->root,
 +                p_map->i_modifier );
 +#else
 +        for( int j = 0; p_map->p_keys[j] != XCB_NO_SYMBOL; j++ )
 +            xcb_ungrab_key( p_sys->p_connection, p_map->p_keys[j], p_sys->root,
 +                    p_map->i_modifier );
 +#endif
      }
  }
  
 @@ -387,12 +466,28 @@
              {
                  hotkey_mapping_t *p_map = &p_sys->p_map[i];
  
 +#ifdef XCB_KEYSYM_OLD_API /* as seen in Debian Lenny */
                  if( p_map->i_x11 == e->detail &&
                      p_map->i_modifier == e->state )
                  {
 -                    var_SetInteger( p_intf->p_libvlc, "key-action", p_map->i_action );
 +                    var_SetInteger( p_intf->p_libvlc, "key-action",
 +                            p_map->i_action );
                      break;
                  }
 +#else
 +            bool loop_break = false;
 +            for( int j = 0; p_map->p_keys[j] != XCB_NO_SYMBOL; j++ )
 +                if( p_map->p_keys[j] == e->detail &&
 +                    p_map->i_modifier == e->state )
 +                {
 +                    var_SetInteger( p_intf->p_libvlc, "key-action",
 +                            p_map->i_action );
 +                    loop_break = true;
 +                    break;
 +                }
 +            if( loop_break )
 +                break;
 +#endif
              }
              free( p_event );
          }
 
 --------------070000050208080500000302--
State-Changed-From-To: feedback->closed 
State-Changed-By: dougb 
State-Changed-When: Tue Nov 17 21:56:50 UTC 2009 
State-Changed-Why:  

Patch committed, thanks! 


Responsible-Changed-From-To: freebsd-ports-bugs->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Tue Nov 17 21:56:50 UTC 2009 
Responsible-Changed-Why:  

I committed the patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=137635 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/137635: commit references a PR
Date: Tue, 17 Nov 2009 22:00:25 +0000 (UTC)

 dougb       2009-11-17 22:00:02 UTC
 
   FreeBSD ports repository
 
   Modified files:
     multimedia/vlc       Makefile 
   Added files:
     multimedia/vlc/files patch-modules_control_globalhotkeys_xcb.c 
   Log:
   Add a patch to handle the bug of vlc locking up the keyboard when it starts
   
   Bump PORTREVISION
   
   Patch submitted by:     Joseph S. Atkinson <jsa.bsd@gmail.com> (Maintainer)
   
   PR:                     ports/137635
   Submitted by:           Matti Saarinen <mjsaarin@cc.helsinki.fi>
   
   Revision  Changes    Path
   1.199     +1 -0      ports/multimedia/vlc/Makefile
   1.1       +308 -0    ports/multimedia/vlc/files/patch-modules_control_globalhotkeys_xcb.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
