Bug in gdkx_XConvertCase



I posted a question a few days back regarding menu accelerators on
Sun-solaris systems. My problem was that menu shortcuts (i.e. <Control>N)
in an ItemFactory was not trigering an event on my sun-solaris machine, 
but worked fine under my linux machine.

I traced it though and discovered that the sun machine does not have
XConvertCase, and that it was using gdkx_XConvertCase as a replacement. 
This function looks incomplete though:

gdk.c:1181
  register KeySym sym = symbol;

  g_return_if_fail (lower != NULL);
  g_return_if_fail (upper != NULL);

  *lower = sym;
  *upper = sym;

This function just returns the key symbol pased to it for upper and lower.

I think something like the following should be used instead:

gdk.c:1181
  register KeySym sym = symbol;

  g_return_if_fail (lower != NULL);
  g_return_if_fail (upper != NULL);


  if(sym >= 'a' && sym <= 'z') 
  {
      *lower = sym;
      *upper = sym - 'a' + 'A';
  }else if(sym >= 'A' && sym <= 'Z') 
  {
      *lower = sym - 'A' + 'a';
      *upper = sym;
  }

Thanks
-Tom



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]