Unverified Commit 22649369 authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/small_fixes' into 3.6.x

parents f6177d2a fac36b24
......@@ -58,21 +58,35 @@ usually you will need Mod1 and Control. Boolean in this context means
'0', 'false' and an unspecified attribute are false, anything else is
considered true.
Everything in this file is case-sensitive. Unknown lines are ignored.
Keybindings are evaluated from top to bottom, so if a keybinding
matches, other keybindings further down will be ignored. The contents
of the file replaces the default keybindings, and only one file is
read, no merging between different configuration files is done. This
also means that an empty or invalid configuration file deactivates all
Everything in this file is case-sensitive. Unknown lines are ignored
(accompanied by a warning in the session log). Keybindings are
evaluated from top to bottom, so if a keybinding matches, other
keybindings further down will be ignored. The contents of the file
replaces the default keybindings, and only one file is read, no
merging between different configuration files is done. This also means
that an empty or invalid configuration file deactivates all
keybindings.
If an attribute occurs more than once in a line the last one wins.
Some of the actions can open a dialog window. Depending on the user's
answer the selected action will be taken. Some actions will only show
a dialog informing the user about the taken action. All these dialogs
will only work if the nxagent/x2goagent process has a properly
configured NX_CLIENT environment variable pointing to an executable
(like nxdialog) that is responsible for showing the dialogs and taking
the action(s). If that executable cannot be run no dialog will show up
and no action will be taken.
List of possible 'action' attributes:
-------------------------------------
close_session
This terminates the session.
This terminates the session. If a proper dialog helper is available
ask the user if he wants to disconnect
or terminate the session and then perform the selected
action. Without proper helper it will do nothing (except writing an
error the session log)
fullscreen
Switches the client window into or out of fullscreen mode, using
......@@ -98,11 +112,15 @@ viewport_scroll_left/up/right/down
(maximum step size is 200px).
defer
Activates/deactivates deferred screen updates.
Activates/deactivates deferred screen updates. With a proper
dialog helper (see above) it will open a dialog informing the user
about the action taken.
ignore
Ignores the following keystroke, nothing will happen when this
keystroke is pressed.
keystroke is pressed. The keystroke will NOT be passed to the
clients. If you want the clients to see the keystroke you need to
eliminate the line from the config file instead of using 'ignore'.
reread_keystrokes
Forces nxagent to re-read the keystroke configuration. Useful to
......
......@@ -5,7 +5,6 @@
<keystroke action="fullscreen" Control="1" Shift="1" AltMeta="1" key="f" />
<keystroke action="minimize" Control="1" AltMeta="1" key="m" />
<keystroke action="defer" Control="1" AltMeta="1" key="e" />
<keystroke action="ignore" Control="1" AltMeta="1" key="BackSpace" />
<keystroke action="force_synchronization" Control="1" AltMeta="1" key="j" />
<keystroke action="resize" Control="1" AltMeta="1" key="r" />
<keystroke action="viewport_move_left" Control="1" Shift="1" AltMeta="1" key="Left" />
......
......@@ -127,7 +127,7 @@ XCOMM Not implemented and will always fail.
XCOMM i386Architecture
#define OptimizedCDebugFlags DefaultGcc2i386Opt
#define GNUMachineDefines -D__i386__
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
#define ServerOSDefines XFree86ServerOSDefines
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#define HasPlugin YES
#define VendorHasX11R6_3libXext YES
......
......@@ -683,7 +683,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags DefaultGcc2AxpOpt
# endif
# define LinuxMachineDefines -D__alpha__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 -DJENSEN_SUPPORT
# ifdef UseCompaqMathLibrary
# define MathLibrary -lcpml -lm
......@@ -693,7 +693,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#ifdef HPArchitecture
# define OptimizedCDebugFlags -O2 GccAliasingArgs
# define LinuxMachineDefines -D__hppa__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* HPArchitecture */
......@@ -702,7 +702,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags -O3
# endif
# define LinuxMachineDefines -D__arm__ -D__arm32__ -U__arm -Uarm
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* Arm32Achitecture */
......@@ -711,7 +711,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags -O3
# endif
# define LinuxMachineDefines -D__aarch64__ -U__arm -Uarm
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* Arm64Achitecture */
......@@ -720,7 +720,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags DefaultGcc2i386Opt
# endif
# define LinuxMachineDefines -D__i386__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* i386Architecture */
......@@ -729,7 +729,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags -O2 GccAliasingArgs
# endif
# define LinuxMachineDefines -D__ia64__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* ia64Architecture */
......@@ -738,7 +738,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags -O2 GccAliasingArgs
# endif
# define LinuxMachineDefines -D__mc68000__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* Mc68020Architecture */
......@@ -747,7 +747,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags DefaultGcc2MipsOpt
# endif
# define LinuxMachineDefines -D__mips__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif
......@@ -756,7 +756,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags DefaultGcc2MipsOpt
# endif
# define LinuxMachineDefines -D__MIPSEL__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# ifdef Mips64elArchitecture
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
# else
......@@ -770,7 +770,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags DefaultGcc2Ppc64Opt
# endif
# define LinuxMachineDefines -D__powerpc64__ -D__powerpc__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
# define ServerOSDefines XFree86ServerOSDefines -DPART_NET
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* Ppc64Architecture */
......@@ -779,7 +779,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags DefaultGcc2PpcOpt
# endif
# define LinuxMachineDefines -D__powerpc__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* PpcArchitecture */
......@@ -788,7 +788,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags -O2 -fomit-frame-pointer GccAliasingArgs
# endif
# define LinuxMachineDefines -D__s390__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* s390Architecture */
......@@ -796,7 +796,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
/*#define DefaultCCOptions -fsigned-char */
#define OptimizedCDebugFlags -O3 -fomit-frame-pointer
#define LinuxMachineDefines -D__s390x__
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
#define ServerOSDefines XFree86ServerOSDefines
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* s390xArchitecture */
......@@ -805,7 +805,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags -O2 GccAliasingArgs
# endif
# define LinuxMachineDefines -D__sparc__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define AsVISOption -Av9a
# ifdef Sparc64Architecture
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
......@@ -835,7 +835,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags -O2 SuperHArchOptFlags SuperHEndianFlags GccAliasingArgs
# endif
# define LinuxMachineDefines -D__sh__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif
......@@ -844,7 +844,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define OptimizedCDebugFlags DefaultGcc2AMD64Opt
# endif
# define LinuxMachineDefines -D__amd64__
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerOSDefines XFree86ServerOSDefines
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* AMD64Architecture */
......
......@@ -54,7 +54,7 @@ HEADERS = \
xcmiscstr.h \
bigreqstr.h \
XI.h XIproto.h \
xtestconst.h xtestext1.h xteststr.h \
xtestconst.h xteststr.h \
XKB.h XKBgeom.h XKBproto.h XKBstr.h XKBsrv.h \
Xdbeproto.h \
$(EXTRAHEADERS) \
......
......@@ -115,7 +115,7 @@ INSTPGMFLAGS =
#endif
#if BuildDamage
DAMAGEDIR = damageext
DAMAGELIB = $(DAMAGEDIR)/libdamage.a
DAMAGELIB = $(DAMAGEDIR)/libdamageext.a
#endif
#if BuildComposite
CWDIR = miext/cw
......
......@@ -73,21 +73,21 @@ XF86BIGFOBJS = xf86bigfont.o
#endif
SRCS = shape.c $(SHMSRCS) xcmisc.c\
xtest.c xtest1di.c xtest1dd.c sleepuntil.c \
xtest.c sleepuntil.c \
bigreq.c sync.c $(SCRNSAVSRC) \
$(XF86BIGFSRCS) $(SECURITYSRCS) \
$(PNRXSRCS) $(DPMSSRCS) \
$(XVSRCS) $(XRESSRCS) $(DMXSRCS)
OBJS = shape.o $(SHMOBJS) xcmisc.o \
xtest.o xtest1di.o xtest1dd.o sleepuntil.o \
xtest.o sleepuntil.o \
bigreq.o sync.o $(SCRNSAVOBJ) \
$(XF86BIGFOBJS) $(SECURITYOBJS) \
$(PNRXOBJS) $(DPMSOBJS) \
$(XVOBJS) $(XRESOBJS) $(DMXOBJS)
SOBJS = $(SHMOBJS) $(SECURITYOBJS) \
shape.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o $(PNRXOBJS) \
shape.o xtest.o sleepuntil.o $(PNRXOBJS) \
$(XF86BIGFOBJS)
#if defined(NXAgentServer) && NXAgentServer
......
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of the above listed
copyright holder(s) not be used in advertising or publicity pertaining
to distribution of the software without specific, written prior
permission.
THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef XTEST1DD_H
#define XTEST1DD_H 1
extern short xtest_mousex;
extern short xtest_mousey;
extern int playback_on;
extern ClientPtr current_xtest_client;
extern ClientPtr playback_client;
extern KeyCode xtest_command_key;
extern void stop_stealing_input(
void
);
extern void
steal_input(
ClientPtr /* client */,
CARD32 /* mode */
);
extern void
flush_input_actions(
void
);
extern void
XTestStealJumpData(
int /* jx */,
int /* jy */,
int /* dev_type */
);
extern void
XTestStealMotionData(
int /* dx */,
int /* dy */,
int /* dev_type */,
int /* mx */,
int /* my */
);
extern Bool
XTestStealKeyData(
unsigned /* keycode */,
int /* keystate */,
int /* dev_type */,
int /* locx */,
int /* locy */
);
extern void
parse_fake_input(
ClientPtr /* client */,
char * /* req */
);
extern void
XTestComputeWaitTime(
struct timeval * /* waittime */
);
extern int
XTestProcessInputAction(
int /* readable */,
struct timeval * /* waittime */
);
extern void
abort_play_back(
void
);
extern void
return_input_array_size(
ClientPtr /* client */
);
extern void XTestGenerateEvent(
int /* dev_type */,
int /* keycode */,
int /* keystate */,
int /* mousex */,
int /* mousey */
);
extern void XTestGetPointerPos(
short * /* fmousex */,
short * /* fmousey */
);
extern void XTestJumpPointer(
int /* jx */,
int /* jy */,
int /* dev_type */
);
#endif /* XTEST1DD_H */
......@@ -20,9 +20,9 @@
$(NX_DEFINES) \
$(NULL)
NormalLibraryTarget(damage,$(OBJS))
NormalLibraryTarget(damageext,$(OBJS))
NormalLibraryObjectRule()
LintLibraryTarget(damage,$(SRCS))
LintLibraryTarget(damageext,$(SRCS))
NormalLintTarget($(SRCS))
DependTarget()
......@@ -42,7 +42,6 @@ SRCS = \
Keystroke.c \
Pointer.c \
Screen.c \
TestExt.c \
Visual.c \
Drawable.c \
Window.c \
......@@ -104,7 +103,6 @@ OBJS = \
Keystroke.o \
Pointer.o \
Screen.o \
TestExt.o \
Visual.o \
Drawable.o \
Window.o \
......
......@@ -183,13 +183,13 @@ int nxagentSaveUnder;
int nxagentDoFullGeneration = 1;
/*
* 1 if agent running as X2goAgent
* 0 if NX Agent
* True if agent is running as X2goAgent
* False if agent is running as NXAgent
*/
int nxagentX2go;
Bool nxagentX2go;
/*
* Checking if agent is x2go agent
* Check if agent is x2go agent
*/
void checkX2goAgent(void)
......@@ -200,13 +200,13 @@ void checkX2goAgent(void)
fprintf(stderr, "%s: nxagentProgName [%s]\n", __func__, nxagentProgName);
#endif
if( strcasecmp(nxagentProgName,"x2goagent") == 0)
if (strcasecmp(nxagentProgName,"x2goagent") == 0)
{
fprintf(stderr, "\nrunning as X2Go Agent\n");
nxagentX2go=1;
nxagentX2go = True;
}
else
nxagentX2go=0;
nxagentX2go = False;
}
......
......@@ -647,14 +647,15 @@ N/A
if (keymap64 == NULL)
{
XFreeModifiermap(modifier_keymap);
return -1;
}
len = (max_keycode - min_keycode + 1) * mapWidth;
keymap = (KeySym *)malloc(len * sizeof(KeySym));
for(i = 0; i < len; ++i)
{
keymap[i] = keymap64[i];
}
XFree(keymap64);
}
......@@ -668,7 +669,6 @@ N/A
if (keymap == NULL)
{
XFreeModifiermap(modifier_keymap);
return -1;
}
......@@ -682,18 +682,24 @@ N/A
memset(modmap, 0, sizeof(modmap));
for (j = 0; j < 8; j++)
for(i = 0; i < modifier_keymap->max_keypermod; i++) {
{
for(i = 0; i < modifier_keymap->max_keypermod; i++)
{
CARD8 keycode;
if ((keycode =
modifier_keymap->
modifiermap[j * modifier_keymap->max_keypermod + i]))
{
modmap[keycode] |= 1<<j;
}
if (keycode > 0)
{
nxagentCheckModifierMasks(keycode, j);
}
}
}
XFreeModifiermap(modifier_keymap);
modifier_keymap = NULL;
......@@ -747,13 +753,10 @@ XkbError:
#ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Using XKB extension.\n");
#endif
#ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL");
#endif
if (nxagentX2go == 1 && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0))
if (nxagentX2go && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0))
{
#ifdef TEST
fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__);
......@@ -779,10 +782,9 @@ XkbError:
{
for (i = 0; nxagentKeyboard[i] != '/' && nxagentKeyboard[i] != 0; i++);
if(nxagentKeyboard[i] == 0 || nxagentKeyboard[i + 1] == 0 || i == 0)
if (nxagentKeyboard[i] == 0 || nxagentKeyboard[i + 1] == 0 || i == 0)
{
ErrorF("Warning: Wrong keyboard type: %s.\n", nxagentKeyboard);
goto XkbError;
}
......@@ -842,7 +844,7 @@ XkbError:
{
#ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Using default keyboard: model [%s] layout [%s].\n",
model, layout);
model?model:"(default)", layout?layout:"(default)");
#endif
}
......@@ -872,8 +874,10 @@ XkbError:
* method for switching that off is the creation of a dir
* instead of a file.
*/
if (nxagentX2go == 1)
if (nxagentX2go)
{
nxagentWriteKeyboardDir();
}
}
else
{
......@@ -890,8 +894,10 @@ XkbError:
* know about that yet. Once x2go starts using clone
* we can drop this here.
*/
if (nxagentX2go == 1)
if (nxagentX2go)
{
nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions);
}
}
}
#ifdef DEBUG
......@@ -905,19 +911,20 @@ XkbError:
if (xkb && xkb->geom)
{
XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb);
XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb);
}
#ifdef TEST
else
{
fprintf(stderr, "nxagentKeyboardProc: No current keyboard.\n");
fprintf(stderr, "nxagentKeyboardProc: No current keyboard.\n");
}
#endif
#ifdef DEBUG
fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device: "
"[rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n",
rules, model, layout, variant, options);
rules?rules:"(default)", model?model:"(default)", layout?layout:"(default)",
variant?variant:"(default)", options?options:"(default)");
#endif
XkbSetRulesDflts(rules, model, layout, variant, options);
......@@ -931,7 +938,7 @@ XkbError:
if (xkb && xkb->geom)
{
XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls);
XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls);
}
if (nxagentOption(Shadow) == 1 && pDev && pDev->key)
......@@ -942,8 +949,8 @@ XkbError:
if (xkb)
{
XkbFreeKeyboard(xkb, XkbAllComponentsMask, True);
xkb = NULL;
XkbFreeKeyboard(xkb, XkbAllComponentsMask, True);
xkb = NULL;
}
free(model);
......
......@@ -113,8 +113,6 @@ struct nxagentSpecialKeystrokeMap default_map[] = {
{KEYSTROKE_FULLSCREEN, ControlMask | ShiftMask, True, XK_f},
{KEYSTROKE_MINIMIZE, ControlMask, True, XK_m},
{KEYSTROKE_DEFER, ControlMask, True, XK_e},
{KEYSTROKE_IGNORE, ControlMask, True, XK_BackSpace},
{KEYSTROKE_IGNORE, 0, False, XK_Terminate_Server},
{KEYSTROKE_FORCE_SYNCHRONIZATION, ControlMask, True, XK_j},
#ifdef DUMP
{KEYSTROKE_REGIONS_ON_SCREEN, ControlMask, True, XK_a},
......
......@@ -29,19 +29,6 @@
#include "Xos.h"
#include "Millis.h"
#ifdef DDXTIME
CARD32 GetTimeInMillis()
{
struct timeval ts;
X_GETTIMEOFDAY(&ts);
return(ts.tv_sec * 1000) + (ts.tv_usec / 1000);
}
#endif
const char *GetTimeAsString()
{
char *value;
......
......@@ -28,8 +28,6 @@
#include "Xmd.h"
CARD32 GetTimeInMillis(void);
const char *GetTimeInMillisAsString(void);
const char *GetTimeAsString(void);
......
......@@ -154,10 +154,10 @@ damagePolyText8(DrawablePtr pDrawable,
DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
if (checkGCDamage (pDrawable, pGC))
damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
x = damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
Linear8Bit, TT_POLY8);
x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars);
else
x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars);
DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
return x;
......@@ -174,11 +174,11 @@ damagePolyText16(DrawablePtr pDrawable,
DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
if (checkGCDamage (pDrawable, pGC))
damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
x = damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit,
TT_POLY16);
x = (*pGC->ops->PolyText16)(pDrawable, pGC, x, y, count, chars);
else
x = (*pGC->ops->PolyText16)(pDrawable, pGC, x, y, count, chars);
DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
return x;
......@@ -197,8 +197,8 @@ damageImageText8(DrawablePtr pDrawable,
if (checkGCDamage (pDrawable, pGC))
damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
Linear8Bit, TT_IMAGE8);
(*pGC->ops->ImageText8)(pDrawable, pGC, x, y, count, chars);
else
(*pGC->ops->ImageText8)(pDrawable, pGC, x, y, count, chars);
DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
}
......@@ -217,8 +217,8 @@ damageImageText16(DrawablePtr pDrawable,
damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit,
TT_IMAGE16);
(*pGC->ops->ImageText16)(pDrawable, pGC, x, y, count, chars);
else
(*pGC->ops->ImageText16)(pDrawable, pGC, x, y, count, chars);
DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
}
......
......@@ -278,9 +278,9 @@ Dispatch(void)
if (!clientReady)
return;
#ifdef WATCH
#ifdef WATCH
fprintf(stderr, "Dispatch: Watchpoint 12.\n");
fprintf(stderr, "Dispatch: Watchpoint 12.\n");
/*
Reply Total Cached Bits In Bits Out Bits/Reply Ratio
......@@ -294,22 +294,22 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
#98 1 256 bits (0 KB) -> 34 bits (0 KB) -> 256/1 -> 34/1 = 7.529:1
*/
sleep(30);
sleep(30);
#endif
#endif
#ifdef TEST
fprintf(stderr, "Dispatch: Value of dispatchException is [%x].\n",
dispatchException);
#ifdef TEST
fprintf(stderr, "Dispatch: Value of dispatchException is [%x].\n",
dispatchException);
fprintf(stderr, "Dispatch: Value of dispatchExceptionAtReset is [%x].\n",
dispatchExceptionAtReset);
#endif
fprintf(stderr, "Dispatch: Value of dispatchExceptionAtReset is [%x].\n",
dispatchExceptionAtReset);
#endif
if (!(dispatchException & DE_TERMINATE))
dispatchException = 0;
if (!(dispatchException & DE_TERMINATE))
dispatchException = 0;
while (!dispatchException)
while (!dispatchException)
{
if (*icheck[0] != *icheck[1])
{
......@@ -626,7 +626,7 @@ ProcReparentWindow(register ClientPtr client)
int
ProcQueryTree(register ClientPtr client)
{
xQueryTreeReply reply;
xQueryTreeReply reply = {0};
int numChildren = 0;
register WindowPtr pChild, pWin, pHead;
Window *childIDs = (Window *)NULL;
......@@ -637,7 +637,6 @@ ProcQueryTree(register ClientPtr client)
DixReadAccess);
if (!pWin)
return(BadWindow);
memset(&reply, 0, sizeof(xQueryTreeReply));
reply.type = X_Reply;
reply.root = pWin->drawable.pScreen->root->drawable.id;
reply.sequenceNumber = client->sequence;
......@@ -720,8 +719,6 @@ ProcSetSelectionOwner(register ClientPtr client)
i++;
if (i < NumCurrentSelections)
{
xEvent event = {0};
/* If the timestamp in client's request is in the past relative
to the time stamp indicating the last time the owner of the
selection was set, do not set the selection, just return
......@@ -732,6 +729,7 @@ ProcSetSelectionOwner(register ClientPtr client)
if (CurrentSelections[i].client &&
(!pWin || (CurrentSelections[i].client != client)))
{
xEvent event = {0};
event.u.u.type = SelectionClear;
event.u.selectionClear.time = time.milliseconds;
event.u.selectionClear.window = CurrentSelections[i].window;
......@@ -765,7 +763,7 @@ ProcSetSelectionOwner(register ClientPtr client)
CurrentSelections[i].client = (pWin ? client : NullClient);
if (SelectionCallback)
{
SelectionInfoRec info;
SelectionInfoRec info = {0};
info.selection = &CurrentSelections[i];
info.kind= SelectionSetOwner;
......@@ -1309,6 +1307,9 @@ CloseDownClient(register ClientPtr client)
CallCallbacks((&ClientStateCallback), (void *)&clientinfo);
}
FreeClientResources(client);
/* Disable client ID tracking. This must be done after
* ClientStateCallback. */
ReleaseClientIds(client);
if (client->index < nextFreeClientID)
nextFreeClientID = client->index;
clients[client->index] = NullClient;
......
......@@ -1021,8 +1021,6 @@ SaveScreens(int on, int mode)
if (on == SCREEN_SAVER_FORCER)
{
UpdateCurrentTimeIf();
lastDeviceEventTime = currentTime;
if (mode == ScreenSaverReset)
what = SCREEN_SAVER_OFF;
else
......
......@@ -365,7 +365,7 @@ typedef struct _AgentOptions
int DeferLevel;
/*
* Maxuimum elapsed time before a new full
* Maximum elapsed time before a new full
* synchronization.
*/
......
......@@ -134,7 +134,7 @@ static enum RECONNECTION_STEP failedStep;
/*
* Path of state File
*/
char stateFile[PATH_MAX];
char stateFile[PATH_MAX] = {0};
void setStatePath(char* path)
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) */
/* Copyright (c) 2008-2014 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> */
/* Copyright (c) 2011-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/
/* Copyright (c) 2014-2016 Mihai Moldovan <ionic@ionic.de> */
/* Copyright (c) 2014-2016 Ulrich Sibiller <uli42@gmx.de> */
/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of the aforementioned persons and companies. */
/* */
/* Redistribution and use of the present software is allowed according */
/* to terms specified in the file LICENSE which comes in the source */
/* distribution. */
/* */
/* All rights reserved. */
/* */
/* NOTE: This software has received contributions from various other */
/* contributors, only the core maintainers and supporters are listed as */
/* copyright holders. Please contact us, if you feel you should be listed */
/* as copyright holder, as well. */
/* */
/**************************************************************************/
/*
Copyright 1993 by Davor Matic
Permission to use, copy, modify, distribute, and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation. Davor Matic makes no representations about
the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
#include <nx-X11/Xlib.h>
#undef Bool
#include "screenint.h"
#include "input.h"
#include "misc.h"
#include "scrnintstr.h"
#include "servermd.h"
#include "mipointer.h"
#define XTestSERVER_SIDE
#include "xtestext1.h"
extern CARD32 nxagentLastEventTime;
void XTestGetPointerPos(short *fmousex, short *fmousey);
void XTestJumpPointer(int jx, int jy, int dev_type);
void XTestGenerateEvent(int dev_type, int keycode, int keystate,
int mousex, int mousey);
void XTestGetPointerPos(short *fmousex, short *fmousey)
{
int x,y;
miPointerPosition(&x, &y);
*fmousex = x;
*fmousey = y;
}
void XTestJumpPointer(int jx, int jy, int dev_type)
{
miPointerAbsoluteCursor(jx, jy, GetTimeInMillis());
}
void XTestGenerateEvent(int dev_type, int keycode, int keystate,
int mousex, int mousey)
{
/*
xEvent tevent;
tevent.u.u.type = (dev_type == XE_POINTER) ?
(keystate == XTestKEY_UP) ? ButtonRelease : ButtonPress :
(keystate == XTestKEY_UP) ? KeyRelease : KeyPress;
tevent.u.u.detail = keycode;
tevent.u.keyButtonPointer.rootX = mousex;
tevent.u.keyButtonPointer.rootY = mousey;
tevent.u.keyButtonPointer.time = nxagentLastEventTime = GetTimeInMillis();
mieqEnqueue(&tevent);
*/
}
......@@ -171,9 +171,6 @@ typedef void (*InitExtension)(void);
#endif
/* FIXME: this whole block of externs should be from the appropriate headers */
#ifdef XTESTEXT1
extern void XTestExtension1Init(void);
#endif
#ifdef SHAPE
extern void ShapeExtensionInit(void);
#endif
......@@ -382,9 +379,6 @@ InitExtensions(argc, argv)
if (!noPanoramiXExtension) PanoramiXExtensionInit();
# endif
#endif
#ifdef XTESTEXT1
if (!noTestExtensions) XTestExtension1Init();
#endif
#ifdef SHAPE
if (!noShapeExtension) ShapeExtensionInit();
#endif
......
......@@ -143,13 +143,6 @@ mffs(fd_mask mask)
#include <nx-X11/extensions/dpms.h>
#endif
#ifdef XTESTEXT1
/*
* defined in xtestext1dd.c
*/
extern int playback_on;
#endif /* XTESTEXT1 */
struct _OsTimerRec {
OsTimerPtr next;
CARD32 expires;
......@@ -244,13 +237,6 @@ WaitForSomething(int *pClientsReady)
BlockHandler((void *)&wt, (void *)&LastSelectMask);
if (NewOutputPending)
FlushAllOutput();
#ifdef XTESTEXT1
/* XXX how does this interact with new write block handling? */
if (playback_on) {
wt = &waittime;
XTestComputeWaitTime (&waittime);
}
#endif /* XTESTEXT1 */
#if defined(NX_TRANS_SOCKET) && defined(NX_TRANS_WAKEUP)
......@@ -375,11 +361,7 @@ WaitForSomething(int *pClientsReady)
#endif
selecterr = GetErrno();
WakeupHandler(i, (void *)&LastSelectMask);
#ifdef XTESTEXT1
if (playback_on) {
i = XTestProcessInputAction (i, &waittime);
}
#endif /* XTESTEXT1 */
SmartScheduleStartTimer ();
if (i <= 0) /* An error or timeout occurred */
......
......@@ -389,7 +389,7 @@ char tmpname[PATH_MAX];
#ifdef __sun
if (Pclose(out) != 0)
{
ErrorF("Warning: Spurious failure reported in Pclose() runnning 'xkbcomp'.\n");
ErrorF("Warning: Spurious failure reported in Pclose() running 'xkbcomp'.\n");
}
if (1)
#else
......
......@@ -180,7 +180,7 @@ def show_yes_no_suspend_box(title, text):
@param title: Message box title
@type text: str
@param text: Message box text
@return: Choosen action
@return: Chosen action
"""
dlg = Gtk.MessageDialog(type=Gtk.MessageType.QUESTION,
......@@ -207,7 +207,7 @@ def show_yes_no_box(title, text):
@param title: Message box title
@type text: str
@param text: Message box text
@return: Choosen action
@return: Chosen action
"""
dlg = Gtk.MessageDialog(type=Gtk.MessageType.QUESTION,
......@@ -227,12 +227,12 @@ def show_yes_no_box(title, text):
def handle_session_action(agentpid, action):
""" Execute session action choosen by user.
""" Execute session action chosen by user.
@type agentpid: int
@param agentpid: Nxagent process id as passed by command line
@type action: int or None
@param action: Choosen action
@param action: Chosen action
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment