~ubuntu-branches/ubuntu/saucy/m17n-lib/saucy

« back to all changes in this revision

Viewing changes to src/m17n-X.c

  • Committer: Bazaar Package Importer
  • Author(s): Harshula Jayasuriya
  • Date: 2010-11-23 01:39:29 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101123013929-rs3kpqgu4kr3qx32
Tags: 1.6.2-1
* New upstream release 1.6.2.
* Update Standards-Version to Debian Policy 3.9.1. (No changes)
* debian/control: Depends: m17n-db and m17n-contrib. (Closes: #599643)
* PATCH: (make_locale): Don't call setlocale.  Just parse the arg NAME.
         (Closes: #601858)

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
  int alt_mask;
85
85
  int super_mask;
86
86
  int hyper_mask;
 
87
  int altgr_mask;
87
88
 
88
89
  Atom MULE_BASELINE_OFFSET;
89
90
  Atom AVERAGE_WIDTH;
258
259
  KeyCode super_r = XKeysymToKeycode (display, XK_Super_R);
259
260
  KeyCode hyper_l = XKeysymToKeycode (display, XK_Hyper_L);
260
261
  KeyCode hyper_r = XKeysymToKeycode (display, XK_Hyper_R);
 
262
#ifdef XK_XKB_KEYS
 
263
  KeyCode altgr = XKeysymToKeycode (display, XK_ISO_Level3_Shift);
 
264
#endif
261
265
  int i, j;
262
266
 
263
267
  mods = XGetModifierMapping (display);
278
282
          disp_info->super_mask |= (1 << i);
279
283
        else if (code == hyper_l || code == hyper_r)
280
284
          disp_info->hyper_mask |= (1 << i);
 
285
#ifdef XK_XKB_KEYS
 
286
        else if (code == altgr)
 
287
          disp_info->altgr_mask |= (1 << i);
 
288
#endif
281
289
      }
282
290
 
283
291
  /* If meta keys are not in any modifier, use alt keys as meta
1813
1821
{
1814
1822
  XRectangle rect;
1815
1823
  XClipBox (region, &rect);
1816
 
  fprintf (stderr, "(%d %d %d %d)\n", rect.x, rect.y, rect.width, rect.height);
 
1824
  fprintf (mdebug__output, "(%d %d %d %d)\n", rect.x, rect.y, rect.width, rect.height);
1817
1825
}
1818
1826
 
1819
1827
 
1910
1918
    default: event_name = "unknown";
1911
1919
    }
1912
1920
 
1913
 
  fprintf (stderr, "%s: %s\n", win_name, event_name);
 
1921
  fprintf (mdebug__output, "%s: %s\n", win_name, event_name);
1914
1922
}
1915
1923
#endif
1916
1924
 
2017
2025
    return Mnil;
2018
2026
  if (keysym >= XK_Shift_L && keysym <= XK_Hyper_R)
2019
2027
    return Mnil;
 
2028
#ifdef XK_XKB_KEYS
 
2029
  if ((keysym & 0xff00) == 0xfe00)
 
2030
    return Mnil;
 
2031
#endif
2020
2032
  if (len == 1 && keysym >= XK_space && keysym <= XK_asciitilde)
2021
2033
    {
2022
2034
      int c = keysym;
2045
2057
    *modifiers |= MINPUT_KEY_SUPER_MODIFIER;
2046
2058
  if (((XKeyEvent *) event)->state & disp_info->hyper_mask)
2047
2059
    *modifiers |= MINPUT_KEY_HYPER_MODIFIER;
2048
 
 
 
2060
#ifdef XK_XKB_KEYS
 
2061
  if (((XKeyEvent *) event)->state & disp_info->altgr_mask)
 
2062
    *modifiers |= MINPUT_KEY_ALTGR_MODIFIER;
 
2063
#endif
2049
2064
  return key;
2050
2065
}
2051
2066
 
2062
2077
  for (i = 0; i <= GC_INVERSE; i++)
2063
2078
    {
2064
2079
      XGetGCValues (display, info->gc[i], valuemask, &values);
2065
 
      fprintf (stderr, "GC%d: fore/#%lX back/#%lX", i,
 
2080
      fprintf (mdebug__output, "GC%d: fore/#%lX back/#%lX", i,
2066
2081
               values.foreground, values.background);
2067
 
      fprintf (stderr, "\n");
 
2082
      fprintf (mdebug__output, "\n");
2068
2083
    }
2069
2084
}
2070
2085