Skip to content

Commit

Permalink
Prune trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
deadmoose committed Aug 16, 2011
1 parent 81c1ca7 commit 72ea2bc
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion ChangeLog.old
Expand Up @@ -40,7 +40,7 @@ x2xwin.rc (resource description)
if buttons 4/5 are not ok. [bug from chaiken]

- Check for not becomming foreground, and try to recover, become aggresive
if events are turning up on the wrong window [Bug from Thomas]
if events are turning up on the wrong window [Bug from Thomas]

- Fix cursor warp (west) so it goes one left of return coordinate
[Bug from Thomas]
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -21,7 +21,7 @@ XORG_RELEASE_VERSION

AC_ARG_ENABLE([win32],
AS_HELP_STRING(
[--enable-win32],
[--enable-win32],
[enable Win32 support (-fromwin option). Disabled by default]))

AC_SUBST(X11_CFLAGS)
Expand Down
40 changes: 20 additions & 20 deletions keymap.c
Expand Up @@ -21,7 +21,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
//
// If the source code for the VNC system is not available from the place
// If the source code for the VNC system is not available from the place
// whence you received this file, check http://www.uk.research.att.com/vnc or contact
// the authors on vnc@uk.research.att.com for information on obtaining it.

Expand Down Expand Up @@ -123,7 +123,7 @@ static const vncKeymapping keymap[] = {
static unsigned char buf[4];
static unsigned char keystate[256];

KeyActionSpec PCtoX(UINT virtkey, DWORD keyData) {
KeyActionSpec PCtoX(UINT virtkey, DWORD keyData) {
int numkeys = 0;
int mapsize, i;
int extended;
Expand All @@ -137,7 +137,7 @@ KeyActionSpec PCtoX(UINT virtkey, DWORD keyData) {
printf(" keyData %04x ", (unsigned int) keyData);
#endif

if (extended) {
if (extended) {
#ifdef DEBUG
printf(" (extended) ");
#endif
Expand All @@ -150,18 +150,18 @@ KeyActionSpec PCtoX(UINT virtkey, DWORD keyData) {
break;
}
}

// We try looking it up in our table
mapsize = sizeof(keymap) / sizeof(vncKeymapping);

// Look up the desired code in the table
for (i = 0; i < mapsize; i++) {
if (keymap[i].wincode == virtkey) {
kas.keycodes[numkeys++] = keymap[i].Xcode;
break;
}
}

if (numkeys != 0) {
#ifdef DEBUG
UINT key = kas.keycodes[numkeys-1];
Expand All @@ -184,26 +184,26 @@ KeyActionSpec PCtoX(UINT virtkey, DWORD keyData) {
((keystate[VK_CONTROL] & 0x80) != 0) ) {

// If the key means anything in this keyboard layout
if ( (ret >= 1) &&
if ( (ret >= 1) &&
( ( (*buf >= 32) && (*buf <= 126) ) ||
( (*buf >= 160) && (*buf <= 255) ) )
( (*buf >= 160) && (*buf <= 255) ) )
) {

// Send the modifiers up, then the keystroke, then mods down
// We don't release the right control; this allows German users
// to use it for doing Ctl-@ etc. (though not under Win95 --
// see below)

if (GetKeyState(VK_LCONTROL) & 0x8000)
if (GetKeyState(VK_LCONTROL) & 0x8000)
kas.releaseModifiers |= KEYMAP_LCONTROL;

if (GetKeyState(VK_LMENU) & 0x8000)
if (GetKeyState(VK_LMENU) & 0x8000)
kas.releaseModifiers |= KEYMAP_LALT;

if (GetKeyState(VK_RMENU) & 0x8000)
if (GetKeyState(VK_RMENU) & 0x8000)
kas.releaseModifiers |= KEYMAP_RALT;

// This is for windows 95, and possibly other systems.
// This is for windows 95, and possibly other systems.
// The above GetKeyState calls don't work in 95 - they always return 0.
// But if we're here at all we know that control and alt are pressed, so let's
// raise all Control and Alt keys if we haven't registered any yet.
Expand All @@ -223,27 +223,27 @@ KeyActionSpec PCtoX(UINT virtkey, DWORD keyData) {
#ifdef DEBUG
printf("\n");
#endif
}
}

}

}

// If not a ctrl-alt key
if (numkeys == 0) {

// There are no keysyms corresponding to control characters
// Eg Ctrl F. The server already knows whether the control
// key is pressed. So we are interested in the key that would be
// There are no keysyms corresponding to control characters
// Eg Ctrl F. The server already knows whether the control
// key is pressed. So we are interested in the key that would be
// there if the Ctrl were not pressed.
keystate[VK_CONTROL] = keystate[VK_LCONTROL] = keystate[VK_RCONTROL] = 0;

ret = ToAscii(virtkey, 0, keystate, (WORD *) buf, 0);
if (ret < 0) {
switch (*buf) {
case '`' :
kas.keycodes[numkeys++] = XK_dead_grave;
kas.keycodes[numkeys++] = XK_dead_grave;
break;
case '\'' :
kas.keycodes[numkeys++] = XK_dead_acute;
kas.keycodes[numkeys++] = XK_dead_acute;
break;
case '~' :
kas.keycodes[numkeys++] = XK_dead_tilde;
Expand Down
8 changes: 4 additions & 4 deletions keymap.h
Expand Up @@ -22,7 +22,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
//
// If the source code for the VNC system is not available from the place
// If the source code for the VNC system is not available from the place
// whence you received this file, check http://www.uk.research.att.com/vnc or contact
// the authors on vnc@uk.research.att.com for information on obtaining it.

Expand All @@ -33,15 +33,15 @@
#include <X11/Xlib.h>
#include <X11/keysymdef.h>

// A single key press on the client may result in more than one
// A single key press on the client may result in more than one
// going to the server.

#define MaxKeysPerKey 4
#define VoidKeyCode XK_VoidSymbol

// keycodes contains the keysyms terminated by an VoidKeyCode.
// The releaseModifiers is a set of ORed flags indicating whether
// particular modifier-up messages should be sent before the keys
// The releaseModifiers is a set of ORed flags indicating whether
// particular modifier-up messages should be sent before the keys
// and modifier-down after.

#define KEYMAP_LCONTROL 0x0001
Expand Down
4 changes: 2 additions & 2 deletions winmsg.c
Expand Up @@ -5,7 +5,7 @@

/* This table generated from cygwin /usr/include/w32api/winuser.h
* with :
* grep WM_ /usr/include/w32api/winuser.h |
* grep WM_ /usr/include/w32api/winuser.h |
* sed 's/#define \([^ ]*\) \(.*\)/{\2,\"\1\"},/' > foo
* then edited!
*/
Expand Down Expand Up @@ -224,7 +224,7 @@ char *msgtotext(int msg)
for (i=0; i < MAX_TEXT; i++) msgstr[i] = unknown;
for (i=0; msginfo[i].num < 32767; i++) {
if (msginfo[i].num >= MAX_TEXT)
printf("Warning: ignore %d, %s\n", msginfo[i].num,
printf("Warning: ignore %d, %s\n", msginfo[i].num,
msginfo[i].msg);
else {
if (msgstr[msginfo[i].num] != unknown)
Expand Down
2 changes: 1 addition & 1 deletion x2x.c
Expand Up @@ -1632,7 +1632,7 @@ XMotionEvent *pEv; /* caution: might be pseudo-event!!! */
{
DPMSForceLevel(pShadow->dpy, DPMSModeOn);
}

XTestFakeMotionEvent(pShadow->dpy, toScreenNum,
vert?pDpyInfo->xTables[toScreenNum][pEv->x_root]:toCoord,
vert?toCoord:pDpyInfo->yTables[toScreenNum][pEv->y_root],
Expand Down

0 comments on commit 72ea2bc

Please sign in to comment.