/[rdesktop]/sourceforge.net/trunk/rdesktop/xwin.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/xwin.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1463 by astrand, Fri Mar 28 11:36:15 2008 UTC revision 1464 by matthewc, Sat Apr 5 05:56:26 2008 UTC
# Line 1  Line 1 
1  /* -*- c-basic-offset: 8 -*-  /* -*- c-basic-offset: 8 -*-
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     User interface services - X Window System     User interface services - X Window System
4     Copyright (C) Matthew Chapman 1999-2007     Copyright (C) Matthew Chapman 1999-2008
5     Copyright 2007 Pierre Ossman <ossman@cendio.se> for Cendio AB     Copyright 2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
6    
7     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
# Line 110  static XIC g_IC; Line 110  static XIC g_IC;
110  static XModifierKeymap *g_mod_map;  static XModifierKeymap *g_mod_map;
111  /* Maps logical (xmodmap -pp) pointing device buttons (0-based) back  /* Maps logical (xmodmap -pp) pointing device buttons (0-based) back
112     to physical (1-based) indices. */     to physical (1-based) indices. */
113  static unsigned char g_pointer_log_to_phys_map[16];  static unsigned char g_pointer_log_to_phys_map[32];
114  static Cursor g_current_cursor;  static Cursor g_current_cursor;
115  static RD_HCURSOR g_null_cursor = NULL;  static RD_HCURSOR g_null_cursor = NULL;
116  static Atom g_protocol_atom, g_kill_atom;  static Atom g_protocol_atom, g_kill_atom;
# Line 1525  xwin_refresh_pointer_map(void) Line 1525  xwin_refresh_pointer_map(void)
1525          int i, pointer_buttons;          int i, pointer_buttons;
1526    
1527          pointer_buttons = XGetPointerMapping(g_display, phys_to_log_map, sizeof(phys_to_log_map));          pointer_buttons = XGetPointerMapping(g_display, phys_to_log_map, sizeof(phys_to_log_map));
1528          for (i = 0; i < pointer_buttons; ++i)          if (pointer_buttons > sizeof(phys_to_log_map))
1529          {                  pointer_buttons = sizeof(phys_to_log_map);
1530                  /* This might produce multiple logical buttons mapping  
1531                     to a single physical one, but hey, that's          /* if multiple physical buttons map to the same logical button, then
1532                     life... */           * use the lower numbered physical one */
1533            for (i = pointer_buttons-1; i >= 0; i--)
1534            {
1535                    /* a user could specify arbitrary values for the logical button
1536                     * number, ignore any that are abnormally large */
1537                    if (phys_to_log_map[i] > sizeof(g_pointer_log_to_phys_map))
1538                            continue;
1539                  g_pointer_log_to_phys_map[phys_to_log_map[i] - 1] = i + 1;                  g_pointer_log_to_phys_map[phys_to_log_map[i] - 1] = i + 1;
1540          }          }
1541  }  }

Legend:
Removed from v.1463  
changed lines
  Added in v.1464

  ViewVC Help
Powered by ViewVC 1.1.26