aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:57 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:57 +0200
commite9132da09462b3d2607a97e2f580cbd3144819eb (patch)
tree2dfc6a37f2be48a8e61f37d62565e83be4b73186
parent6f5e20bc49695159bd3b313333591c4eb27ad422 (diff)
downloadnx-libs-e9132da09462b3d2607a97e2f580cbd3144819eb.tar.gz
nx-libs-e9132da09462b3d2607a97e2f580cbd3144819eb.tar.bz2
nx-libs-e9132da09462b3d2607a97e2f580cbd3144819eb.zip
Imported nxagent-3.4.0-11.tar.gznxagent/3.4.0-11
Summary: Imported nxagent-3.4.0-11.tar.gz Keywords: Imported nxagent-3.4.0-11.tar.gz into Git repository
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Agent.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Atoms.c32
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Atoms.h6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Binder.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Binder.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/CHANGELOG200
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c28
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Colormap.c21
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Colormap.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Composite.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Composite.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Cursor.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Cursor.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Dialog.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Dialog.h6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c40
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.c98
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Error.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Error.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c924
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.h9
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Extensions.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Extensions.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Font.c18
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Font.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GC.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GCOps.c91
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GCOps.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GCs.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.c30
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Holder.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Holder.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Icons.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Image.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Image.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Imakefile3
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Init.c8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Init.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c5
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keystroke.c121
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keystroke.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/LICENSE2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Literals.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Millis.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Millis.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXextension.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXextension.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglyph.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglyph.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXpicture.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXpicture.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXproperty.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXproperty.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXrandr.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXrandr.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXrender.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXrender.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXwindow.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXwindow.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXxrandr.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXxrandr.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXxrandrint.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Options.c15
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Options.h9
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixels.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixels.h22
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmap.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pointer.c38
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pointer.h13
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c16
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Render.c285
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Render.h6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Rootless.c111
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Rootless.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c424
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.h15
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Splash.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Splash.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Split.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Split.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/TestExt.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Trap.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Trap.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Utils.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Visual.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Visual.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c313
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Windows.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c26
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c.NX.original26
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c110
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c.NX.original110
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c51
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c.NX.original51
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c62
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.NX.original62
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c.NX.original4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/os2Stub.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/screensaver4
161 files changed, 2837 insertions, 1066 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Agent.h b/nx-X11/programs/Xserver/hw/nxagent/Agent.h
index f976fd768..3f2c93fdb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Agent.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Agent.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index 5d344729c..c2e58bd58 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -1208,7 +1208,7 @@ static void nxagentParseOptions(char *name, char *value)
{
nxagentChangeOption(ClientOs, ClientOsSolaris);
}
- else if (strcmp(value, "mac") == 0)
+ else if (strcmp(value, "macosx") == 0)
{
nxagentChangeOption(ClientOs, ClientOsMac);
}
@@ -1512,7 +1512,7 @@ N/A
int splitMode = 0;
int splitSize = 0;
- unsigned int packMethod = PACK_NONE;
+ unsigned int packMethod = PACK_NONE;
unsigned int packQuality = 9;
int dataLevel = 0;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.h b/nx-X11/programs/Xserver/hw/nxagent/Args.h
index 43d7ec779..92650a4a0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
index ac26646ae..171df95a9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -66,19 +66,21 @@ Atom nxagentAtoms[NXAGENT_NUMBER_OF_ATOMS];
static char *nxagentAtomNames[NXAGENT_NUMBER_OF_ATOMS + 1] =
{
- "NX_IDENTITY", /* 0 */
- "WM_PROTOCOLS", /* 1 */
- "WM_DELETE_WINDOW", /* 2 */
- "WM_NX_READY", /* 3 */
- "MCOPGLOBALS", /* 4 */
- "NX_CUT_BUFFER_SERVER", /* 5 */
- "TARGETS", /* 6 */
- "TEXT", /* 7 */
- "NX_AGENT_SIGNATURE", /* 8 */
- "NXDARWIN", /* 9 */
- "CLIPBOARD", /* 10 */
- "TIMESTAMP", /* 11 */
- "UTF8_STRING", /* 12 */
+ "NX_IDENTITY", /* 0 */
+ "WM_PROTOCOLS", /* 1 */
+ "WM_DELETE_WINDOW", /* 2 */
+ "WM_NX_READY", /* 3 */
+ "MCOPGLOBALS", /* 4 */
+ "NX_CUT_BUFFER_SERVER", /* 5 */
+ "TARGETS", /* 6 */
+ "TEXT", /* 7 */
+ "NX_AGENT_SIGNATURE", /* 8 */
+ "NXDARWIN", /* 9 */
+ "CLIPBOARD", /* 10 */
+ "TIMESTAMP", /* 11 */
+ "UTF8_STRING", /* 12 */
+ "_NET_WM_STATE", /* 13 */
+ "_NET_WM_STATE_FULLSCREEN", /* 14 */
NULL,
NULL
};
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.h b/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
index 17b2d8f57..f49f2751e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -22,7 +22,7 @@
#include "../../include/window.h"
#include "screenint.h"
-#define NXAGENT_NUMBER_OF_ATOMS 14
+#define NXAGENT_NUMBER_OF_ATOMS 16
extern Atom nxagentAtoms[NXAGENT_NUMBER_OF_ATOMS];
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Binder.c b/nx-X11/programs/Xserver/hw/nxagent/Binder.c
index cfea2cc77..34433bd2b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Binder.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Binder.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Binder.h b/nx-X11/programs/Xserver/hw/nxagent/Binder.h
index 928db74fb..e0da3e357 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Binder.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Binder.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/CHANGELOG b/nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
index 1f7f0df55..3f0a6abcd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
+++ b/nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
@@ -1,5 +1,205 @@
ChangeLog:
+nxagent-3.4.0-11
+
+- Corrected switching between viewport mode and resize mode.
+
+- Fixed TR04H02340. Keycode is correctly translated in shadow sessions
+ also if the remote X display is using evdev.
+
+nxagent-3.4.0-10
+
+- Handled XGrabKeyboard() return value.
+
+- Fixed TR10D01512. NumLock and CapsLock keys are now synchronized
+ between local and remote.
+
+nxagent-3.4.0-9
+
+- Fixed TR06H02362. No icon was swown in the task bar.
+
+- Fixed keyboard grab in fullscreen mode.
+
+- Fixed compiler warnings.
+
+nxagent-3.4.0-8
+
+- Grab the keyboard in fullscreen mode on EnterNotify only if mode is
+ 'NotifyNormal'.
+
+- Yield control in the dispatch loop in case we stop the smart sche-
+ duler timer while waiting for a reply from the remote display.
+
+nxagent-3.4.0-7
+
+- Fixed TR08D01478. The communication with the compiz window manager
+ by means of the _NET_WM_PING property was not handled properly.
+
+- Fixed a type mismatch in XKB events on 64 bit platforms.
+
+- Moved grab/ungrab keyboard from focus in/out event to enter/leave
+ notify event.
+
+- Removed nxagentIconWindow because it's not longer used.
+
+nxagent-3.4.0-6
+
+- Fixed TR09F02102. Problem was with pointer buttons map.
+
+- Fixed TR02H02327. Some KeyRelease events was discarded.
+
+- Fixed up Num and Caps locks.
+
+- Fixed TR03H02335. Emulated right mouse button for Mac clients.
+
+- Added utilities to print info about internal and remote windows.
+
+- Fixed TR01F01995. Solved a picture resource leak by destroying remo-
+ te pictures only when their reference counter returns to zero.
+
+- Fixed TR04H02337. Errors occurred because pictures with no drawable
+ were handled badly.
+
+- Implemented handling nxagent's private for gradient pictures and so-
+ lid fill picture.
+
+- Fixed BadMatch condition check in function ProcRenderComposite.
+
+- Fixed nxagentComposite() to handle situations with source picture
+ drawable pointing to NULL.
+
+- Implemented render acceleration for requests: CreateSolidFill,
+ CreateLinearGradient, CreateRadialGradient, CreateConicalGradient.
+
+- Fixed TR03G02196. Dialogs are shown to the fore when the NX session
+ is in fullscreen mode.
+
+- Changed mechanism to switch to fullscreen mode. Now the override
+ redirect attribute is no longer used and _NET_WM_STATE_FULLSCREEN
+ hint is sent to the WM.
+
+nxagent-3.4.0-5
+
+- Updated copyright to year 2010.
+
+nxagent-3.4.0-4
+
+- Fixed TR07F02090. Now XDMCP sessions start without problems.
+
+- Fixed TR08G02259. Corrected window border granularity of rootless
+ session at reconnection on 64 bit platforms.
+
+- Fixed TR11G02290. Forcing null timeout with queued events only if
+ display connection is up. This prevents the flood of session log.
+
+- Fixed TR10G02287. Now QueryTree's loop is aborted in case of failure
+ and session log isn't filled anymore with repeated warning messages.
+
+- Fixed TR01G02154. Corrected window placement when switching between
+ fullscreen and windowed mode.
+
+- Fixed TR09G02276. Now the agent does not receive unwanted characters
+ while interacting with the local window manager.
+
+- Implemented FR02G02174. Added ability to do large screen pans in
+ viewport mode through key combination Ctrl+Alt+Shift+Arrow.
+
+- Corrected parsing of the 'client' option when the client OS is Mac.
+
+nxagent-3.4.0-3
+
+- Fixed TR09G02271. The array containing the font name fields was not
+ correctly initialized for non-standard font names.
+
+nxagent-3.4.0-2
+
+- Updated copyright to year 2009.
+
+nxagent-3.4.0-1
+
+- Opened the 3.4.0 branch based on nxagent-3.3.0-19.
+
+- Changed the printed version number.
+
+nxagent-3.3.0-19
+
+- Fixed TR09G02266. A proper error message is printed in the session
+ log if the shadowing initialization fails because of a mismatch in
+ the visual class.
+
+- Added a workaround for X servers that doesn't return 1 among the
+ available depths.
+
+nxagent-3.3.0-18
+
+- The area to restore from the backing store is limited by the screen
+ size instead of the visible screen.
+
+nxagent-3.3.0-17
+
+- Fixed TR12F02150. The agent could crash when copying text from VNC
+ viewer. Fixed by aborting the procedure in case the retrieved pro-
+ perty has not a valid format.
+
+nxagent-3.3.0-16
+
+- Fixed TR07G02247. Don't try to call XSetWindowColormap() if the
+ window has no colormap, e.g. if its class is InputOnly.
+
+nxagent-3.3.0-15
+
+- Fixed TR04G02210. Region is cut to the visible screen before re-
+ storing areas from the backing store.
+
+- Fixed TR07G02246. Box is shrinked if bounds can't stay in a short
+ signed integer.
+
+nxagent-3.3.0-14
+
+- Fixed TR03G02206. waitpid() call was missing for the "Fonts replace-
+ ment" dialog type.
+
+- Fixed TR03G02195. Added a properties structure compatible with 32
+ and 64 bit platform types.
+
+nxagent-3.3.0-13
+
+- Handle the window unmap immediately. Don't add it to the configure
+ queue.
+
+nxagent-3.3.0-12
+
+- Fixed TR03G02200. Timestamps could be in the future in KeyRelease
+ events sent to the X clients.
+
+- Added debug logging of input devices state Logging can be enabled
+ or disabled via the Ctrl+Alt+x shortcut. State info is dumped every
+ 5 seconds.
+
+- Added Ctrl+Alt+y shortcut used to deactivate input devices grab for
+ debug purposes.
+
+nxagent-3.3.0-11
+
+- Changed the message logging the screen size changes, in order to
+ show the fullscreen state.
+
+- Handle the window unmapping in the nxagentConfigureWindow queue.
+
+nxagent-3.3.0-10
+
+- Fixed TR12F02146. Compare the drawable and the bitmap data before
+ realizing the image update, in order to delay the data clean up that
+ caused the memcmp() failure.
+
+- Fixed TR01G02156. Reduce the exposing area by subtracting the ex-
+ posed region.
+
+- Fixed a compile warning in Drawable.c.
+
+- Added detailed logs in the nxagentSynchronizeRegion() function if
+ the data memory allocation fails.
+
nxagent-3.3.0-9
- Added /usr/NX/share/base to alternate font paths. This would fix
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c
index 7e86a03d2..acfaab7c0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.h b/nx-X11/programs/Xserver/hw/nxagent/Client.h
index 5f9fa1ebb..45f87fc66 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index a575cabe5..eb830234d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -680,6 +680,30 @@ void nxagentCollectPropertyEvent(int resource)
return;
}
+
+ if (resultFormat != 8 && resultFormat != 16 && resultFormat != 32)
+ {
+
+ #ifdef DEBUG
+ fprintf (stderr, "nxagentCollectPropertyEvent: WARNING! Invalid property "
+ "value.\n");
+ #endif
+
+ if (lastClientClientPtr != NULL)
+ {
+ nxagentSendSelectionNotify(None);
+ }
+
+ lastClientWindowPtr = NULL;
+ lastClientStage = SelectionStageNone;
+
+ if (pszReturnData != NULL)
+ {
+ XFree(pszReturnData);
+ }
+
+ return;
+ }
switch (lastClientStage)
{
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h
index 912260b8b..2750ddfd2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c
index 75758679f..259aa3b24 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -291,9 +291,20 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen)
pCmap = (ColormapPtr)LookupIDByType(pScreen->defColormap,
RT_COLORMAP);
- XSetWindowColormap(nxagentDisplay,
- nxagentDefaultWindows[pScreen->myNum],
- nxagentColormap(pCmap));
+ if (pCmap != NULL)
+ {
+ XSetWindowColormap(nxagentDisplay,
+ nxagentDefaultWindows[pScreen->myNum],
+ nxagentColormap(pCmap));
+ }
+ #ifdef WARNING
+ else
+ {
+ fprintf(stderr, "nxagentSetInstalledColormapWindows: WARNING! "
+ "Window at [%p] has no colormap with class [%d].\n",
+ pWin, pWin -> drawable.class);
+ }
+ #endif
}
#endif /* DUMB_WINDOW_MANAGERS */
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Colormap.h b/nx-X11/programs/Xserver/hw/nxagent/Colormap.h
index b0cb2dc5e..8321e8038 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Colormap.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Colormap.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Composite.c b/nx-X11/programs/Xserver/hw/nxagent/Composite.c
index 9bdbac1b1..b0640ff11 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Composite.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Composite.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Composite.h b/nx-X11/programs/Xserver/hw/nxagent/Composite.h
index 5ec1e9888..fb1d6d8e9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Composite.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Composite.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
index 3ca29fa5e..141ba3a64 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Cursor.h b/nx-X11/programs/Xserver/hw/nxagent/Cursor.h
index ea1bb30f3..11e407efd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Cursor.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Cursor.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
index c1db78344..2f807b1dc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h
index 135cd2df3..aa845c7c2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -42,7 +42,7 @@ extern int nxagentKillDialogPid;
extern int nxagentSuspendDialogPid;
extern int nxagentRootlessDialogPid;
extern int nxagentPulldownDialogPid;
-extern int nxagentFontsReplacement;
+extern int nxagentFontsReplacementDialogPid;
extern int nxagentEnableRandRModeDialogPid;
extern int nxagentDisableRandRModeDialogPid;
extern int nxagentEnableDeferModePid;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 9f257e508..1a57788e6 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -453,6 +453,21 @@ static void nxagentSigchldHandler(int signal)
}
}
+ if (pid == 0 && nxagentFontsReplacementDialogPid)
+ {
+ pid = waitpid(nxagentFontsReplacementDialogPid, &status, options);
+
+ if (pid == -1 && errno == ECHILD)
+ {
+ #ifdef WARNING
+ fprintf(stderr, "nxagentSigchldHandler: Got ECHILD waiting for child %d (Fonts replacement).\n",
+ nxagentFontsReplacementDialogPid);
+ #endif
+
+ pid = nxagentFontsReplacementDialogPid = 0;
+ }
+ }
+
if (pid == 0 && nxagentEnableRandRModeDialogPid)
{
pid = waitpid(nxagentEnableRandRModeDialogPid, &status, options);
@@ -1609,19 +1624,30 @@ void nxagentInitPixmapFormats()
nxagentNumPixmapFormats = 0;
- nxagentPixmapFormats = xalloc(nxagentNumDepths * sizeof(XPixmapFormatValues));
+/*
+XXX: Some X server doesn't list 1 among available depths...
+*/
+
+ nxagentPixmapFormats = xalloc((nxagentNumDepths + 1) * sizeof(XPixmapFormatValues));
for (i = 1; i <= MAXDEPTH; i++)
{
depth = 0;
- for (j = 0; j < nxagentNumDepths; j++)
+ if (i == 1)
+ {
+ depth = 1;
+ }
+ else
{
- if (nxagentDepths[j] == i)
+ for (j = 0; j < nxagentNumDepths; j++)
{
- depth = i;
+ if (nxagentDepths[j] == i)
+ {
+ depth = i;
- break;
+ break;
+ }
}
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.h b/nx-X11/programs/Xserver/hw/nxagent/Display.h
index d18785b60..35b7857ad 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
index 2c1b07fa5..75057097a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -32,6 +32,7 @@
#include "Handlers.h"
#include "Pixels.h"
#include "Reconnect.h"
+#include "GCOps.h"
#include "NXlib.h"
@@ -418,13 +419,14 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (useStoredBitmap != 0)
{
#ifdef TEST
- fprintf(stderr, "nxagentSynchronizeRegion: Drawable [%s] at [%p] has a synchronization bitmap "
+ fprintf(stderr, "nxagentSynchronizeRegion: Drawable [%s] at [%p] has a synchronization bitmap at [%p] "
"[%d,%d,%d,%d] with [%ld] rects.\n", nxagentDrawableType(pDrawable),
- (void *) pDrawable, nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.x1,
- nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y1,
- nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.x2,
- nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y2,
- REGION_NUM_RECTS(nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable))));
+ (void *) pDrawable, (void *) nxagentDrawableBitmap(pDrawable),
+ nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.x1,
+ nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y1,
+ nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.x2,
+ nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y2,
+ REGION_NUM_RECTS(nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable))));
#endif
clipRegion = nxagentCreateRegion(pDrawable, NULL, 0, 0, pDrawable -> width, pDrawable -> height);
@@ -581,8 +583,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: Going to synchronize [%ld] rects of [%s] at [%p].\n",
- REGION_NUM_RECTS(clipRegion), (pDrawable -> type == DRAWABLE_PIXMAP ? "Pixmap" : "Window"),
- (void *) pDrawable);
+ REGION_NUM_RECTS(clipRegion), nxagentDrawableType(pDrawable), (void *) pDrawable);
fprintf(stderr, "nxagentSynchronizeRegion: Extents geometry [%d,%d,%d,%d].\n",
clipRegion -> extents.x1, clipRegion -> extents.y1, clipRegion -> extents.x2, clipRegion -> extents.y2);
@@ -615,7 +616,22 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (data == NULL)
{
#ifdef WARNING
+
fprintf(stderr, "nxagentSynchronizeRegion: WARNING! Failed to allocate memory for synchronization.\n");
+
+ /*
+ * Print detailed informations if the
+ * image length is zero.
+ */
+
+ if (length == 0)
+ {
+ fprintf(stderr, "nxagentSynchronizeRegion: Drawable [%s] at [%p] with region geometry [%ld][%d,%d,%d,%d].\n",
+ nxagentDrawableType(pDrawable), (void *) pDrawable, REGION_NUM_RECTS(clipRegion),
+ clipRegion -> extents.x1, clipRegion -> extents.y1,
+ clipRegion -> extents.x2, clipRegion -> extents.y2);
+ }
+
#endif
goto nxagentSynchronizeRegionFree;
@@ -670,10 +686,14 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (nxagentDrawableStatus(pDrawable) == Synchronized)
{
#ifdef WARNING
+
if (pDrawable -> type == DRAWABLE_WINDOW && pSrcDrawable != pDrawable)
+ {
fprintf(stderr, "nxagentSynchronizeRegion: WARNING! Trying to synchronize "
"the clean drawable type [%d] at [%p] with source at [%p].\n",
pDrawable -> type, (void *) pDrawable, (void *) pSrcDrawable);
+ }
+
#endif
goto nxagentSynchronizeRegionStop;
@@ -748,9 +768,6 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
nxagentGetImage(pSrcDrawable, x, y, w, h, format, AllPlanes, data);
- nxagentRealizeImage(pDrawable, pGC, pDrawable -> depth,
- x, y, w, h, leftPad, format, data);
-
/*
* Going to unmark the synchronized
* region.
@@ -805,6 +822,13 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
nxagentUnmarkCorruptedRegion(pDrawable, &tileRegion);
}
+ #ifdef TEST
+ else
+ {
+ fprintf(stderr, "nxagentSynchronizeRegion: Tile [%d,%d,%d,%d] on drawable [%p] doesn't match.\n",
+ x, y, x + w, y + h, (void *) pDrawable);
+ }
+ #endif
}
else
{
@@ -835,6 +859,14 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
}
}
+ /*
+ * Realize the image after comparing the
+ * source data with the bitmap data.
+ */
+
+ nxagentRealizeImage(pDrawable, pGC, pDrawable -> depth,
+ x, y, w, h, leftPad, format, data);
+
REGION_UNINIT(pDrawable -> pScreen, &tileRegion);
#if !defined(COLLECTED_UPDATES)
@@ -2555,16 +2587,13 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
GCPtr pGC = NULL;
RegionPtr pClipRegion = NullRegion;
- char *data = NULL;
-
int x, y;
int w, h;
- int length, format;
int saveTrap;
#ifdef TEST
- fprintf(stderr, "nxagentCreateDrawableBitmap: Creating synchronization bitmap for drawable at [%p].\n",
- (void *) pDrawable);
+ fprintf(stderr, "nxagentCreateDrawableBitmap: Creating synchronization bitmap for [%s] at [%p].\n",
+ nxagentDrawableType(pDrawable), (void *) pDrawable);
#endif
/*
@@ -2652,24 +2681,8 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
w = pClipRegion -> extents.x2 - pClipRegion -> extents.x1;
h = pClipRegion -> extents.y2 - pClipRegion -> extents.y1;
- data = nxagentAllocateImageData(w, h, pDrawable -> depth, &length, &format);
-
- if (data == NULL)
- {
- #ifdef WARNING
- fprintf(stderr, "nxagentCreateDrawableBitmap: Cannot allocate memory for the bitmap data.\n");
- #endif
-
- nxagentDestroyPixmap(pBitmap);
+ nxagentCopyArea(pDrawable, (DrawablePtr) pBitmap, pGC, x, y, w, h, x, y);
- goto nxagentCreateDrawableBitmapEnd;
- }
-
- nxagentGetImage(pDrawable, x, y, w, h, format, AllPlanes, data);
-
- nxagentPutImage((DrawablePtr) pBitmap, pGC, pBitmap -> drawable.depth, x, y, w, h,
- 0, format, data);
-
REGION_UNION(pDrawable -> pScreen, nxagentCorruptedRegion((DrawablePtr) pBitmap),
nxagentCorruptedRegion((DrawablePtr) pBitmap), pClipRegion);
@@ -2711,11 +2724,6 @@ nxagentCreateDrawableBitmapEnd:
nxagentFreeRegion(pDrawable, pClipRegion);
}
- if (data != NULL)
- {
- xfree(data);
- }
-
if (pGC != NULL)
{
FreeScratchGC(pGC);
@@ -3091,6 +3099,16 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
REGION_INTERSECT(pWin -> pScreen, &expose, &expose, &pWin -> clipList);
+ /*
+ * Reduce the overall region to expose.
+ */
+
+ REGION_TRANSLATE(pWin -> pScreen, &expose, -pWin -> drawable.x, -pWin -> drawable.y);
+
+ REGION_SUBTRACT(pWin -> pScreen, pExpose, pExpose, &expose);
+
+ REGION_TRANSLATE(pWin -> pScreen, &expose, pWin -> drawable.x, pWin -> drawable.y);
+
miWindowExposures(pWin, &expose, &expose);
nxagentSendBackgroundExposeEnd:
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.h b/nx-X11/programs/Xserver/hw/nxagent/Drawable.h
index 62af0685d..146610efb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.c b/nx-X11/programs/Xserver/hw/nxagent/Error.c
index e60845dd3..963cfa287 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Error.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.h b/nx-X11/programs/Xserver/hw/nxagent/Error.h
index 78e15592b..2d6083d4e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Error.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 3c1458cb7..1576962fb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -76,7 +76,9 @@
#include "input.h"
#endif
+#define Time XlibXID
#include "XKBlib.h"
+#undef Time
#define GC XlibGC
#define Font XlibFont
@@ -203,6 +205,8 @@ CARD32 nxagentLastEventTime = 0;
CARD32 nxagentLastKeyPressTime = 0;
Time nxagentLastServerTime = 0;
+int nxagentPointerAndKeyboardGrabbed = 0;
+
/*
* Used for storing windows that need to
* receive expose events from the agent.
@@ -219,6 +223,16 @@ static void nxagentForwardRemoteExpose(void);
static int nxagentClipAndSendExpose(WindowPtr pWin, pointer ptr);
/*
+ * This is from NXproperty.c.
+ */
+
+int GetWindowProperty(WindowPtr pWin, Atom property, long longOffset,
+ long longLength, Bool delete, Atom type,
+ Atom *actualType, int *format, unsigned
+ long *nItems, unsigned long *bytesAfter,
+ unsigned char **propData);
+
+/*
* Associate a resource to a drawable and
* store the region affected by the split
* operation.
@@ -274,6 +288,280 @@ void ProcessInputEvents()
mieqProcessInputEvents();
}
+#ifdef DEBUG_TREE
+
+/*
+ * Print ID and name of window.
+ */
+
+void nxagentRemoteWindowID(Window window, Bool newline)
+{
+#ifdef NO_I18N
+ char *winName;
+#else
+ XTextProperty tp;
+#endif
+
+ fprintf(stderr, "0x%lx", window);
+
+ if (!window)
+ {
+ fprintf(stderr, " (none) ");
+ }
+ else
+ {
+ if (window == DefaultRootWindow(nxagentDisplay))
+ {
+ fprintf(stderr, " (the root window) ");
+ }
+
+#ifdef NO_I18N
+
+ if (!XFetchName(nxagentDisplay, window, &winName))
+ {
+ fprintf(stderr, " (has no name) ");
+ }
+ else if (winName)
+ {
+ fprintf(stderr, " \"%s\" ", winName);
+ XFree(winName);
+ }
+
+#else
+
+ if (XGetWMName(nxagentDisplay, window, &tp) != 0)
+ {
+ fprintf(stderr, " (has no name) ");
+ }
+ else if (tp.nitems > 0)
+ {
+ int count = 0;
+ int i, ret;
+ char **list = NULL;
+
+ fprintf(stderr, " \"");
+
+ ret = XmbTextPropertyToTextList(nxagentDisplay, &tp, &list, &count);
+
+ if ((ret == Success || ret > 0) && list != NULL)
+ {
+ for (i = 0; i < count; i++)
+ {
+ fprintf(stderr, "%s", list[i]);
+ }
+
+ XFreeStringList(list);
+ }
+ else
+ {
+ fprintf(stderr, "%s", tp.value);
+ }
+
+ fprintf(stderr, "\" ");
+ }
+
+#endif
+
+ else
+ {
+ fprintf(stderr, " (has no name) ");
+ }
+ }
+
+ if (newline == TRUE)
+ {
+ fprintf(stderr, "\n");
+ }
+
+ return;
+}
+
+/*
+ * Print info about remote window.
+ */
+
+void nxagentRemoteWindowInfo(Window win, int indent, Bool newLine)
+{
+ XWindowAttributes attributes;
+ int i;
+
+ if (XGetWindowAttributes(nxagentDisplay, win, &attributes) == 0)
+ {
+ return;
+ }
+
+ for (i = 0; i < indent; i++)
+ {
+ fprintf(stderr, " ");
+ }
+
+ fprintf(stderr, "x=%d y=%d width=%d height=%d class=%s map_state=%s "
+ "override_redirect=%s\n", attributes.x, attributes.y,
+ attributes.width, attributes.height, (attributes.class == 0) ?
+ "InputOutput" : "InputOnly", (attributes.map_state == 0) ?
+ "IsUnmapped" : (attributes.map_state == 1 ?
+ "IsUnviewable" : "IsViewable"),
+ (attributes.override_redirect == 0) ?
+ "No" : "Yes" );
+
+ if (newLine == TRUE)
+ {
+ fprintf(stderr, "\n");
+ }
+}
+
+/*
+ * Walk remote windows tree.
+ */
+
+void nxagentRemoteWindowsTree(Window window, int level)
+{
+ int i, j;
+ Window rootWin, parentWin;
+ unsigned int numChildren;
+ Window *childList;
+
+ if (!XQueryTree(nxagentDisplay, window, &rootWin, &parentWin, &childList,
+ &numChildren))
+ {
+ fprintf(stderr, "nxagentRemoteWindowsTree - XQueryTree failed.\n");
+
+ return;
+ }
+
+ if (level == 0)
+ {
+ fprintf(stderr, "\n");
+
+ fprintf(stderr, " Root Window ID: ");
+ nxagentRemoteWindowID(rootWin, TRUE);
+
+ fprintf(stderr, " Parent window ID: ");
+ nxagentRemoteWindowID(parentWin, TRUE);
+ }
+
+ if (level == 0 || numChildren > 0)
+ {
+ fprintf(stderr, " ");
+
+ for (j = 0; j < level; j++)
+ {
+ fprintf(stderr, " ");
+ }
+
+ fprintf(stderr, "%d child%s%s\n", numChildren, (numChildren == 1) ? "" :
+ "ren", (numChildren == 1) ? ":" : ".");
+ }
+
+ for (i = (int) numChildren - 1; i >= 0; i--)
+ {
+ fprintf(stderr, " ");
+
+ for (j = 0; j < level; j++)
+ {
+ fprintf(stderr, " ");
+ }
+
+ nxagentRemoteWindowID(childList[i], TRUE);
+
+ nxagentRemoteWindowInfo(childList[i], (level * 5) + 6, TRUE);
+
+ nxagentRemoteWindowsTree(childList[i], level + 1);
+ }
+
+ if (childList)
+ {
+ XFree((char *) childList);
+ }
+}
+
+/*
+ * Print info about internal window.
+ */
+
+void nxagentInternalWindowInfo(WindowPtr pWin, int indent, Bool newLine)
+{
+ int i;
+ int result;
+ unsigned long ulReturnItems;
+ unsigned long ulReturnBytesLeft;
+ Atom atomReturnType;
+ int iReturnFormat;
+ unsigned char *pszReturnData = NULL;
+
+ fprintf(stderr, "Window ID=[0x%lx] Remote ID=[0x%lx] ", pWin -> drawable.id,
+ nxagentWindow(pWin));
+
+ result = GetWindowProperty(pWin, MakeAtom("WM_NAME", 7, False) , 0,
+ sizeof(CARD32), False, AnyPropertyType,
+ &atomReturnType, &iReturnFormat,
+ &ulReturnItems, &ulReturnBytesLeft,
+ &pszReturnData);
+
+ fprintf(stderr, "Name: ");
+
+ if (result == Success && pszReturnData != NULL)
+ {
+ pszReturnData[ulReturnItems] = '\0';
+
+ fprintf(stderr, "\"%s\"\n", (char *) pszReturnData);
+ }
+ else
+ {
+ fprintf(stderr, "%s\n", "( has no name )");
+ }
+
+ for (i = 0; i < indent; i++)
+ {
+ fprintf(stderr, " ");
+ }
+
+ fprintf(stderr, "x=%d y=%d width=%d height=%d class=%s map_state=%s "
+ "override_redirect=%s", pWin -> drawable.x, pWin -> drawable.y,
+ pWin -> drawable.width, pWin -> drawable.height,
+ (pWin -> drawable.class == 0) ? "InputOutput" :
+ "InputOnly", (pWin -> mapped == 0) ?
+ "IsUnmapped" : (pWin -> mapped == 1 ?
+ "IsUnviewable" : "IsViewable"),
+ (pWin -> overrideRedirect == 0) ?
+ "No" : "Yes");
+
+ if (newLine == TRUE)
+ {
+ fprintf(stderr, "\n");
+ }
+}
+
+/*
+ * Walk internal windows tree.
+ */
+
+void nxagentInternalWindowsTree(WindowPtr pWin, int indent)
+{
+ WindowPtr pChild;
+ int i;
+
+ while (pWin)
+ {
+ pChild = pWin -> firstChild;
+
+ for (i = 0; i < indent; i++)
+ {
+ fprintf(stderr, " ");
+ }
+
+ nxagentInternalWindowInfo(pWin, indent, TRUE);
+
+ fprintf(stderr, "\n");
+
+ nxagentInternalWindowsTree(pChild, indent + 4);
+
+ pWin = pWin -> nextSib;
+ }
+}
+
+#endif /* DEBUG_TREE */
+
void nxagentSwitchResizeMode(ScreenPtr pScreen)
{
XSizeHints sizeHints;
@@ -290,8 +578,14 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
nxagentLaunchDialog(DIALOG_DISABLE_DESKTOP_RESIZE_MODE);
- sizeHints.max_width = nxagentOption(RootWidth);
- sizeHints.max_height = nxagentOption(RootHeight);
+ if (nxagentOption(Fullscreen) == 0)
+ {
+ sizeHints.max_width = nxagentOption(RootWidth);
+ sizeHints.max_height = nxagentOption(RootHeight);
+
+ XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum],
+ &sizeHints);
+ }
}
else
{
@@ -299,7 +593,8 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
nxagentLaunchDialog(DIALOG_ENABLE_DESKTOP_RESIZE_MODE);
- nxagentRRSetScreenConfig(pScreen, nxagentOption(Width), nxagentOption(Height));
+ nxagentRRSetScreenConfig(pScreen, nxagentOption(Width),
+ nxagentOption(Height));
if (nxagentOption(ClientOs) == ClientOsWinnt)
{
@@ -308,10 +603,10 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
- }
- XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum],
- &sizeHints);
+ XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum],
+ &sizeHints);
+ }
}
void nxagentShadowSwitchResizeMode(ScreenPtr pScreen)
@@ -655,6 +950,22 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
{
break;
}
+
+ #ifdef DEBUG_TREE
+
+ case doDebugTree:
+ {
+ fprintf(stderr, "\n ========== nxagentRemoteWindowsTree ==========\n");
+ nxagentRemoteWindowsTree(nxagentWindow(WindowTable[0]), 0);
+
+ fprintf(stderr, "\n========== nxagentInternalWindowsTree ==========\n");
+ nxagentInternalWindowsTree(WindowTable[0], 0);
+
+ break;
+ }
+
+ #endif /* DEBUG_TREE */
+
case doCloseSession:
{
closeSession = TRUE;
@@ -679,6 +990,30 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
break;
}
+ case doViewportMoveUp:
+ {
+ nxagentMoveViewport(pScreen, 0, -nxagentOption(Height));
+
+ break;
+ }
+ case doViewportMoveDown:
+ {
+ nxagentMoveViewport(pScreen, 0, nxagentOption(Height));
+
+ break;
+ }
+ case doViewportMoveLeft:
+ {
+ nxagentMoveViewport(pScreen, -nxagentOption(Width), 0);
+
+ break;
+ }
+ case doViewportMoveRight:
+ {
+ nxagentMoveViewport(pScreen, nxagentOption(Width), 0);
+
+ break;
+ }
case doViewportUp:
{
nxagentMoveViewport(pScreen, 0, -nextinc(viewportInc));
@@ -755,6 +1090,8 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
if (nxagentOption(ViewOnly) == 0 && nxagentOption(Shadow) == 1 && result == doNothing)
{
+ X.xkey.keycode = nxagentConvertKeycode(X.xkey.keycode);
+
NXShadowEvent(nxagentDisplay, X);
}
@@ -763,6 +1100,27 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
case KeyRelease:
{
enum HandleEventResult result;
+ int sendKey = 0;
+
+/*
+FIXME: If we don't flush the queue here, it could happen
+ that the inputInfo structure will not be up to date
+ when we perform the following check on down keys.
+*/
+ ProcessInputEvents();
+
+/*
+FIXME: Don't enqueue the KeyRelease event if the key was
+ not already pressed. This workaround avoids a fake
+ KeyPress is enqueued by the XKEYBOARD extension.
+ Another solution would be to let the events are
+ enqueued and to remove the KeyPress afterwards.
+*/
+ if (BitIsOn(inputInfo.keyboard -> key -> down,
+ nxagentConvertKeycode(X.xkey.keycode)))
+ {
+ sendKey = 1;
+ }
#ifdef TEST
fprintf(stderr, "nxagentDispatchEvents: Going to handle new KeyRelease event.\n");
@@ -803,7 +1161,12 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
nxagentLastEventTime = GetTimeInMillis();
- if (!(nxagentCheckSpecialKeystroke(&X.xkey, &result)))
+ if (x.u.keyButtonPointer.time > nxagentLastEventTime)
+ {
+ x.u.keyButtonPointer.time = nxagentLastEventTime;
+ }
+
+ if (!(nxagentCheckSpecialKeystroke(&X.xkey, &result)) && sendKey == 1)
{
mieqEnqueue(&x);
@@ -811,6 +1174,8 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
if (nxagentOption(ViewOnly) == 0 && nxagentOption(Shadow))
{
+ X.xkey.keycode = nxagentConvertKeycode(X.xkey.keycode);
+
NXShadowEvent(nxagentDisplay, X);
}
}
@@ -828,6 +1193,23 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
nxagentInputEvent = 1;
+ if (nxagentOption(ClientOs) == ClientOsMac && (X.xbutton.state & ControlMask) == ControlMask)
+ {
+ x.u.u.type = ButtonPress;
+ x.u.u.detail = inputInfo.pointer -> button -> map[3];
+ x.u.keyButtonPointer.time = nxagentLastEventTime = GetTimeInMillis();
+
+ mieqEnqueue(&x);
+
+ x.u.u.type = ButtonRelease;
+ x.u.u.detail = inputInfo.pointer -> button -> map[3];
+ x.u.keyButtonPointer.time = nxagentLastEventTime = GetTimeInMillis();
+
+ mieqEnqueue(&x);
+
+ break;
+ }
+
if (nxagentOption(Fullscreen))
{
if (nxagentMagicPixelZone(X.xbutton.x, X.xbutton.y))
@@ -874,7 +1256,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
X.xbutton.subwindow == None))
{
x.u.u.type = ButtonPress;
- x.u.u.detail = X.xbutton.button;
+ x.u.u.detail = inputInfo.pointer -> button -> map[nxagentReversePointerMap[X.xbutton.button - 1]];
x.u.keyButtonPointer.time = nxagentLastEventTime = GetTimeInMillis();
if (nxagentOption(Rootless))
@@ -931,6 +1313,11 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
nxagentInputEvent = 1;
+ if (nxagentOption(ClientOs) == ClientOsMac && (X.xbutton.state & ControlMask) == ControlMask)
+ {
+ break;
+ }
+
if (viewportCursor)
{
/*
@@ -947,7 +1334,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
if (minimize != True)
{
x.u.u.type = ButtonRelease;
- x.u.u.detail = X.xbutton.button;
+ x.u.u.detail = inputInfo.pointer -> button -> map[nxagentReversePointerMap[X.xbutton.button - 1]];
x.u.keyButtonPointer.time = nxagentLastEventTime = GetTimeInMillis();
if (nxagentOption(Rootless))
@@ -1301,10 +1688,11 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
nxagentScreenTrap = 0;
}
- if (nxagentOption(Fullscreen))
+ if (nxagentOption(Fullscreen) == 1)
{
- if (X.xcrossing.window == nxagentFullscreenWindow &&
- X.xcrossing.detail != NotifyInferior)
+ if (X.xcrossing.window == nxagentDefaultWindows[0] &&
+ X.xcrossing.detail != NotifyInferior &&
+ X.xcrossing.mode == NotifyNormal)
{
nxagentGrabPointerAndKeyboard(&X);
}
@@ -1356,14 +1744,11 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
nxagentLastEnteredWindow = NULL;
}
- if (nxagentOption(Fullscreen))
+ if (X.xcrossing.window == nxagentDefaultWindows[0] &&
+ X.xcrossing.detail != NotifyInferior &&
+ X.xcrossing.mode == NotifyNormal)
{
- if (X.xcrossing.window == nxagentFullscreenWindow &&
- X.xcrossing.detail != NotifyInferior &&
- X.xcrossing.mode == NotifyNormal)
- {
- nxagentUngrabPointerAndKeyboard(&X);
- }
+ nxagentUngrabPointerAndKeyboard(&X);
}
if (X.xcrossing.detail != NotifyInferior)
@@ -1617,7 +2002,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
}
if (nxagentUseNXTrans == 1 && nxagentOption(Rootless) == 0 &&
- nxagentOption(Nested) == 0 && X.xmap.window != nxagentIconWindow)
+ nxagentOption(Nested) == 0)
{
nxagentVisibility = VisibilityFullyObscured;
}
@@ -1658,12 +2043,6 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
if (nxagentOption(Fullscreen) == 1)
{
- if (X.xmap.window == nxagentIconWindow)
- {
- pScreen = nxagentScreen(X.xmap.window);
- nxagentMaximizeToFullScreen(pScreen);
- }
-
nxagentVisibility = VisibilityUnobscured;
nxagentVisibilityStop = False;
nxagentVisibilityTimeout = GetTimeInMillis() + 2000;
@@ -1673,10 +2052,17 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
}
case MappingNotify:
{
+ XMappingEvent *mappingEvent = (XMappingEvent *) &X;
+
#ifdef DEBUG
fprintf(stderr, "nxagentDispatchEvents: WARNING! Going to handle new MappingNotify event.\n");
#endif
+ if (mappingEvent -> request == MappingPointer)
+ {
+ nxagentInitPointerMap();
+ }
+
break;
}
default:
@@ -1750,14 +2136,8 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
if (nxagentWMIsRunning)
{
- if (nxagentOption(Fullscreen))
- {
- nxagentMinimizeFromFullScreen(pScreen);
- }
- else
- {
- XIconifyWindow(nxagentDisplay, nxagentDefaultWindows[0], DefaultScreen(nxagentDisplay));
- }
+ XIconifyWindow(nxagentDisplay, nxagentDefaultWindows[0],
+ DefaultScreen(nxagentDisplay));
}
}
@@ -1916,8 +2296,16 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result)
return 1;
}
- nxagentLastEventTime = nxagentLastKeyPressTime = GetTimeInMillis();
+ if (X -> xkey.keycode == 66)
+ {
+ nxagentXkbState.Caps = (~nxagentXkbState.Caps & 1);
+ }
+ else if (X -> xkey.keycode == 77)
+ {
+ nxagentXkbState.Num = (~nxagentXkbState.Num & 1);
+ }
+ nxagentLastEventTime = nxagentLastKeyPressTime = GetTimeInMillis();
x.u.u.type = KeyPress;
x.u.u.detail = nxagentConvertKeycode(X -> xkey.keycode);
@@ -2227,7 +2615,6 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
{
- ScreenPtr pScreen;
WindowPtr pWin;
xEvent x;
@@ -2343,19 +2730,8 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
fprintf(stderr, "Events: WM_DELETE_WINDOW arrived Atom = %ld.\n", wmAtom);
#endif
- if (X -> xclient.window == nxagentIconWindow)
- {
- pScreen = nxagentScreen(X -> xmap.window);
-
- XMapRaised(nxagentDisplay, nxagentFullscreenWindow);
-
- XIconifyWindow(nxagentDisplay, nxagentIconWindow,
- DefaultScreen(nxagentDisplay));
-
- }
-
- if (X -> xclient.window == (nxagentOption(Fullscreen) ?
- nxagentIconWindow : nxagentDefaultWindows[0]))
+ if (X -> xclient.window == nxagentDefaultWindows[0] ||
+ nxagentWMIsRunning == 0)
{
*result = doCloseSession;
}
@@ -2952,85 +3328,110 @@ int nxagentHandleConfigureNotify(XEvent* X)
if (X -> xconfigure.window == nxagentDefaultWindows[pScreen -> myNum])
{
- if (nxagentOption(Fullscreen) == 0)
+ if (nxagentOption(DesktopResize) == 1)
{
- if (nxagentOption(DesktopResize) == 1)
+ if (nxagentOption(Width) != X -> xconfigure.width ||
+ nxagentOption(Height) != X -> xconfigure.height)
{
- if (nxagentOption(Width) != X -> xconfigure.width ||
- nxagentOption(Height) != X -> xconfigure.height)
- {
- Bool newEvents = False;
+ Bool newEvents = False;
- doRandR = True;
+ doRandR = True;
- NXFlushDisplay(nxagentDisplay, NXFlushLink);
+ NXFlushDisplay(nxagentDisplay, NXFlushLink);
- do
- {
- newEvents = False;
+ do
+ {
+ newEvents = False;
- timeout.tv_sec = 0;
- timeout.tv_usec = 500 * 1000;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 500 * 1000;
- nxagentWaitEvents(nxagentDisplay, &timeout);
+ nxagentWaitEvents(nxagentDisplay, &timeout);
- /*
- * This should also flush
- * the NX link for us.
- */
+ /*
+ * This should also flush
+ * the NX link for us.
+ */
- XSync(nxagentDisplay, 0);
+ XSync(nxagentDisplay, 0);
- while (XCheckTypedWindowEvent(nxagentDisplay, nxagentDefaultWindows[pScreen -> myNum],
- ConfigureNotify, X))
- {
- newEvents = True;
- }
+ while (XCheckTypedWindowEvent(nxagentDisplay, nxagentDefaultWindows[pScreen -> myNum],
+ ConfigureNotify, X))
+ {
+ newEvents = True;
+ }
- } while (newEvents);
- }
+ } while (newEvents);
}
+ }
- if (nxagentWMIsRunning == 0 || X -> xconfigure.send_event)
- {
- nxagentChangeOption(X, X -> xconfigure.x);
- nxagentChangeOption(Y, X -> xconfigure.y);
- }
+ if (nxagentWMIsRunning == 0 || X -> xconfigure.send_event)
+ {
+ nxagentChangeOption(X, X -> xconfigure.x);
+ nxagentChangeOption(Y, X -> xconfigure.y);
+ }
- if (nxagentOption(Shadow) == 1 && nxagentOption(DesktopResize) == 1 &&
- (nxagentOption(Width) != X -> xconfigure.width ||
- nxagentOption(Height) != X -> xconfigure.height))
- {
- nxagentShadowResize = 1;
- }
+ if (nxagentOption(Shadow) == 1 && nxagentOption(DesktopResize) == 1 &&
+ (nxagentOption(Width) != X -> xconfigure.width ||
+ nxagentOption(Height) != X -> xconfigure.height))
+ {
+ nxagentShadowResize = 1;
+ }
- nxagentChangeOption(Width, X -> xconfigure.width);
- nxagentChangeOption(Height, X -> xconfigure.height);
+ nxagentChangeOption(Width, X -> xconfigure.width);
+ nxagentChangeOption(Height, X -> xconfigure.height);
- nxagentChangeOption(ViewportXSpan, (int) X -> xconfigure.width -
- (int) nxagentOption(RootWidth));
- nxagentChangeOption(ViewportYSpan, (int) X -> xconfigure.height -
- (int) nxagentOption(RootHeight));
+ nxagentChangeOption(ViewportXSpan, (int) X -> xconfigure.width -
+ (int) nxagentOption(RootWidth));
+ nxagentChangeOption(ViewportYSpan, (int) X -> xconfigure.height -
+ (int) nxagentOption(RootHeight));
- nxagentMoveViewport(pScreen, 0, 0);
+ nxagentMoveViewport(pScreen, 0, 0);
- if (nxagentOption(Shadow) == 1 ||
- (nxagentOption(Width) == nxagentOption(RootWidth) &&
- nxagentOption(Height) == nxagentOption(RootHeight)))
- {
- doRandR = 0;
- }
+ if (nxagentOption(Shadow) == 1 ||
+ (nxagentOption(Width) == nxagentOption(RootWidth) &&
+ nxagentOption(Height) == nxagentOption(RootHeight)))
+ {
+ doRandR = 0;
+ }
- if (doRandR)
- {
- #ifdef TEST
- fprintf(stderr,"nxagentHandleConfigureNotify: Width %d Height %d.\n",
- nxagentOption(Width), nxagentOption(Height));
- #endif
+ nxagentChangeOption(Width, X -> xconfigure.width);
+ nxagentChangeOption(Height, X -> xconfigure.height);
- nxagentRRSetScreenConfig(screenInfo.screens[DefaultScreen(nxagentDisplay)],
- nxagentOption(Width), nxagentOption(Height));
- }
+ XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0,
+ X -> xconfigure.width, X -> xconfigure.height);
+
+ if (nxagentOption(Fullscreen) == 0)
+ {
+ nxagentMoveViewport(pScreen, 0, 0);
+ }
+ else
+ {
+ nxagentChangeOption(RootX, (nxagentOption(Width) -
+ nxagentOption(RootWidth)) / 2);
+ nxagentChangeOption(RootY, (nxagentOption(Height) -
+ nxagentOption(RootHeight)) / 2);
+ nxagentChangeOption(ViewportXSpan, nxagentOption(Width) -
+ nxagentOption(RootWidth));
+ nxagentChangeOption(ViewportYSpan, nxagentOption(Height) -
+ nxagentOption(RootHeight));
+
+ nxagentUpdateViewportFrame(0, 0, nxagentOption(RootWidth),
+ nxagentOption(RootHeight));
+
+ XMoveWindow(nxagentDisplay, nxagentWindow(WindowTable[pScreen -> myNum]),
+ nxagentOption(RootX), nxagentOption(RootY));
+ }
+
+ if (doRandR)
+ {
+ #ifdef TEST
+ fprintf(stderr,"nxagentHandleConfigureNotify: Width %d Height %d.\n",
+ nxagentOption(Width), nxagentOption(Height));
+ #endif
+
+ nxagentRRSetScreenConfig(screenInfo.screens[DefaultScreen(nxagentDisplay)],
+ nxagentOption(Width), nxagentOption(Height));
}
return 1;
@@ -3042,8 +3443,6 @@ int nxagentHandleConfigureNotify(XEvent* X)
int nxagentHandleReparentNotify(XEvent* X)
{
- ScreenPtr pScreen = nxagentScreen(X -> xreparent.window);
-
#ifdef TEST
fprintf(stderr, "nxagentHandleReparentNotify: Going to handle a new reparent event.\n");
#endif
@@ -3096,6 +3495,8 @@ int nxagentHandleReparentNotify(XEvent* X)
#ifdef WARNING
fprintf(stderr, "nxagentHandleReparentNotify: WARNING! Failed QueryTree request.\n");
#endif
+
+ break;
}
if (result && children_return)
@@ -3148,6 +3549,95 @@ int nxagentHandleReparentNotify(XEvent* X)
return 1;
}
+ else if (nxagentWMIsRunning == 1 && nxagentOption(Fullscreen) == 0 &&
+ nxagentOption(WMBorderWidth) == -1)
+ {
+ XlibWindow w;
+ XlibWindow rootReturn = 0;
+ XlibWindow parentReturn = 0;
+ XlibWindow junk;
+ XlibWindow *childrenReturn = NULL;
+ unsigned int nchildrenReturn = 0;
+ Status result;
+ XWindowAttributes attributes;
+ int x, y;
+ int xParent, yParent;
+
+ /*
+ * Calculate the absolute upper-left X e Y
+ */
+
+ if ((XGetWindowAttributes(nxagentDisplay, X -> xreparent.window,
+ &attributes) == 0))
+ {
+ #ifdef WARNING
+ fprintf(stderr, "nxagentHandleReparentNotify: WARNING! "
+ "XGetWindowAttributes failed.\n");
+ #endif
+
+ return 1;
+ }
+
+ x = attributes.x;
+ y = attributes.y;
+
+ XTranslateCoordinates(nxagentDisplay, X -> xreparent.window,
+ attributes.root, -attributes.border_width,
+ -attributes.border_width, &x, &y, &junk);
+
+ /*
+ * Calculate the parent X and parent Y.
+ */
+
+ w = X -> xreparent.parent;
+
+ if (w != DefaultRootWindow(nxagentDisplay))
+ {
+ do
+ {
+ result = XQueryTree(nxagentDisplay, w, &rootReturn, &parentReturn,
+ &childrenReturn, &nchildrenReturn);
+
+ if (parentReturn == rootReturn || parentReturn == 0 || result == 0)
+ {
+ break;
+ }
+
+ if (result == 1 && childrenReturn != NULL)
+ {
+ XFree(childrenReturn);
+ }
+
+ w = parentReturn;
+ }
+ while (True);
+
+ /*
+ * WM reparented. Find edge of the frame.
+ */
+
+ if (XGetWindowAttributes(nxagentDisplay, w, &attributes) == 0)
+ {
+ #ifdef WARNING
+ fprintf(stderr, "nxagentHandleReparentNotify: WARNING! "
+ "XGetWindowAttributes failed for parent window.\n");
+ #endif
+
+ return 1;
+ }
+
+ xParent = attributes.x;
+ yParent = attributes.y;
+
+ /*
+ * Difference between Absolute X and Parent X gives thickness of side frame.
+ * Difference between Absolute Y and Parent Y gives thickness of title bar.
+ */
+
+ nxagentChangeOption(WMBorderWidth, (x - xParent));
+ nxagentChangeOption(WMTitleHeight, (y - yParent));
+ }
+ }
return 1;
}
@@ -3308,6 +3798,13 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
int resource;
+ int result;
+
+ if (nxagentPointerAndKeyboardGrabbed == 1)
+ {
+ return;
+ }
+
#ifdef TEST
fprintf(stderr, "nxagentGrabPointerAndKeyboard: Grabbing pointer and keyboard with event at [%p].\n",
(void *) X);
@@ -3326,8 +3823,22 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
fprintf(stderr, "nxagentGrabPointerAndKeyboard: Going to grab the keyboard in context [B1].\n");
#endif
- XGrabKeyboard(nxagentDisplay, nxagentFullscreenWindow,
- True, GrabModeAsync, GrabModeAsync, now);
+ result = XGrabKeyboard(nxagentDisplay, nxagentFullscreenWindow,
+ True, GrabModeAsync, GrabModeAsync, now);
+
+ if (result != GrabSuccess)
+ {
+ return;
+ }
+
+ /*
+ * The smart scheduler could be stopped while
+ * waiting for the reply. In this case we need
+ * to yield explicitly to avoid to be stuck in
+ * the dispatch loop forever.
+ */
+
+ isItTimeToYield = 1;
#ifdef TEST
fprintf(stderr, "nxagentGrabPointerAndKeyboard: Going to grab the pointer in context [B2].\n");
@@ -3356,12 +3867,19 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
XSetInputFocus(nxagentDisplay, nxagentFullscreenWindow,
RevertToParent, now);
}
+
+ nxagentPointerAndKeyboardGrabbed = 1;
}
void nxagentUngrabPointerAndKeyboard(XEvent *X)
{
unsigned long now;
+ if (nxagentPointerAndKeyboardGrabbed == 0)
+ {
+ return;
+ }
+
#ifdef TEST
fprintf(stderr, "nxagentUngrabPointerAndKeyboard: Ungrabbing pointer and keyboard with event at [%p].\n",
(void *) X);
@@ -3387,6 +3905,8 @@ void nxagentUngrabPointerAndKeyboard(XEvent *X)
#endif
XUngrabPointer(nxagentDisplay, now);
+
+ nxagentPointerAndKeyboardGrabbed = 0;
}
void nxagentDeactivatePointerGrab()
@@ -4022,4 +4542,180 @@ void nxagentGuessDumpInputInfo(ClientPtr client, Atom property, char *data)
}
}
+void nxagentDeactivateInputDevicesGrabs()
+{
+ fprintf(stderr, "Info: Deactivating input devices grabs.\n");
+
+ if (inputInfo.pointer -> grab)
+ {
+ (*inputInfo.pointer -> DeactivateGrab)(inputInfo.pointer);
+ }
+
+ if (inputInfo.keyboard -> grab)
+ {
+ (*inputInfo.keyboard -> DeactivateGrab)(inputInfo.keyboard);
+ }
+}
+
+static const char *nxagentGrabStateToString(int state)
+{
+ switch (state)
+ {
+ case 0:
+ return "NOT_GRABBED";
+ case 1:
+ return "THAWED";
+ case 2:
+ return "THAWED_BOTH";
+ case 3:
+ return "FREEZE_NEXT_EVENT";
+ case 4:
+ return "FREEZE_BOTH_NEXT_EVENT";
+ case 5:
+ return "FROZEN_NO_EVENT";
+ case 6:
+ return "FROZEN_WITH_EVENT";
+ case 7:
+ return "THAW_OTHERS";
+ default:
+ return "unknown state";
+ }
+}
+
+void nxagentDumpInputDevicesState(void)
+{
+ int i, k;
+ int mask = 1;
+ CARD8 val;
+ DeviceIntPtr dev;
+ GrabPtr grab;
+ WindowPtr pWin = NULL;
+
+ fprintf(stderr, "\n*** Dump input devices state: BEGIN ***"
+ "\nKeys down:");
+
+ dev = inputInfo.keyboard;
+
+ for (i = 0; i < DOWN_LENGTH; i++)
+ {
+ val = dev -> key -> down[i];
+
+ if (val != 0)
+ {
+ for (k = 0; k < 8; k++)
+ {
+ if (val & (mask << k))
+ {
+ fprintf(stderr, "\n\t[%d] [%s]", i * 8 + k,
+ XKeysymToString(XKeycodeToKeysym(nxagentDisplay, i * 8 + k, 0)));
+ }
+ }
+ }
+ }
+
+ fprintf(stderr, "\nKeyboard device state: \n\tdevice [%p]\n\tlast grab time [%lu]"
+ "\n\tfrozen [%s]\n\tstate [%s]\n\tother [%p]\n\tevent count [%d]"
+ "\n\tfrom passive grab [%s]\n\tactivating key [%d]", dev,
+ dev -> grabTime.milliseconds, dev -> sync.frozen ? "Yes": "No",
+ nxagentGrabStateToString(dev -> sync.state),
+ dev -> sync.other, dev -> sync.evcount,
+ dev -> fromPassiveGrab ? "Yes" : "No",
+ dev -> activatingKey);
+
+ grab = dev -> grab;
+
+ if (grab)
+ {
+ fprintf(stderr, "\nKeyboard grab state: \n\twindow pointer [%p]"
+ "\n\towner events flag [%s]\n\tgrab mode [%s]",
+ grab -> window, grab -> ownerEvents ? "True" : "False",
+ grab -> keyboardMode ? "asynchronous" : "synchronous");
+
+ /*
+ * Passive grabs.
+ */
+
+ pWin = grab -> window;
+ grab = wPassiveGrabs(pWin);
+
+ while (grab)
+ {
+ fprintf(stderr, "\nPassive grab state: \n\tdevice [%p]\n\towner events flag [%s]"
+ "\n\tpointer grab mode [%s]\n\tkeyboard grab mode [%s]\n\tevent type [%d]"
+ "\n\tmodifiers [%x]\n\tbutton/key [%u]\n\tevent mask [%lx]",
+ grab -> device, grab -> ownerEvents ? "True" : "False",
+ grab -> pointerMode ? "asynchronous" : "synchronous",
+ grab -> keyboardMode ? "asynchronous" : "synchronous",
+ grab -> type, grab -> modifiersDetail.exact,
+ grab -> detail.exact, grab -> eventMask);
+
+ grab = grab -> next;
+ }
+ }
+
+ fprintf(stderr, "\nButtons down:");
+
+ dev = inputInfo.pointer;
+
+ for (i = 0; i < DOWN_LENGTH; i++)
+ {
+ val = dev -> button -> down[i];
+
+ if (val != 0)
+ {
+ for (k = 0; k < 8; k++)
+ {
+ if (val & (mask << k))
+ {
+ fprintf(stderr, "\n\t[%d]", i * 8 + k);
+ }
+ }
+ }
+ }
+
+ fprintf(stderr, "\nPointer device state: \n\tdevice [%p]\n\tlast grab time [%lu]"
+ "\n\tfrozen [%s]\n\tstate [%s]\n\tother [%p]\n\tevent count [%d]"
+ "\n\tfrom passive grab [%s]\n\tactivating button [%d]", dev,
+ dev -> grabTime.milliseconds, dev -> sync.frozen ? "Yes" : "No",
+ nxagentGrabStateToString(dev -> sync.state),
+ dev -> sync.other, dev -> sync.evcount,
+ dev -> fromPassiveGrab ? "Yes" : "No",
+ dev -> activatingKey);
+
+ grab = dev -> grab;
+
+ if (grab)
+ {
+ fprintf(stderr, "\nPointer grab state: \n\twindow pointer [%p]"
+ "\n\towner events flag [%s]\n\tgrab mode [%s]",
+ grab -> window, grab -> ownerEvents ? "True" : "False",
+ grab -> pointerMode ? "asynchronous" : "synchronous");
+
+ if (grab -> window != pWin)
+ {
+ /*
+ * Passive grabs.
+ */
+
+ grab = wPassiveGrabs(grab -> window);
+
+ while (grab)
+ {
+ fprintf(stderr, "\nPassive grab state: \n\tdevice [%p]\n\towner events flag [%s]"
+ "\n\tpointer grab mode [%s]\n\tkeyboard grab mode [%s]\n\tevent type [%d]"
+ "\n\tmodifiers [%x]\n\tbutton/key [%u]\n\tevent mask [%lx]",
+ grab -> device, grab -> ownerEvents ? "True" : "False",
+ grab -> pointerMode ? "asynchronous" : "synchronous",
+ grab -> keyboardMode ? "asynchronous" : "synchronous",
+ grab -> type, grab -> modifiersDetail.exact,
+ grab -> detail.exact, grab -> eventMask);
+
+ grab = grab -> next;
+ }
+ }
+ }
+
+ fprintf(stderr, "\n*** Dump input devices state: FINISH ***\n");
+}
+
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h
index ab0d25764..109475c16 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -29,9 +29,14 @@ enum HandleEventResult
{
doNothing = 0,
doMinimize,
+ doDebugTree,
doCloseSession,
doStartKbd,
doSwitchFullscreen,
+ doViewportMoveUp,
+ doViewportMoveLeft,
+ doViewportMoveRight,
+ doViewportMoveDown,
doViewportLeft,
doViewportUp,
doViewportRight,
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
index f2954a3e9..e76cbb4ad 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.h b/nx-X11/programs/Xserver/hw/nxagent/Extensions.h
index f76229867..620645d00 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c
index 87f9f0201..13b819322 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Font.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -827,7 +827,10 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
for (j = 0; j < numSearchFields; j++)
{
- free (searchFields[j]);
+ if (searchFields[j] != NULL)
+ {
+ free(searchFields[j]);
+ }
}
}
}
@@ -846,7 +849,10 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
for (j = 0; j < numFontFields; j++)
{
- free (fontNameFields[j]);
+ if (fontNameFields[j] != NULL)
+ {
+ free(fontNameFields[j]);
+ }
}
return fontStruct;
@@ -1765,6 +1771,10 @@ int nxagentSplitString(char *string, char *fields[], int nfields, char *sep)
strncpy(fields[i], current, fieldlen);
*(fields[i] + fieldlen) = 0;
}
+ else
+ {
+ fields[i] = NULL;
+ }
current = next + seplen;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.h b/nx-X11/programs/Xserver/hw/nxagent/Font.h
index 3ae086b44..75ae3f6f5 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Font.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Font.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c
index 4ca069790..c53e3b9f7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GC.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c
index 83aa04f11..85730797e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -594,6 +594,8 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
unsigned int format;
unsigned long planeMask = 0xffffffff;
+ int oldDstxyValue;
+
RegionPtr pDstRegion;
int skip = 0;
@@ -605,6 +607,91 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
(void *) pDstDrawable, srcx, srcy, dstx, dsty, width, height);
#endif
+ /*
+ * Here, before using fbDoCopy() called by fbCopyArea(),
+ * it should be provided that the cast in fbDoCopy() from
+ * int to short int would not cut off significative bits.
+ */
+
+ if (dstx + pDstDrawable->x + width > 32767)
+ {
+ #ifdef WARNING
+ fprintf(stderr, "nxagentCopyArea: x2 exceeding short int.\n");
+ #endif
+
+ width = 32767 - dstx - pDstDrawable->x;
+
+ if (width <= 0)
+ {
+ #ifdef TEST
+ fprintf(stderr, "nxagentCopyArea: Returning null on x2 check.\n");
+ #endif
+
+ return NullRegion;
+ }
+ }
+
+ if (dstx + pDstDrawable->x < -32768)
+ {
+ #ifdef WARNING
+ fprintf(stderr, "nxagentCopyArea: x1 exceeding short int.\n");
+ #endif
+
+ width += pDstDrawable->x + dstx + 32768;
+ srcx -= pDstDrawable->x + dstx + 32768;
+ dstx = -32768 - pDstDrawable->x;
+
+ if (width <= 0)
+ {
+ #ifdef TEST
+ fprintf(stderr, "nxagentCopyArea: Returning null on x1 check.\n");
+ #endif
+
+ return NullRegion;
+ }
+ }
+
+ oldDstxyValue = dsty;
+
+ if (dsty + pDstDrawable->y + height > 32767)
+ {
+ #ifdef WARNING
+ fprintf(stderr, "nxagentCopyArea: y2 exceeding short int.\n");
+ #endif
+
+ height = 32767 - dsty - pDstDrawable->y;
+
+ if (height <= 0)
+ {
+ #ifdef TEST
+ fprintf(stderr, "nxagentCopyArea: Returning null on y2 check.\n");
+ #endif
+
+ return NullRegion;
+ }
+ }
+
+ if (dsty + pDstDrawable->y < -32768)
+ {
+ #ifdef WARNING
+ fprintf(stderr, "nxagentCopyArea: y1 exceeding short int.\n");
+ #endif
+
+ height += 32768 + pDstDrawable->y + dsty;
+ srcy -= 32768 + pDstDrawable->y + dsty;
+ dsty = -32768 - pDstDrawable->y;
+
+ if (height <= 0)
+ {
+ #ifdef TEST
+ fprintf(stderr, "nxagentCopyArea: Returning null on y1 check.\n");
+ #endif
+
+ return NullRegion;
+ }
+ }
+
+
if (nxagentGCTrap == 1 || nxagentShmTrap == 1)
{
if (pSrcDrawable -> type == DRAWABLE_PIXMAP &&
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.h b/nx-X11/programs/Xserver/hw/nxagent/GCOps.h
index 14d30e392..7ae6d9923 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCs.h b/nx-X11/programs/Xserver/hw/nxagent/GCs.h
index 207d563ed..bec290088 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GCs.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/GCs.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
index 3abc3575f..be407f160 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -105,6 +105,13 @@
#define MINIMUM_DISPLAY_BUFFER 512
+#ifdef NX_DEBUG_INPUT
+extern int nxagentDebugInputDevices;
+extern unsigned long nxagentLastInputDevicesDumpTime;
+
+extern void nxagentDumpInputDevicesState(void);
+#endif
+
/*
* Used in the handling of the X desktop
* manager protocol.
@@ -186,6 +193,18 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
now = GetTimeInMillis();
+ #ifdef NX_DEBUG_INPUT
+
+ if (nxagentDebugInputDevices == 1 &&
+ now - nxagentLastInputDevicesDumpTime > 5000)
+ {
+ nxagentLastInputDevicesDumpTime = now;
+
+ nxagentDumpInputDevicesState();
+ }
+
+ #endif
+
if (nxagentNeedConnectionChange() == 1)
{
#ifdef TEST
@@ -508,7 +527,8 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
synchronize, nxagentReady);
#endif
- if (nxagentQueuedEvents(nxagentDisplay) > 0)
+ if (NXDisplayError(nxagentDisplay) == 0 &&
+ nxagentQueuedEvents(nxagentDisplay) > 0)
{
#ifdef WARNING
fprintf(stderr, "nxagentBlockHandler: WARNING! Forcing a null timeout with events queued.\n");
@@ -540,6 +560,8 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
#endif
+ nxagentPrintGeometry();
+
#ifdef BLOCKS
fprintf(stderr, "[End block]\n");
#endif
@@ -820,6 +842,8 @@ FIXME: Must queue multiple writes and handle
#endif
+ nxagentPrintGeometry();
+
#ifdef BLOCKS
fprintf(stderr, "[End block]\n");
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.h b/nx-X11/programs/Xserver/hw/nxagent/Handlers.h
index fc72c7060..fe8aeef36 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Holder.c b/nx-X11/programs/Xserver/hw/nxagent/Holder.c
index 087d66017..a9ac77c09 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Holder.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Holder.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Holder.h b/nx-X11/programs/Xserver/hw/nxagent/Holder.h
index 6dc2b8ed2..9896aeead 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Holder.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Holder.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Icons.h b/nx-X11/programs/Xserver/hw/nxagent/Icons.h
index cb2e08521..4d0e216cd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Icons.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Icons.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c
index 4e08f6bf1..e8405ed3a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Image.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.h b/nx-X11/programs/Xserver/hw/nxagent/Image.h
index fb77f3c80..7805b0312 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Image.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Image.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
index 633e17a22..51173e410 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile
+++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
@@ -206,7 +206,8 @@ DEFINES = -g $(OS_DEFINES) $(EXT_DEFINES) $(UPG_DEFINES) \
-DNXAGENT_SPLASH \
-DNXAGENT_ARTSD \
-UNX_DEBUG_INPUT \
- -UPANORAMIX
+ -UPANORAMIX \
+ -UDEBUG_TREE
all:: $(OBJS)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c
index 81ed0c43e..64b6583bf 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -74,7 +74,7 @@ is" without express or implied warranty.
#undef DEBUG
#undef DUMP
-#define NXAGENT_VERSION "3.3.0"
+#define NXAGENT_VERSION "3.4.0"
/*
* ProcVector array defined in tables.c.
@@ -193,7 +193,7 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
if (serverGeneration <= 1)
{
fprintf(stderr, "\nNXAGENT - Version " NXAGENT_VERSION "\n\n");
- fprintf(stderr, "Copyright (C) 2001, 2007 NoMachine.\n");
+ fprintf(stderr, "Copyright (C) 2001, 2010 NoMachine.\n");
fprintf(stderr, "See http://www.nomachine.com/ for more information.\n\n");
fprintf(stderr, "Info: Agent running with pid '%d'.\n", getpid());
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.h b/nx-X11/programs/Xserver/hw/nxagent/Init.h
index 63e27bada..576c1a74d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 73b4c706a..b0aeabeea 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -1791,7 +1791,6 @@ void nxagentResetKeycodeConversion(void)
{
int result;
XkbAgentInfoRec info;
- XkbDescPtr xkb;
result = XkbQueryExtension(nxagentDisplay, &info.Opcode, &info.EventBase,
&info.ErrorBase, &info.MajorVersion,
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h
index 50dd2be78..1a953358a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
index ea06913f8..de1da8654 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -31,6 +31,12 @@
extern Bool nxagentWMIsRunning;
extern Bool nxagentIpaq;
+#ifdef NX_DEBUG_INPUT
+int nxagentDebugInputDevices = 0;
+unsigned long nxagentLastInputDevicesDumpTime = 0;
+extern void nxagentDeactivateInputDevicesGrabs();
+#endif
+
/*
* Set here the required log level.
*/
@@ -86,6 +92,18 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
{
switch (sym)
{
+ #ifdef DEBUG_TREE
+
+ case XK_q:
+ case XK_Q:
+ {
+ *result = doDebugTree;
+
+ break;
+ }
+
+ #endif /* DEBUG_TREE */
+
case XK_t:
case XK_T:
{
@@ -209,6 +227,105 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
}
#endif
+
+ #ifdef NX_DEBUG_INPUT
+
+ case XK_X:
+ case XK_x:
+ {
+ /*
+ * Used to test the input devices state.
+ */
+
+ if (X -> type == KeyPress)
+ {
+ if (nxagentDebugInputDevices == 0)
+ {
+ fprintf(stderr, "Info: Turning input devices debug ON.\n");
+
+ nxagentDebugInputDevices = 1;
+ }
+ else
+ {
+ fprintf(stderr, "Info: Turning input devices debug OFF.\n");
+
+ nxagentDebugInputDevices = 0;
+
+ nxagentLastInputDevicesDumpTime = 0;
+ }
+ }
+
+ return 1;
+ }
+
+ case XK_Y:
+ case XK_y:
+ {
+ /*
+ * Used to deactivate input devices grab.
+ */
+
+ if (X -> type == KeyPress)
+ {
+ nxagentDeactivateInputDevicesGrabs();
+ }
+
+ return 1;
+ }
+
+ #endif
+ }
+ }
+ else if ((X -> state & nxagentAltMetaMask) &&
+ ((X -> state & (ControlMask | ShiftMask)) == (ControlMask |
+ ShiftMask)))
+ {
+ switch (sym)
+ {
+ case XK_Left:
+ case XK_KP_Left:
+ {
+ if (nxagentOption(Rootless) == 0 &&
+ nxagentOption(DesktopResize) == 0)
+ {
+ *result = doViewportMoveLeft;
+ }
+
+ break;
+ }
+ case XK_Up:
+ case XK_KP_Up:
+ {
+ if (nxagentOption(Rootless) == 0 &&
+ nxagentOption(DesktopResize) == 0)
+ {
+ *result = doViewportMoveUp;
+ }
+
+ break;
+ }
+ case XK_Right:
+ case XK_KP_Right:
+ {
+ if (nxagentOption(Rootless) == 0 &&
+ nxagentOption(DesktopResize) == 0)
+ {
+ *result = doViewportMoveRight;
+ }
+
+ break;
+ }
+ case XK_Down:
+ case XK_KP_Down:
+ {
+ if (nxagentOption(Rootless) == 0 &&
+ nxagentOption(DesktopResize) == 0)
+ {
+ *result = doViewportMoveDown;
+ }
+
+ break;
+ }
}
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
index 49a35db1d..e9ca59ff2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/LICENSE b/nx-X11/programs/Xserver/hw/nxagent/LICENSE
index f3e15ee70..141ca13ea 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/LICENSE
+++ b/nx-X11/programs/Xserver/hw/nxagent/LICENSE
@@ -1,4 +1,4 @@
-Copyright (C) 2001, 2007 NoMachine - http://www.nomachine.com/.
+Copyright (c) 2001, 2010 NoMachine - http://www.nomachine.com/.
NXAGENT and NX extensions to X are copyright of NoMachine.
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Literals.h b/nx-X11/programs/Xserver/hw/nxagent/Literals.h
index f6aab84e4..377dd7e25 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Literals.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Literals.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Millis.c b/nx-X11/programs/Xserver/hw/nxagent/Millis.c
index 38435d9a8..bde85f090 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Millis.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Millis.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Millis.h b/nx-X11/programs/Xserver/hw/nxagent/Millis.h
index 8ee380ae1..2125eca3e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Millis.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Millis.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index 90da743a2..5106ffa8c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c.NX.original
index 90da743a2..5106ffa8c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
index 83103ffd6..0d8584218 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c.NX.original
index 83103ffd6..0d8584218 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index dd607e0ca..cd8ced7a6 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c.NX.original
index dd607e0ca..cd8ced7a6 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c
index 295b885c2..852ad1503 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c.NX.original
index 295b885c2..852ad1503 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c
index dfd82b76b..55248195f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c.NX.original
index dfd82b76b..55248195f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
index 599e4c616..614d2db39 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c.NX.original
index 599e4c616..614d2db39 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h
index 970d0bb4d..08ffb35b0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h.NX.original
index 970d0bb4d..08ffb35b0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c
index 2521ae5c7..806cf2900 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c.NX.original
index 2521ae5c7..806cf2900 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
index 64ba970c9..a9c501b34 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c.NX.original
index 64ba970c9..a9c501b34 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h b/nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h
index a1790c3f0..26a95fe9f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h.NX.original
index a1790c3f0..26a95fe9f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicturestr.h.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
index f5cf91607..14b6136d4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c.NX.original
index f5cf91607..14b6136d4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrandr.c b/nx-X11/programs/Xserver/hw/nxagent/NXrandr.c
index 6f53dcdad..b7039e1e0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXrandr.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXrandr.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrandr.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXrandr.c.NX.original
index 6f53dcdad..b7039e1e0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXrandr.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXrandr.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
index 20aca4619..0940a3602 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
@@ -31,7 +31,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -40,7 +40,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c.NX.original
index 20aca4619..0940a3602 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c.NX.original
@@ -31,7 +31,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -40,7 +40,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
index 16328f9ab..0954cf8ae 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c.NX.original
index 16328f9ab..0954cf8ae 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c.NX.original
@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXxrandr.c b/nx-X11/programs/Xserver/hw/nxagent/NXxrandr.c
index 91dafb6c6..8d05175ff 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXxrandr.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXxrandr.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXxrandr.h b/nx-X11/programs/Xserver/hw/nxagent/NXxrandr.h
index 3fb504ea9..4e800e96d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXxrandr.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXxrandr.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXxrandrint.h b/nx-X11/programs/Xserver/hw/nxagent/NXxrandrint.h
index 33b05b1f0..ae3a03d86 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXxrandrint.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXxrandrint.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c
index 64dbe3b42..1f04b0daf 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -39,6 +39,11 @@ AgentOptionsRec nxagentOptionsBackup;
AgentOptionsPtr nxagentOptionsPtr = &nxagentOptions;
/*
+ * If this is set, print the geometry in the block handler.
+ */
+
+unsigned int nxagentPrintGeometryFlags = 0;
+/*
* This must be called at startup to initialize
* the options repository to the default values.
*/
@@ -58,6 +63,9 @@ void nxagentInitOptions()
nxagentOptions.Height = 0;
nxagentOptions.BorderWidth = 0;
+ nxagentOptions.WMBorderWidth = -1;
+ nxagentOptions.WMTitleHeight = -1;
+
nxagentOptions.SavedX = 0;
nxagentOptions.SavedY = 0;
nxagentOptions.SavedWidth = 0;
@@ -163,6 +171,9 @@ void nxagentResetOptions()
nxagentOptions.TileWidth = UNDEFINED;
nxagentOptions.TileHeight = UNDEFINED;
+
+ nxagentOptions.WMBorderWidth = -1;
+ nxagentOptions.WMTitleHeight = -1;
}
void nxagentSaveOptions()
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h
index aa78489b1..1bc7eaa4c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -29,6 +29,8 @@
#define UNDEFINED -1
#define COPY_UNLIMITED -1
+extern unsigned int nxagentPrintGeometryFlags;
+
typedef enum _BackingStoreMode
{
BackingStoreUndefined = -1,
@@ -124,6 +126,9 @@ typedef struct _AgentOptions
* screen.
*/
+ int WMBorderWidth;
+ int WMTitleHeight;
+
int SavedX;
int SavedY;
int SavedWidth;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixels.c b/nx-X11/programs/Xserver/hw/nxagent/Pixels.c
index 03970a14f..10c705dfc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixels.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixels.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixels.h b/nx-X11/programs/Xserver/hw/nxagent/Pixels.h
index f9f88233e..ea7c375ee 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixels.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixels.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -108,6 +108,12 @@ FIXME: The condition checking for the render
avoid problems with the render composi-
te on XFree86 remote server.
*/
+/*
+FIXME: Changed macro: NXAGENT_SHOULD_DEFER_COMPOSITE
+ to handle situation, when pSrc -> pDrawable
+ is NULL. This case happens with gradients
+ and solid fill.
+
#define NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst) \
((nxagentRenderVersionMajor == 0 && \
nxagentRenderVersionMinor == 8 && \
@@ -118,6 +124,18 @@ FIXME: The condition checking for the render
nxagentOption(DeferLevel) == 1) || \
(nxagentOption(DeferLevel) >= 2 && \
nxagentOption(LinkType) < LINK_TYPE_ADSL))
+*/
+#define NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst) \
+ ((nxagentRenderVersionMajor == 0 && \
+ nxagentRenderVersionMinor == 8 && \
+ (pDst) -> pDrawable -> type == DRAWABLE_PIXMAP) || \
+ (nxagentOption(DeferLevel) >= 2 && \
+ nxagentOption(LinkType) < LINK_TYPE_ADSL) || \
+ (nxagentOption(DeferLevel) == 1 && \
+ (pDst) -> pDrawable -> type == DRAWABLE_PIXMAP && \
+ (((pSrc) -> pDrawable && nxagentDrawableStatus((pSrc) -> pDrawable) == NotSynchronized) || \
+ ((pMask) && nxagentDrawableStatus((pMask) -> pDrawable) == NotSynchronized))))
+
#define NXAGENT_SHOULD_DEFER_PUTIMAGE(pDrawable) \
(nxagentSplitTrap == 0 && \
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index 4aea92e2d..1718c7363 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h b/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
index 5cf340d36..234650dd4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c
index f53dfbe52..9c1bfaace 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -57,6 +57,13 @@ is" without express or implied warranty.
#undef TEST
#undef DEBUG
+/*
+ * The nxagentReversePointerMap array is used to
+ * memorize remote display pointer map.
+ */
+
+unsigned char nxagentReversePointerMap[MAXBUTTONS];
+
void nxagentChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl)
{
/*
@@ -125,6 +132,8 @@ int nxagentPointerProc(DeviceIntPtr pDev, int onoff)
return Success;
}
+ nxagentInitPointerMap();
+
nxagentEnablePointerEvents();
break;
@@ -155,3 +164,28 @@ int nxagentPointerProc(DeviceIntPtr pDev, int onoff)
return Success;
}
+
+void nxagentInitPointerMap(void)
+{
+ int numButtons;
+
+ int i;
+
+ unsigned char pointerMap[MAXBUTTONS];
+
+ #ifdef DEBUG
+ fprintf(stderr, "nxagentInitPointerMap: Going to retrieve the "
+ "pointer map from remote display.\n");
+ #endif
+
+ numButtons = XGetPointerMapping(nxagentDisplay, pointerMap, MAXBUTTONS);
+
+ /*
+ * Computing revers pointer map.
+ */
+
+ for (i = 1; i <= numButtons; i++)
+ {
+ nxagentReversePointerMap[pointerMap[i - 1] - 1] = i;
+ }
+}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pointer.h b/nx-X11/programs/Xserver/hw/nxagent/Pointer.h
index 2adee6cb3..b0bb3f99c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pointer.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pointer.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -38,8 +38,17 @@ is" without express or implied warranty.
(ButtonPressMask | ButtonReleaseMask | PointerMotionMask | \
EnterWindowMask | LeaveWindowMask)
+/*
+ * The nxagentReversePointerMap array is used to
+ * memorize remote display pointer map.
+ */
+
+extern unsigned char nxagentReversePointerMap[MAXBUTTONS];
+
void nxagentChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl);
int nxagentPointerProc(DeviceIntPtr pDev, int onoff);
+void nxagentInitPointerMap(void);
+
#endif /* __Pointer_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index 69b73a942..e63b481b2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -81,6 +81,8 @@ extern Bool nxagentUninstallFontServerPath(void);
extern void nxagentRemoveXConnection(void);
+extern void nxagentInitPointerMap(void);
+
static char *nxagentGetReconnectError(void);
void nxagentInitializeRecLossyLevel(void);
@@ -257,7 +259,11 @@ TODO: This should be reset only when
if ((dispatchException & DE_TERMINATE) == 0)
{
+ #ifdef NX_DEBUG_INPUT
+ fprintf(stderr, "Session: Session suspended at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis());
+ #else
fprintf(stderr, "Session: Session suspended at '%s'.\n", GetTimeAsString());
+ #endif
}
nxagentResetDisplayHandlers();
@@ -580,6 +586,8 @@ Bool nxagentReconnectSession(void)
nxagentOldKeyboard = NULL;
}
+ nxagentInitPointerMap();
+
nxagentDeactivatePointerGrab();
nxagentWakeupByReconnect();
@@ -609,7 +617,11 @@ Bool nxagentReconnectSession(void)
goto nxagentReconnectError;
}
+ #ifdef NX_DEBUG_INPUT
+ fprintf(stderr, "Session: Session resumed at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis());
+ #else
fprintf(stderr, "Session: Session resumed at '%s'.\n", GetTimeAsString());
+ #endif
nxagentRemoveSplashWindow(NULL);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h
index 0a2a8a6a7..12d0742df 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c
index f2d7b15f9..4f0f76474 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -147,8 +147,6 @@ void nxagentCursorPostSaveRenderInfo(CursorPtr pCursor, ScreenPtr pScreen,
int nxagentCreatePicture(PicturePtr pPicture, Mask mask);
-void nxagentDestroyPicture(PicturePtr pPicture);
-
int nxagentChangePictureClip(PicturePtr pPicture, int clipType, int nRects,
xRectangle *rects, int xOrigin, int yOrigin);
@@ -1010,12 +1008,15 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD
#ifdef DEBUG
- fprintf(stderr, "nxagentComposite: Source Picture [%lu][%p] with drawable [%s%s][%p].\n",
- nxagentPicturePriv(pSrc) -> picture, (void *) pSrc,
- (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP &&
- nxagentIsShmPixmap((PixmapPtr) pSrc -> pDrawable)) ? "Shared " : "",
- pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "Pixmap" : "Window",
- (void *) pSrc -> pDrawable);
+ if (pSrc -> pDrawable != NULL)
+ {
+ fprintf(stderr, "nxagentComposite: Source Picture [%lu][%p] with drawable [%s%s][%p].\n",
+ nxagentPicturePriv(pSrc) -> picture, (void *) pSrc,
+ (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP &&
+ nxagentIsShmPixmap((PixmapPtr) pSrc -> pDrawable)) ? "Shared " : "",
+ pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "Pixmap" : "Window",
+ (void *) pSrc -> pDrawable);
+ }
fprintf(stderr, "nxagentComposite: Destination Picture [%lu][%p] with drawable [%s%s][%p].\n",
nxagentPicturePriv(pDst) -> picture, (void *) pDst,
@@ -1064,16 +1065,19 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD
* the wrong data.
*/
- nxagentSynchronizeShmPixmap(pSrc -> pDrawable, xSrc, ySrc, width, height);
-
- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
+ if (pSrc -> pDrawable != NULL)
{
- #ifdef TEST
- fprintf(stderr, "nxagentComposite: Synchronizing the source drawable [%p].\n",
- (void *) pSrc -> pDrawable);
- #endif
+ nxagentSynchronizeShmPixmap(pSrc -> pDrawable, xSrc, ySrc, width, height);
- nxagentSynchronizeDrawable(pSrc -> pDrawable, DO_WAIT, NEVER_BREAK, NULL);
+ if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
+ {
+ #ifdef TEST
+ fprintf(stderr, "nxagentComposite: Synchronizing the source drawable [%p].\n",
+ (void *) pSrc -> pDrawable);
+ #endif
+
+ nxagentSynchronizeDrawable(pSrc -> pDrawable, DO_WAIT, NEVER_BREAK, NULL);
+ }
}
if (pDst -> pDrawable != pSrc -> pDrawable)
@@ -2811,3 +2815,248 @@ Bool nxagentDisconnectAllPicture()
return True;
}
+void nxagentRenderCreateSolidFill(PicturePtr pPicture, xRenderColor *color)
+{
+ Picture id;
+
+ if (nxagentRenderEnable == False)
+ {
+ return;
+ }
+
+ #ifdef DEBUG
+
+ fprintf(stderr, "nxagentRenderCreateSolidFill: Got called.\n");
+
+ if (pPicture == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateSolidFill: WARNING! pPicture pointer is NULL.\n");
+ }
+
+ if (color == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateSolidFill: WARNING! color pointer is NULL.\n");
+ }
+
+ #endif /* #ifdef DEBUG */
+
+ memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0,
+ sizeof(XRenderPictureAttributes_));
+
+ id = XRenderCreateSolidFill(nxagentDisplay, (XRenderColor *) color);
+
+ #ifdef DEBUG
+ XSync(nxagentDisplay, 0);
+ #endif
+
+ #ifdef TEST
+ fprintf(stderr, "nxagentRenderCreateSolidFill: Created solid fill xid [%lu].\n", id);
+ #endif
+
+ nxagentPicturePriv(pPicture) -> picture = id;
+}
+
+void nxagentRenderCreateLinearGradient(PicturePtr pPicture, xPointFixed *p1,
+ xPointFixed *p2, int nStops,
+ xFixed *stops,
+ xRenderColor *colors)
+{
+ Picture id;
+
+ XLinearGradient linearGradient;
+
+ if (nxagentRenderEnable == False)
+ {
+ return;
+ }
+
+ #ifdef DEBUG
+
+ fprintf(stderr, "nxagentRenderCreateLinearGradient: Got called.\n");
+
+ if (pPicture == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateLinearGradient: WARNING! pPicture pointer is NULL.\n");
+ }
+
+ if (p1 == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateLinearGradient: WARNING! p1 pointer is NULL.\n");
+ }
+
+ if (p2 == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateLinearGradient: WARNING! p2 pointer is NULL.\n");
+ }
+
+ if (stops == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateLinearGradient: WARNING! stops pointer is NULL.\n");
+ }
+
+ if (colors == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateLinearGradient: WARNING! colors pointer is NULL.\n");
+ }
+
+ #endif /* #ifdef DEBUG */
+
+ memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0,
+ sizeof(XRenderPictureAttributes_));
+
+ linearGradient.p1.x = (XFixed) p1 -> x;
+ linearGradient.p1.y = (XFixed) p1 -> y;
+ linearGradient.p2.x = (XFixed) p2 -> x;
+ linearGradient.p2.y = (XFixed) p2 -> y;
+
+ id = XRenderCreateLinearGradient(nxagentDisplay, &linearGradient,
+ (XFixed *) stops,
+ (XRenderColor *) colors, nStops);
+
+ #ifdef DEBUG
+ XSync(nxagentDisplay, 0);
+ #endif
+
+ #ifdef TEST
+ fprintf(stderr, "nxagentRenderCreateLinearGradient: Created linear gradient xid [%lu].\n", id);
+ #endif
+
+ nxagentPicturePriv(pPicture) -> picture = id;
+}
+
+void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner,
+ xPointFixed *outer,
+ xFixed innerRadius,
+ xFixed outerRadius,
+ int nStops,
+ xFixed *stops,
+ xRenderColor *colors)
+{
+ Picture id;
+
+ XRadialGradient radialGradient;
+
+ if (nxagentRenderEnable == False)
+ {
+ return;
+ }
+
+ #ifdef DEBUG
+
+ fprintf(stderr, "nxagentRenderCreateRadialGradient: Got called.\n");
+
+ if (pPicture == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateRadialGradient: WARNING! pPicture pointer is NULL.\n");
+ }
+
+ if (inner == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateRadialGradient: WARNING! inner pointer is NULL.\n");
+ }
+
+ if (outer == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateRadialGradient: WARNING! outer pointer is NULL.\n");
+ }
+
+ if (stops == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateRadialGradient: WARNING! stops pointer is NULL.\n");
+ }
+
+ if (colors == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateRadialGradient: WARNING! colors pointer is NULL.\n");
+ }
+
+ #endif /* #ifdef DEBUG */
+
+ memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0,
+ sizeof(XRenderPictureAttributes_));
+
+ radialGradient.inner.x = (XFixed) inner -> x;
+ radialGradient.inner.y = (XFixed) inner -> y;
+ radialGradient.inner.radius = (XFixed) innerRadius;
+ radialGradient.outer.x = (XFixed) outer -> x;
+ radialGradient.outer.y = (XFixed) outer -> y;
+ radialGradient.outer.radius = (XFixed) outerRadius;
+
+ id = XRenderCreateRadialGradient(nxagentDisplay, &radialGradient,
+ (XFixed *) stops,
+ (XRenderColor *) colors, nStops);
+
+ #ifdef DEBUG
+ XSync(nxagentDisplay, 0);
+ #endif
+
+ #ifdef TEST
+ fprintf(stderr, "nxagentRenderCreateRadialGradient: Created radial gradient xid [%lu].\n", id);
+ #endif
+
+ nxagentPicturePriv(pPicture) -> picture = id;
+}
+
+void nxagentRenderCreateConicalGradient(PicturePtr pPicture,
+ xPointFixed *center,
+ xFixed angle, int nStops,
+ xFixed *stops,
+ xRenderColor *colors)
+{
+ Picture id;
+
+ XConicalGradient conicalGradient;
+
+ if (nxagentRenderEnable == False)
+ {
+ return;
+ }
+
+ #ifdef DEBUG
+
+ fprintf(stderr, "nxagentRenderCreateConicalGradient: Got called.\n");
+
+ if (pPicture == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateConicalGradient: WARNING! pPicture pointer is NULL.\n");
+ }
+
+ if (center == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateConicalGradient: WARNING! center pointer is NULL.\n");
+ }
+
+ if (stops == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateConicalGradient: WARNING! stops pointer is NULL.\n");
+ }
+
+ if (colors == NULL)
+ {
+ fprintf(stderr, "nxagentRenderCreateConicalGradient: WARNING! colors pointer is NULL.\n");
+ }
+
+ #endif /* #ifdef DEBUG */
+
+ memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0,
+ sizeof(XRenderPictureAttributes_));
+
+ conicalGradient.center.x = (XFixed) center -> x;
+ conicalGradient.center.y = (XFixed) center -> y;
+ conicalGradient.angle = (XFixed) angle;
+
+ id = XRenderCreateConicalGradient(nxagentDisplay, &conicalGradient,
+ (XFixed *) stops,
+ (XRenderColor *) colors, nStops);
+
+ #ifdef DEBUG
+ XSync(nxagentDisplay, 0);
+ #endif
+
+ #ifdef TEST
+ fprintf(stderr, "nxagentRenderCreateConicalGradient: Created conical gradient xid [%lu].\n", id);
+ #endif
+
+ nxagentPicturePriv(pPicture) -> picture = id;
+}
+
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.h b/nx-X11/programs/Xserver/hw/nxagent/Render.h
index 240dc3901..4346a4e1e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -105,4 +105,6 @@ void nxagentDisconnectPicture(pointer p0, XID x1, void* p2);
void nxagentReconnectGlyphSet(void* p0, XID x1, void *p2);
+void nxagentDestroyPicture(PicturePtr pPicture);
+
#endif /* __Render_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
index 79cb74efa..612e71cf7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -60,6 +60,27 @@ typedef struct
}
nxagentWMHints;
+/*
+ * This structure is compatible with 32
+ * and 64 bit library interface. It has
+ * been copied from Xatomtype.h and it's
+ * a parameter of XChangeProperty().
+ */
+
+typedef struct
+{
+ unsigned long flags;
+ long input;
+ long initialState;
+ unsigned long iconPixmap;
+ unsigned long iconWindow;
+ long iconX;
+ long iconY;
+ unsigned long iconMask;
+ unsigned long windowGroup;
+}
+nxagentPropWMHints;
+
WindowPtr nxagentRootlessWindow = NULL;
#define TOP_LEVEL_TABLE_UNIT 100
@@ -429,6 +450,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
Atom propertyX, typeX;
char *output = NULL;
nxagentWMHints wmHints;
+ nxagentPropWMHints propHints;
Bool export = False;
Bool freeMem = False;
@@ -489,8 +511,22 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
wmHints.flags |= InputHint;
wmHints.input = True;
- output = (char*) &wmHints;
- export = True;
+ /*
+ * Initialize the structure used in XChangeProperty().
+ */
+
+ propHints.flags = wmHints.flags;
+ propHints.input = (wmHints.input == True ? 1 : 0);
+ propHints.initialState = wmHints.initial_state;
+ propHints.iconPixmap = wmHints.icon_pixmap;
+ propHints.iconWindow = wmHints.icon_window;
+ propHints.iconX = wmHints.icon_x;
+ propHints.iconY = wmHints.icon_y;
+ propHints.iconMask = wmHints.icon_mask;
+ propHints.windowGroup = wmHints.window_group;
+
+ output = (char*) &propHints;
+ export = True;
if ((wmHints.flags & IconPixmapHint) && (wmHints.icon_pixmap != None))
{
@@ -504,17 +540,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
nxagentSynchronizeRegion((DrawablePtr) icon, NullRegion, NEVER_BREAK, NULL);
}
- wmHints.icon_pixmap = nxagentPixmap(icon);
+ propHints.iconPixmap = nxagentPixmap(icon);
}
else
{
- wmHints.flags &= ~IconPixmapHint;
+ propHints.flags &= ~IconPixmapHint;
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon pixmap %x from hint "
"exporting property %s type %s on window %p.\n",
(unsigned int) wmHints.icon_pixmap, propertyS, typeS,
- (void*)pWin);
+ (void *) pWin);
#endif
}
}
@@ -526,17 +562,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if (icon)
{
- wmHints.icon_window = nxagentWindow(icon);
+ propHints.iconWindow = nxagentWindow(icon);
}
else
{
- wmHints.flags &= ~IconWindowHint;
+ propHints.flags &= ~IconWindowHint;
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon window %x from hint "
"exporting property %s type %s on window %p.\n",
(unsigned int) wmHints.icon_window, propertyS, typeS,
- (void*)pWin);
+ (void *) pWin);
#endif
}
}
@@ -548,17 +584,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if (icon)
{
- wmHints.icon_mask = nxagentPixmap(icon);
+ propHints.iconMask = nxagentPixmap(icon);
}
else
{
- wmHints.flags &= ~IconMaskHint;
+ propHints.flags &= ~IconMaskHint;
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon mask %x from hint "
"exporting property %s type %s on window %p.\n",
(unsigned int) wmHints.icon_mask, propertyS, typeS,
- (void*)pWin);
+ (void *) pWin);
#endif
}
}
@@ -570,17 +606,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if (window)
{
- wmHints.window_group = nxagentWindow(window);
+ propHints.windowGroup = nxagentWindow(window);
}
else
{
- wmHints.flags &= ~WindowGroupHint;
+ propHints.flags &= ~WindowGroupHint;
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up window group %x from hint "
"exporting property %s type %s on window %p.\n",
(unsigned int) wmHints.window_group, propertyS, typeS,
- (void*)pWin);
+ (void *) pWin);
#endif
}
}
@@ -590,6 +626,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
XlibAtom *atoms = malloc(nUnits * sizeof(*atoms));
Atom *input = value;
int i;
+ int j = 0;
freeMem = True;
export = True;
@@ -597,16 +634,40 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
for (i = 0; i < nUnits; i++)
{
- atoms[i] = nxagentLocalToRemoteAtom(input[i]);
-
- if (atoms[i] == None)
- {
- #ifdef WARNING
- fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom %ld [%s].\n",
- (long int) input[i], validateString(NameForAtom(input[i])));
- #endif
- }
+ /*
+ * Exporting the _NET_WM_PING property could
+ * result in rootless windows being grayed out
+ * when the compiz window manager is running.
+ *
+ * Better solution would probably be to handle
+ * the communication with the window manager
+ * instead of just getting rid of the property.
+ */
+
+ if (strcmp(NameForAtom(input[i]), "_NET_WM_PING") != 0)
+ {
+ atoms[j] = nxagentLocalToRemoteAtom(input[i]);
+
+ if (atoms[j] == None)
+ {
+ #ifdef WARNING
+ fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom %ld [%s].\n",
+ (long int) input[i], validateString(NameForAtom(input[i])));
+ #endif
+ }
+
+ j++;
+ }
+ #ifdef TEST
+ else
+ {
+ fprintf(stderr, "nxagentExportProperty: WARNING! "
+ "Not exporting the _NET_WM_PING property.\n");
+ }
+ #endif
}
+
+ nUnits = j;
}
else if (strcmp(typeS, "WINDOW") == 0)
{
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.h b/nx-X11/programs/Xserver/hw/nxagent/Rootless.h
index 90d25d0c1..ece4c9d31 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 524bafd10..2db7df8fe 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -160,7 +160,6 @@ void nxagentPropagateArtsdProperties(ScreenPtr pScreen, char *port);
#endif
-Window nxagentIconWindow = None;
Window nxagentFullscreenWindow = None;
#ifdef VIEWPORT_FRAME
@@ -288,166 +287,6 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo)
}
}
-void nxagentMinimizeFromFullScreen(ScreenPtr pScreen)
-{
- XUnmapWindow(nxagentDisplay, nxagentFullscreenWindow);
-
- if(nxagentIpaq)
- {
- XMapWindow(nxagentDisplay, nxagentIconWindow);
- XIconifyWindow(nxagentDisplay, nxagentIconWindow,
- DefaultScreen(nxagentDisplay));
- }
- else
- {
- XIconifyWindow(nxagentDisplay, nxagentIconWindow,
- DefaultScreen(nxagentDisplay));
- }
-}
-
-void nxagentMaximizeToFullScreen(ScreenPtr pScreen)
-{
- if(nxagentIpaq)
- {
- XUnmapWindow(nxagentDisplay, nxagentIconWindow);
-
- XMapWindow(nxagentDisplay, nxagentFullscreenWindow);
- }
- else
- {
-/*
- XUnmapWindow(nxagentDisplay, nxagentIconWindow);
-*/
-/*
-FIXME: We'll chech for ReparentNotify and LeaveNotify events after XReparentWindow()
- in order to avoid the session window is iconified.
- We could avoid the sesssion window is iconified when a LeaveNotify event is received,
- so this check would be unnecessary.
-*/
- struct timeval timeout;
- int i;
- XEvent e;
-
- XReparentWindow(nxagentDisplay, nxagentFullscreenWindow,
- RootWindow(nxagentDisplay, DefaultScreen(nxagentDisplay)), 0, 0);
-
- for (i = 0; i < 100 && nxagentWMIsRunning; i++)
- {
- #ifdef TEST
- fprintf(stderr, "nxagentSwitchFullscreen: WARNING! Going to wait for the ReparentNotify event.\n");
- #endif
-
- if (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, ReparentNotify, &e))
- {
- break;
- }
-
- XSync(nxagentDisplay, 0);
-
- timeout.tv_sec = 0;
- timeout.tv_usec = 50 * 1000;
-
- nxagentWaitEvents(nxagentDisplay, &timeout);
- }
-
- XMapRaised(nxagentDisplay, nxagentFullscreenWindow);
-
- XIconifyWindow(nxagentDisplay, nxagentIconWindow,
- DefaultScreen(nxagentDisplay));
-
- while (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, LeaveNotify, &e));
-/*
- XMapWindow(nxagentDisplay, nxagentIconWindow);
-*/
- }
-}
-
-Window nxagentCreateIconWindow()
-{
- XSetWindowAttributes attributes;
- unsigned long valuemask;
- char* window_name;
- XTextProperty windowName;
- XSizeHints sizeHints;
- XWMHints wmHints;
- Window w;
- Mask mask;
-
- /*
- * Create icon window.
- */
-
- attributes.override_redirect = False;
- attributes.colormap = DefaultColormap(nxagentDisplay, DefaultScreen(nxagentDisplay));
- attributes.background_pixmap = nxagentScreenSaverPixmap;
- valuemask = CWOverrideRedirect | CWBackPixmap | CWColormap;
-
- #ifdef TEST
- fprintf(stderr, "nxagentCreateIconWindow: Going to create new icon window.\n");
- #endif
-
- w = XCreateWindow(nxagentDisplay, DefaultRootWindow(nxagentDisplay),
- 0, 0, 1, 1, 0,
- DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay)),
- InputOutput,
- DefaultVisual(nxagentDisplay, DefaultScreen(nxagentDisplay)),
- valuemask, &attributes);
-
- #ifdef TEST
- fprintf(stderr, "nxagentCreateIconWindow: Created new icon window with id [%ld].\n",
- nxagentIconWindow);
- #endif
-
- /*
- * Set hints to the window manager for the icon window.
- */
-
- window_name = nxagentWindowName;
- XStringListToTextProperty(&window_name, 1, &windowName);
- sizeHints.flags = PMinSize | PMaxSize;
- sizeHints.min_width = sizeHints.max_width = 1;
- sizeHints.min_height = sizeHints.max_height = 1;
- wmHints.flags = IconPixmapHint | IconMaskHint;
- wmHints.initial_state = IconicState;
- wmHints.icon_pixmap = nxagentIconPixmap;
-
- if (useXpmIcon)
- {
- wmHints.icon_mask = nxagentIconShape;
- wmHints.flags = IconPixmapHint | IconMaskHint;
- }
- else
- {
- wmHints.flags = StateHint | IconPixmapHint;
- }
-
- XSetWMProperties(nxagentDisplay, w,
- &windowName, &windowName,
- NULL , 0 , &sizeHints, &wmHints, NULL);
-
- /*
- * Enable events from the icon window.
- */
-
- nxagentGetDefaultEventMask(&mask);
-
- XSelectInput(nxagentDisplay, w, (mask & ~(KeyPressMask |
- KeyReleaseMask)) | StructureNotifyMask);
-
- /*
- * Notify to client if user closes icon window.
- */
-
- if (nxagentWMIsRunning && !nxagentOption(Rootless))
- {
- XlibAtom deleteWMAtom = nxagentAtoms[2]; /* WM_DELETE_WINDOW */
-
- XSetWMProtocols(nxagentDisplay, w, &deleteWMAtom, 1);
- }
-
- return w;
-}
-
Bool nxagentMagicPixelZone(int x, int y)
{
return (x >= nxagentOption(Width) - 1 && y < 1);
@@ -977,6 +816,8 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen,
nxagentChangeOption(Fullscreen, False);
+ nxagentFullscreenWindow = 0;
+
resetAgentPosition = True;
}
@@ -1382,8 +1223,6 @@ N/A
if (nxagentOption(Fullscreen))
{
- attributes.override_redirect = True;
-
/*
* We need to disable the host's screensaver or
* it will otherwise grab the screen even if it
@@ -1609,8 +1448,7 @@ N/A
if (nxagentDoFullGeneration == 1 ||
nxagentReconnectTrap == 1)
{
- valuemask = CWBackPixel | CWEventMask | CWColormap |
- (nxagentOption(Fullscreen) == 1 ? CWOverrideRedirect : 0);
+ valuemask = CWBackPixel | CWEventMask | CWColormap;
attributes.background_pixel = nxagentBlackPixel;
@@ -1620,8 +1458,6 @@ N/A
if (nxagentOption(Fullscreen) == 1)
{
- attributes.override_redirect = True;
-
if (nxagentReconnectTrap)
{
/*
@@ -1754,7 +1590,7 @@ N/A
sizeHints.width = nxagentOption(RootWidth);
sizeHints.height = nxagentOption(RootHeight);
- if (nxagentOption(DesktopResize) == 1)
+ if (nxagentOption(DesktopResize) == 1 || nxagentOption(Fullscreen) == 1)
{
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
@@ -1799,37 +1635,6 @@ N/A
XClearWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum]);
- if (nxagentOption(Fullscreen))
- {
- valuemask = CWBackPixmap | CWColormap | CWOverrideRedirect;
- }
- else
- {
- valuemask = CWBackPixmap | CWColormap;
- }
-
- attributes.background_pixmap = nxagentScreenSaverPixmap;
- attributes.colormap = DefaultColormap(nxagentDisplay, DefaultScreen(nxagentDisplay));
-
- if (nxagentOption(Fullscreen))
- {
- attributes.override_redirect = False;
- if (nxagentReconnectTrap)
- {
- XGrabKeyboard(nxagentDisplay, nxagentFullscreenWindow, True, GrabModeAsync,
- GrabModeAsync, CurrentTime);
- }
- }
-
- if (nxagentOption(Fullscreen))
- {
- nxagentIconWindow = nxagentCreateIconWindow();
- }
- else
- {
- nxagentIconWindow = 0;
- }
-
/*
* When we don't have window manager we grab keyboard
* to let nxagent get keyboard events.
@@ -1880,13 +1685,6 @@ N/A
*/
XSetWMProtocols(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], &deleteWMatom, 1);
-
- /*
- if (nxagentOption(Fullscreen))
- {
- XSetWMProtocols(nxagentDisplay, nxagentIconWindow, &deleteWMatom, 1);
- }
- */
}
else
{
@@ -2266,13 +2064,10 @@ FIXME: We should try to restore the previously
if (nxagentOption(Fullscreen))
{
- nxagentChangeOption(Width, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)));
- nxagentChangeOption(Height, HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)));
-
- nxagentChangeOption(RootX, (WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay))
- - nxagentOption(RootWidth)) / 2);
- nxagentChangeOption(RootY, (HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay))
- - nxagentOption(RootHeight)) / 2);
+ nxagentChangeOption(RootX, (nxagentOption(Width) -
+ nxagentOption(RootWidth)) / 2);
+ nxagentChangeOption(RootY, (nxagentOption(Height) -
+ nxagentOption(RootHeight)) / 2);
}
else
{
@@ -2284,62 +2079,6 @@ FIXME: We should try to restore the previously
nxagentChangeOption(ViewportYSpan, nxagentOption(Height) - nxagentOption(RootHeight));
/*
- * Change agent window size and size hints.
- */
-
- sizeHints.flags = PPosition | PMinSize | PMaxSize;
- sizeHints.x = nxagentOption(X);
- sizeHints.y = nxagentOption(Y);
-
- sizeHints.min_width = MIN_NXAGENT_WIDTH;
- sizeHints.min_height = MIN_NXAGENT_HEIGHT;
- sizeHints.width = width;
- sizeHints.height = height;
-
- if (nxagentOption(DesktopResize) == 1)
- {
- sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
- sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
- }
- else
- {
- sizeHints.max_width = nxagentOption(RootWidth);
- sizeHints.max_height = nxagentOption(RootHeight);
- }
-
- if (nxagentUserGeometry.flag & XValue || nxagentUserGeometry.flag & YValue)
- {
- sizeHints.flags |= USPosition;
- }
-
- if (nxagentUserGeometry.flag & WidthValue || nxagentUserGeometry.flag & HeightValue)
- {
- sizeHints.flags |= USSize;
- }
-
- XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], &sizeHints);
-
- if (nxagentOption(Fullscreen))
- {
- XResizeWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum],
- WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)),
- HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)));
-
- XResizeWindow(nxagentDisplay, nxagentInputWindows[pScreen -> myNum],
- WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)),
- HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)));
- }
- else
- {
- XResizeWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], width, height);
-
- if (nxagentOption(Rootless) == 0)
- {
- XResizeWindow(nxagentDisplay, nxagentInputWindows[pScreen -> myNum], width, height);
- }
- }
-
- /*
* Set properties for the agent root window.
*/
@@ -2360,8 +2099,6 @@ FIXME: We should try to restore the previously
(*pScreen -> PositionWindow)(WindowTable[pScreen -> myNum], 0, 0);
- pRootWinSize = &WindowTable[pScreen -> myNum] -> winSize;
-
nxagentSetRootClip(pScreen, 1);
XMoveWindow(nxagentDisplay, nxagentWindow(WindowTable[0]),
@@ -2369,12 +2106,17 @@ FIXME: We should try to restore the previously
nxagentMoveViewport(pScreen, 0, 0);
+ /*
+ * Update pointer bounds.
+ */
+
+ ScreenRestructured(pScreen);
+
#ifdef TEST
nxagentPrintAgentGeometry("After Resize Screen", "nxagentResizeScreen:");
#endif
- fprintf(stderr, "Info: Screen [%d] resized to geometry [%dx%d].\n",
- pScreen -> myNum, width, height);
+ nxagentSetPrintGeometry(pScreen -> myNum);
return 1;
@@ -2451,9 +2193,10 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
#endif
#ifdef TEST
- fprintf(stderr, "Info: Init shadow session. nxagentDisplayName [%s] nxagentDisplay "
- "[%p] nxagentShadowDisplayName [%s].\n", nxagentDisplayName,
- (void *) nxagentDisplay, nxagentShadowDisplayName);
+ fprintf(stderr, "Info: Init shadow session. nxagentDisplayName [%s] "
+ "nxagentDisplay [%p] nxagentShadowDisplayName [%s].\n",
+ nxagentDisplayName, (void *) nxagentDisplay,
+ nxagentShadowDisplayName);
#endif
if (nxagentKeyboard != NULL)
@@ -2463,7 +2206,7 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
if(nxagentKeyboard[i] == 0 || nxagentKeyboard[i + 1] == 0 || i == 0)
{
#ifdef WARNING
- fprintf(stderr,"Warning: Wrong keyboard type: %s.\n", nxagentKeyboard);
+ fprintf(stderr,"WARNING! Wrong keyboard type: %s.\n", nxagentKeyboard);
#endif
}
else
@@ -2475,7 +2218,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
}
#ifdef DEBUG
- fprintf(stderr, "nxagentShadowInit: Setting the master uid [%d].\n", nxagentShadowUid);
+ fprintf(stderr, "nxagentShadowInit: Setting the master uid [%d].\n",
+ nxagentShadowUid);
#endif
#if !defined (__CYGWIN32__) && !defined (WIN32)
@@ -2495,8 +2239,9 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
if (NXShadowCreate(nxagentDisplay, layout, nxagentShadowDisplayName,
(void *) &nxagentShadowDisplay) != 1)
{
- #ifdef TEST
- fprintf(stderr, "nxagentShadowInit: Failed to initialize shadow display [%s].\n", nxagentShadowDisplayName);
+ #ifdef PANIIC
+ fprintf(stderr, "nxagentShadowInit: PANIC! Failed to initialize shadow "
+ "display [%s].\n", nxagentShadowDisplayName);
#endif
return -1;
@@ -2519,8 +2264,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
if (NXShadowAddUpdaterDisplay(nxagentDisplay, &nxagentShadowWidth,
&nxagentShadowHeight, &nxagentMasterDepth) == 0)
{
- #ifdef TEST
- fprintf(stderr, "nxagentShadowInit: Failed to add display [%s].\n",
+ #ifdef PANIC
+ fprintf(stderr, "nxagentShadowInit: PANIC! Failed to add display [%s].\n",
nxagentDisplayName);
#endif
@@ -2540,16 +2285,73 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
nxagentOption(RootHeight) * 1.0 / nxagentShadowHeight);
}
- if (DefaultVisualOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) -> class != TrueColor ||
- DefaultVisualOfScreen(DefaultScreenOfDisplay(nxagentShadowDisplay)) -> class != TrueColor)
+ if (DefaultVisualOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) ->
+ class != TrueColor)
{
- #ifdef TEST
- fprintf(stderr, "nxagentShadowInit: PANIC! The visual class is not TrueColor.\n");
+ #ifdef PANIC
+ fprintf(stderr, "nxagentShadowInit: PANIC! The visual class of the remote "
+ "X server is not TrueColor.\n");
#endif
return -1;
}
+ if (DefaultVisualOfScreen(DefaultScreenOfDisplay(nxagentShadowDisplay)) ->
+ class != TrueColor)
+ {
+ #ifdef PANIC
+
+ const char *className;
+
+ switch (DefaultVisualOfScreen(DefaultScreenOfDisplay(nxagentShadowDisplay)) -> class)
+ {
+ case StaticGray:
+ {
+ className = "StaticGray";
+
+ break;
+ }
+ case StaticColor:
+ {
+ className = "StaticColor";
+
+ break;
+ }
+ case PseudoColor:
+ {
+ className = "PseudoColor";
+
+ break;
+ }
+ case DirectColor:
+ {
+ className = "DirectColor";
+
+ break;
+ }
+ case GrayScale:
+ {
+ className = "GrayScale";
+
+ break;
+ }
+ default:
+ {
+ className = "";
+
+ break;
+ }
+ }
+
+ fprintf(stderr, "nxagentShadowInit: PANIC! Cannot shadow the display. "
+ "%s visual class is not supported. Only TrueColor visuals "
+ "are supported.\n", className);
+
+ #endif /* #endif PANIC */
+
+ return -1;
+ }
+
#endif
nxagentShadowDepth = pScreen -> rootDepth;
@@ -2566,7 +2368,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
else if (nxagentShadowDepth == 8)
{
#ifdef PANIC
- fprintf(stderr, "nxagentShadowInit: PANIC! The target depth is 8 bit.\n");
+ fprintf(stderr, "nxagentShadowInit: PANIC! Unable to shadow a %d bit "
+ "display with a 8 bit screen depth.\n", nxagentMasterDepth);
#endif
return -1;
@@ -2585,7 +2388,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
else if (nxagentShadowDepth == 8)
{
#ifdef PANIC
- fprintf(stderr, "nxagentShadowInit: PANIC! The target depth is 8 bit.\n");
+ fprintf(stderr, "nxagentShadowInit: PANIC! Unable to shadow a 16 bit "
+ "display with a 8 bit screen depth.\n");
#endif
return -1;
@@ -2600,7 +2404,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
if (nxagentShadowDepth != 8)
{
#ifdef PANIC
- fprintf(stderr, "nxagentShadowInit: PANIC! The target depth is 8 bit.\n");
+ fprintf(stderr, "nxagentShadowInit: PANIC! Unable to shadow a 8 bit "
+ "display with a %d bit screen depth.\n", nxagentShadowDepth);
#endif
return -1;
@@ -3046,7 +2851,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height,
#ifdef WARNING
fprintf(stderr, "nxagentCorrectDepthShadow: WARNING! Visual not found. Using default visual.\n");
#endif
-
+
pVisual = nxagentVisuals[nxagentDefaultVisualIndex].visual;
}
@@ -3473,10 +3278,10 @@ int nxagentRRSetScreenConfig(ScreenPtr pScreen, int width, int height)
RRScreenSizePtr oldSizes;
pScrPriv = rrGetScrPriv(pScreen);
-
+
oldWidth = pScreen->width;
oldHeight = pScreen->height;
-
+
if (!pScrPriv)
{
return 1;
@@ -3556,7 +3361,7 @@ int nxagentRRSetScreenConfig(ScreenPtr pScreen, int width, int height)
}
RREditConnectionInfo (pScreen);
-
+
/*
* Fix pointer bounds and location
*/
@@ -3694,7 +3499,8 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg,
return;
}
-void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg, int yorg, WindowPtr pWin)
+void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg,
+ int yorg, WindowPtr pWin)
{
PixmapPtr pVirtualPixmap;
RegionPtr clipRegion;
@@ -3710,6 +3516,14 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg, int
BoxRec extents;
miBSWindowPtr pBackingStore;
+ /*
+ * Limit the area to restore to the
+ * root window size.
+ */
+
+ REGION_INTERSECT(pWin -> pScreen, prgnRestore, prgnRestore,
+ &WindowTable[pWin -> drawable.pScreen -> myNum] -> winSize);
+
pBackingStore = (miBSWindowPtr) pWin -> backStorage;
pVirtualPixmap = nxagentVirtualPixmap(pPixmap);
@@ -3903,6 +3717,24 @@ void nxagentShadowAdaptToRatio(void)
REGION_UNINIT(pScreen, &region);
}
+void nxagentPrintGeometry()
+{
+ int i;
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ {
+ if (nxagentPrintGeometryFlags && (1 << i))
+ {
+ fprintf(stderr, "Info: Screen [%d] resized to geometry [%dx%d] "
+ "fullscreen [%d].\n", i, screenInfo.screens[i] -> width,
+ screenInfo.screens[i] -> height,
+ nxagentOption(Fullscreen));
+ }
+ }
+
+ nxagentPrintGeometryFlags = 0;
+}
+
#ifdef DUMP
void nxagentShowPixmap(PixmapPtr pPixmap, int x, int y, int width, int height)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.h b/nx-X11/programs/Xserver/hw/nxagent/Screen.h
index 3550dd553..1ab6caad2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -36,6 +36,9 @@ is" without express or implied warranty.
#define MIN_NXAGENT_HEIGHT 60
#define NXAGENT_FRAME_WIDTH 2000
+#define nxagentSetPrintGeometry(screen) \
+ nxagentPrintGeometryFlags = (1 << (screen));
+
extern int nxagentClients;
extern int nxagentAutoDisconnectTimeout;
@@ -44,7 +47,6 @@ extern ScreenPtr nxagentDefaultScreen;
extern Pixmap nxagentPixmapLogo;
-extern Window nxagentIconWindow;
extern Window nxagentFullscreenWindow;
extern RegionRec nxagentShadowUpdateRegion;
@@ -58,6 +60,8 @@ extern short nxagentShadowUid;
void nxagentSetScreenInfo(ScreenInfo *screenInfo);
void nxagentSetPixmapFormats(ScreenInfo *screenInfo);
+void nxagentPrintGeometry();
+
extern Window nxagentDefaultWindows[MAXSCREENS];
extern Window nxagentInputWindows[MAXSCREENS];
extern Window nxagentScreenSaverWindows[MAXSCREENS];
@@ -83,11 +87,6 @@ extern int nxagentBitsPerPixel(int depth);
void nxagentSetScreenSaverTime(void);
-void nxagentMinimizeFromFullScreen(ScreenPtr pScreen);
-void nxagentMaximizeToFullScreen(ScreenPtr pScreen);
-
-Window nxagentCreateIconWindow(void);
-
Bool nxagentMagicPixelZone(int x, int y);
Bool nxagentResizeScreen(ScreenPtr pScreen, int width, int height,
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
index 8de74b85b..24dbf1413 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h
index bcc3a90b1..86920ad8b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Split.c b/nx-X11/programs/Xserver/hw/nxagent/Split.c
index 8f1c65eba..bf7f705b9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Split.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Split.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Split.h b/nx-X11/programs/Xserver/hw/nxagent/Split.h
index 397feef16..60be29b39 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Split.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Split.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c b/nx-X11/programs/Xserver/hw/nxagent/TestExt.c
index 704c63e51..1d5fdee20 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/TestExt.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Trap.c b/nx-X11/programs/Xserver/hw/nxagent/Trap.c
index 2796b2f14..22de3bc1b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Trap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Trap.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Trap.h b/nx-X11/programs/Xserver/hw/nxagent/Trap.h
index 493a18a1b..aa6937e70 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Trap.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Trap.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Utils.h b/nx-X11/programs/Xserver/hw/nxagent/Utils.h
index 9334a7868..830b2753f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Utils.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Utils.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Visual.c b/nx-X11/programs/Xserver/hw/nxagent/Visual.c
index 2a8283a30..f38931677 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Visual.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Visual.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Visual.h b/nx-X11/programs/Xserver/hw/nxagent/Visual.h
index 6d8a8742d..c682f92dd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Visual.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Visual.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 8da5d8bd1..2da21b91c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -692,222 +692,91 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib)
void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
{
- Window w;
- XSetWindowAttributes attributes;
- unsigned long valuemask;
+ XEvent e;
+ XSizeHints sizeHints;
- if (nxagentOption(Rootless))
+ if (nxagentOption(Rootless) == 1)
{
return;
}
- if (!switchOn)
+ if (switchOn == 0)
{
nxagentWMDetect();
- if (!nxagentWMIsRunning)
- {
- #ifdef WARNING
- fprintf(stderr, "Warning: Can't switch to window mode, no window manager has been detected.\n");
- #endif
-
- return;
- }
- }
-
- w = nxagentDefaultWindows[pScreen -> myNum];
- attributes.override_redirect = switchOn;
- valuemask = CWOverrideRedirect;
- XUnmapWindow(nxagentDisplay, w);
- XChangeWindowAttributes(nxagentDisplay, w, valuemask, &attributes);
-
- if (switchOn)
- {
/*
- * Change to fullscreen mode.
+ * The smart scheduler could be stopped while
+ * waiting for the reply. In this case we need
+ * to yield explicitly to avoid to be stuck in
+ * the dispatch loop forever.
*/
- struct timeval timeout;
- int i;
- XEvent e;
-
- /*
- * Wait for window manager reparenting the default window.
- */
+ isItTimeToYield = 1;
- for (i = 0; i < 100 && nxagentWMIsRunning; i++)
+ if (nxagentWMIsRunning == 0)
{
- #ifdef TEST
- fprintf(stderr, "nxagentSwitchFullscreen: WARNING! Going to wait for the ReparentNotify event.\n");
+ #ifdef WARNING
+ fprintf(stderr, "Warning: Can't switch to window mode, no window manager "
+ "has been detected.\n");
#endif
- if (XCheckTypedWindowEvent(nxagentDisplay, w, ReparentNotify, &e))
- {
- break;
- }
-
- /*
- * This should also flush
- * the NX link for us.
- */
-
- XSync(nxagentDisplay, 0);
-
- timeout.tv_sec = 0;
- timeout.tv_usec = 50 * 1000;
-
- nxagentWaitEvents(nxagentDisplay, &timeout);
+ return;
}
+ }
- if (i < 100)
- {
- /*
- * The window manager has done with the reparent
- * operation. We can resize and map the window.
- */
-
- nxagentChangeOption(Fullscreen, True);
-
- /*
- * Save the window-mode configuration.
- */
-
- nxagentChangeOption(SavedX, nxagentOption(X));
- nxagentChangeOption(SavedY, nxagentOption(Y));
- nxagentChangeOption(SavedWidth, nxagentOption(Width));
- nxagentChangeOption(SavedHeight, nxagentOption(Height));
- nxagentChangeOption(SavedRootWidth, nxagentOption(RootWidth));
- nxagentChangeOption(SavedRootHeight, nxagentOption(RootHeight));
-
- /*
- * Reconf the Default window.
- */
-
- nxagentChangeOption(X, 0);
- nxagentChangeOption(Y, 0);
- nxagentChangeOption(Width, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)));
- nxagentChangeOption(Height, HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)));
-
- /*
- * Move the root window.
- */
-
- nxagentChangeOption(RootX, (nxagentOption(Width) - nxagentOption(RootWidth)) / 2);
- nxagentChangeOption(RootY, (nxagentOption(Height) - nxagentOption(RootHeight)) / 2);
- nxagentChangeOption(ViewportXSpan, nxagentOption(Width) - nxagentOption(RootWidth));
- nxagentChangeOption(ViewportYSpan, nxagentOption(Height) - nxagentOption(RootHeight));
-
- XMoveResizeWindow(nxagentDisplay, w, nxagentOption(X), nxagentOption(Y),
- nxagentOption(Width), nxagentOption(Height));
-
- nxagentUpdateViewportFrame(0, 0, nxagentOption(RootWidth), nxagentOption(RootHeight));
-
- XMoveWindow(nxagentDisplay, nxagentWindow(WindowTable[pScreen -> myNum]),
- nxagentOption(RootX), nxagentOption(RootY));
-
- /*
- * We disable the screensaver when changing
- * mode to fullscreen. Is it really needed?
- */
-
- XSetScreenSaver(nxagentDisplay, 0, 0, DefaultExposures, DefaultBlanking);
-
- if (nxagentIconWindow == None)
- {
- nxagentIconWindow = nxagentCreateIconWindow();
+ #ifdef TEST
+ fprintf(stderr, "nxagentSwitchFullscreen: Switching to %s mode.\n",
+ switchOn ? "fullscreen" : "windowed");
+ #endif
- XMapWindow(nxagentDisplay, nxagentIconWindow);
- }
+ nxagentChangeOption(Fullscreen, switchOn);
- XMapRaised(nxagentDisplay, w);
- XSetInputFocus(nxagentDisplay, w, RevertToParent, CurrentTime);
- XCheckTypedWindowEvent(nxagentDisplay, w, LeaveNotify, &e);
- nxagentFullscreenWindow = w;
+ if (nxagentOption(DesktopResize) == 1)
+ {
+ sizeHints.flags = PSize;
- if (nxagentOption(DesktopResize) == 1)
- {
- if (nxagentOption(Shadow) == 0)
- {
- nxagentRRSetScreenConfig(pScreen, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)),
- HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)));
- }
- else
- {
- nxagentShadowAdaptToRatio();
- }
- }
- }
- else
+ if (switchOn == 1)
{
- /*
- * We have waited for a reparent event unsuccessfully.
- * Something happened to the window manager.
- */
-
- #ifdef WARNING
- fprintf(stderr, "nxagentSwitchFullscreen: WARNING! Expected ReparentNotify event missing.\n");
- #endif
-
- nxagentWMIsRunning = False;
- attributes.override_redirect = False;
- XChangeWindowAttributes(nxagentDisplay, w, valuemask, &attributes);
- XMapWindow(nxagentDisplay, w);
+ sizeHints.width =
+ WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
+ sizeHints.height =
+ HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
}
- }
- else
- {
- /*
- * FIXME:
- * It could be necessary:
- * - To restore screensaver.
- * - To set or reset nxagentForceBackingStore flag.
- * - To grab keyboard.
- * - To propagate device settings to the X server if no WM is running.
- */
-
- /*
- * Change to windowed mode.
- */
-
- nxagentChangeOption(Fullscreen, False);
- XDestroyWindow(nxagentDisplay, nxagentIconWindow);
- nxagentIconWindow = nxagentFullscreenWindow = None;
-
- if (nxagentOption(DesktopResize) == 1)
+ else
{
- nxagentChangeOption(RootWidth, nxagentOption(SavedRootWidth));
- nxagentChangeOption(RootHeight, nxagentOption(SavedRootHeight));
-
- if (nxagentOption(Shadow) == 0)
- {
- nxagentRRSetScreenConfig(pScreen, nxagentOption(RootWidth), nxagentOption(RootHeight));
- }
+ sizeHints.width = nxagentOption(RootWidth);
+ sizeHints.height = nxagentOption(RootHeight);
}
- nxagentChangeOption(X, nxagentOption(SavedX));
- nxagentChangeOption(Y, nxagentOption(SavedY));
- nxagentChangeOption(Width, nxagentOption(SavedWidth));
- nxagentChangeOption(Height, nxagentOption(SavedHeight));
+ XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen -> myNum],
+ &sizeHints);
+ }
- if (nxagentOption(Shadow) == 1 && nxagentOption(DesktopResize) == 1)
- {
- nxagentShadowAdaptToRatio();
- }
+ memset(&e, 0, sizeof(e));
- XMoveResizeWindow(nxagentDisplay, w, nxagentOption(X), nxagentOption(Y),
- nxagentOption(Width), nxagentOption(Height));
+ e.xclient.type = ClientMessage;
+ e.xclient.message_type = nxagentAtoms[13]; /* _NET_WM_STATE */
+ e.xclient.display = nxagentDisplay;
+ e.xclient.window = nxagentDefaultWindows[pScreen -> myNum];
+ e.xclient.format = 32;
+ e.xclient.data.l[0] = nxagentOption(Fullscreen) ? 1 : 0;
+ e.xclient.data.l[1] = nxagentAtoms[14]; /* _NET_WM_STATE_FULLSCREEN */
- nxagentUpdateViewportFrame(0, 0, nxagentOption(Width), nxagentOption(Height));
+ XSendEvent(nxagentDisplay, DefaultRootWindow(nxagentDisplay), False,
+ SubstructureRedirectMask, &e);
- XMoveWindow(nxagentDisplay, nxagentWindow(WindowTable[pScreen -> myNum]), 0, 0);
- XMapWindow(nxagentDisplay, w);
+ if (switchOn == 1)
+ {
+ nxagentFullscreenWindow = nxagentDefaultWindows[pScreen -> myNum];
- nxagentChangeOption(RootX, 0);
- nxagentChangeOption(RootY, 0);
+ nxagentGrabPointerAndKeyboard(NULL);
}
+ else
+ {
+ nxagentFullscreenWindow = None;
- XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0,
- nxagentOption(Width), nxagentOption(Height));
+ nxagentUngrabPointerAndKeyboard(NULL);
+ }
}
#ifdef VIEWPORT_FRAME
@@ -2409,6 +2278,11 @@ void nxagentMapDefaultWindows()
#endif
XMapWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum]);
+
+ if (nxagentOption(Fullscreen) == 1 && nxagentWMIsRunning == 1)
+ {
+ nxagentSwitchFullscreen(pScreen, 1);
+ }
}
/*
@@ -2439,26 +2313,6 @@ void nxagentMapDefaultWindows()
}
/*
- * Map the icon window.
- */
-
- if (nxagentIconWindow != 0)
- {
- #ifdef TEST
- fprintf(stderr, "nxagentMapDefaultWindows: Mapping icon window id [%ld].\n",
- nxagentIconWindow);
- #endif
-
- XMapWindow(nxagentDisplay, nxagentIconWindow);
-
- if (nxagentIpaq != 0)
- {
- XIconifyWindow(nxagentDisplay, nxagentIconWindow,
- DefaultScreen(nxagentDisplay));
- }
- }
-
- /*
* Ensure that the fullscreen window gets the focus.
*/
@@ -2895,6 +2749,13 @@ FIXME: Do we need to set save unders attribute here?
XSizeHints *props, hints;
unsigned char *data = NULL;
+ #ifdef _XSERVER64
+
+ unsigned char *data64 = NULL;
+ unsigned int i;
+
+ #endif
+
hints.flags = 0;
ret = GetWindowProperty(pWin,
@@ -2903,10 +2764,13 @@ FIXME: Do we need to set save unders attribute here?
False, XA_WM_SIZE_HINTS,
&type, &format, &nItems, &bytesLeft, &data);
- props = (XSizeHints*) data;
+ /*
+ * 72 is the number of bytes returned by
+ * sizeof(XSizeHints) on 32 bit platforms.
+ */
if (ret == Success &&
- ((format >> 3) * nItems) == sizeof(XSizeHints) &&
+ ((format >> 3) * nItems) == 72 &&
bytesLeft == 0 &&
type == XA_WM_SIZE_HINTS)
{
@@ -2915,6 +2779,30 @@ FIXME: Do we need to set save unders attribute here?
(void*)pWin, pWin -> drawable.id, nxagentWindow(pWin));
#endif
+ #ifdef _XSERVER64
+
+ data64 = (unsigned char *) malloc(sizeof(XSizeHints) + 4);
+
+ for (i = 0; i < 4; i++)
+ {
+ *(data64 + i) = *(data + i);
+ }
+
+ *(((int *) data64) + 1) = 0;
+
+ for (i = 8; i < sizeof(XSizeHints) + 4; i++)
+ {
+ *(data64 + i) = *(data + i - 4);
+ }
+
+ props = (XSizeHints *) data64;
+
+ #else
+
+ props = (XSizeHints *) data;
+
+ #endif /* _XSERVER64 */
+
hints = *props;
}
else
@@ -2933,6 +2821,15 @@ FIXME: Do we need to set save unders attribute here?
XSetWMNormalHints(nxagentDisplay,
nxagentWindow(pWin),
&hints);
+
+ #ifdef _XSERVER64
+
+ if (data64 != NULL)
+ {
+ free(data64);
+ }
+
+ #endif
}
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Windows.h b/nx-X11/programs/Xserver/hw/nxagent/Windows.h
index ca33f1448..6fc97b341 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Windows.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Windows.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c
index c49f1587f..7bc1c74cb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c.NX.original
index c49f1587f..7bc1c74cb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdamage.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c
index f84ca0e03..ba4e1e662 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -513,13 +513,6 @@ Dispatch(void)
* completed. We can now handle our clients.
*/
- if (serverGeneration > nxagentMaxAllowedResets)
- {
- fprintf(stderr, "Session: Session started at '%s'.\n", GetTimeAsString());
-
- nxagentSessionState = SESSION_UP;
- }
-
#ifdef XKB
nxagentInitXkbWrapper();
@@ -603,6 +596,21 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
clientReady[1] = NXAGENT_WAKEUP;
}
+ if (serverGeneration > nxagentMaxAllowedResets &&
+ nxagentSessionState == SESSION_STARTING &&
+ (nxagentOption(Xdmcp) == 0 || nxagentXdmcpUp == 1))
+ {
+ #ifdef NX_DEBUG_INPUT
+ fprintf(stderr, "Session: Session started at '%s' timestamp [%lu].\n",
+ GetTimeAsString(), GetTimeInMillis());
+ #else
+ fprintf(stderr, "Session: Session started at '%s'.\n",
+ GetTimeAsString());
+ #endif
+
+ nxagentSessionState = SESSION_UP;
+ }
+
#ifdef BLOCKS
fprintf(stderr, "[End dispatch]\n");
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c.NX.original
index f84ca0e03..ba4e1e662 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdispatch.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -513,13 +513,6 @@ Dispatch(void)
* completed. We can now handle our clients.
*/
- if (serverGeneration > nxagentMaxAllowedResets)
- {
- fprintf(stderr, "Session: Session started at '%s'.\n", GetTimeAsString());
-
- nxagentSessionState = SESSION_UP;
- }
-
#ifdef XKB
nxagentInitXkbWrapper();
@@ -603,6 +596,21 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
clientReady[1] = NXAGENT_WAKEUP;
}
+ if (serverGeneration > nxagentMaxAllowedResets &&
+ nxagentSessionState == SESSION_STARTING &&
+ (nxagentOption(Xdmcp) == 0 || nxagentXdmcpUp == 1))
+ {
+ #ifdef NX_DEBUG_INPUT
+ fprintf(stderr, "Session: Session started at '%s' timestamp [%lu].\n",
+ GetTimeAsString(), GetTimeInMillis());
+ #else
+ fprintf(stderr, "Session: Session started at '%s'.\n",
+ GetTimeAsString());
+ #endif
+
+ nxagentSessionState = SESSION_UP;
+ }
+
#ifdef BLOCKS
fprintf(stderr, "[End dispatch]\n");
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c
index b431796be..225ecdaf8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c.NX.original
index b431796be..225ecdaf8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c
index a8a2a68bd..8e87d58c4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -191,6 +191,7 @@ xEvent *xeviexE;
#ifdef NX_DEBUG_INPUT
extern int nxagentDebugInput;
+extern int nxagentDebugInputDevices;
#endif
extern Display *nxagentDisplay;
@@ -1865,6 +1866,12 @@ DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count,
tempGrab.pointerMode = GrabModeAsync;
tempGrab.confineTo = NullWindow;
tempGrab.cursor = NullCursor;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "DeliverEventsToWindow: Activating passive grab on pointer.\n");
+ }
+ #endif
(*inputInfo.pointer->ActivateGrab)(inputInfo.pointer, &tempGrab,
currentTime, TRUE);
}
@@ -2735,6 +2742,13 @@ CheckPassiveGrabsOnWindow(
tempGrab.modifiersDetail.exact&(~0x1f00);
}
#endif
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "CheckPassiveGrabsOnWindow: Activating passive grab on %s.\n",
+ device == inputInfo.keyboard ? "keyboard" : "pointer");
+ }
+ #endif
(*device->ActivateGrab)(device, grab, currentTime, TRUE);
FixUpEventFromWindow(xE, grab->window, None, TRUE);
@@ -3093,7 +3107,17 @@ drawable.id:0;
else
DeliverFocusedEvent(keybd, xE, sprite.win, count);
if (deactivateGrab)
+ #ifdef NX_DEBUG_INPUT
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcessKeyboardEvent: Deactivating grab on keyboard.\n");
+ }
+ #endif
(*keybd->DeactivateGrab)(keybd);
+ #ifdef NX_DEBUG_INPUT
+ }
+ #endif
}
#ifdef XKB
@@ -3320,7 +3344,17 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count
mouse, count);
#endif
if (deactivateGrab)
+ #ifdef NX_DEBUG_INPUT
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcessPointerEvent: Deactivating grab on pointer.\n");
+ }
+ #endif
(*mouse->DeactivateGrab)(mouse);
+ #ifdef NX_DEBUG_INPUT
+ }
+ #endif
}
#define AtMostOneClient \
@@ -4041,6 +4075,12 @@ ProcGrabPointer(ClientPtr client)
pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess);
if (!pWin)
return BadWindow;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcGrabPointer: pWin [%p] client [%d].\n", pWin, client -> index);
+ }
+ #endif
if (stuff->confineTo == None)
confineTo = NullWindow;
else
@@ -4100,6 +4140,12 @@ ProcGrabPointer(ClientPtr client)
tempGrab.keyboardMode = stuff->keyboardMode;
tempGrab.pointerMode = stuff->pointerMode;
tempGrab.device = device;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcGrabPointer: Activating active grab on pointer.\n");
+ }
+ #endif
(*device->ActivateGrab)(device, &tempGrab, time, FALSE);
if (oldCursor)
FreeCursor (oldCursor, (Cursor)0);
@@ -4163,6 +4209,12 @@ ProcUngrabPointer(ClientPtr client)
TimeStamp time;
REQUEST(xResourceReq);
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabPointer: client [%d].\n", client -> index);
+ }
+ #endif
REQUEST_SIZE_MATCH(xResourceReq);
UpdateCurrentTime();
grab = device->grab;
@@ -4170,7 +4222,25 @@ ProcUngrabPointer(ClientPtr client)
if ((CompareTimeStamps(time, currentTime) != LATER) &&
(CompareTimeStamps(time, device->grabTime) != EARLIER) &&
(grab) && SameClient(grab, client))
+ #ifdef NX_DEBUG_INPUT
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabPointer: Deactivating grab on pointer.\n");
+ }
+ #endif
(*device->DeactivateGrab)(device);
+ #ifdef NX_DEBUG_INPUT
+ }
+ else
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabPointer: current time [%lu] request time [%lu] grab time [%lu].\n",
+ currentTime.milliseconds, time.milliseconds, device->grabTime.milliseconds);
+ }
+ }
+ #endif
return Success;
}
@@ -4225,6 +4295,12 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev,
tempGrab.pointerMode = other_mode;
tempGrab.eventMask = mask;
tempGrab.device = dev;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "GrabDevice: Activating active grab on keyboard.\n");
+ }
+ #endif
(*dev->ActivateGrab)(dev, &tempGrab, time, FALSE);
*status = GrabSuccess;
}
@@ -4238,6 +4314,12 @@ ProcGrabKeyboard(ClientPtr client)
REQUEST(xGrabKeyboardReq);
int result;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcGrabKeyboard: client [%d].\n", client -> index);
+ }
+ #endif
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
#ifdef XCSECURITY
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
@@ -4268,6 +4350,12 @@ ProcUngrabKeyboard(ClientPtr client)
TimeStamp time;
REQUEST(xResourceReq);
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabKeyboard: client [%d].\n", client -> index);
+ }
+ #endif
REQUEST_SIZE_MATCH(xResourceReq);
UpdateCurrentTime();
grab = device->grab;
@@ -4275,7 +4363,25 @@ ProcUngrabKeyboard(ClientPtr client)
if ((CompareTimeStamps(time, currentTime) != LATER) &&
(CompareTimeStamps(time, device->grabTime) != EARLIER) &&
(grab) && SameClient(grab, client))
+ #ifdef NX_DEBUG_INPUT
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabKeyboard: Deactivating grab on keyboard.\n");
+ }
+ #endif
(*device->DeactivateGrab)(device);
+ #ifdef NX_DEBUG_INPUT
+ }
+ else
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabKeyboard: current time [%lu] request time [%lu] grab time [%lu].\n",
+ currentTime.milliseconds, time.milliseconds, device->grabTime.milliseconds);
+ }
+ }
+ #endif
return Success;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c.NX.original
index a8a2a68bd..8e87d58c4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXevents.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -191,6 +191,7 @@ xEvent *xeviexE;
#ifdef NX_DEBUG_INPUT
extern int nxagentDebugInput;
+extern int nxagentDebugInputDevices;
#endif
extern Display *nxagentDisplay;
@@ -1865,6 +1866,12 @@ DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count,
tempGrab.pointerMode = GrabModeAsync;
tempGrab.confineTo = NullWindow;
tempGrab.cursor = NullCursor;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "DeliverEventsToWindow: Activating passive grab on pointer.\n");
+ }
+ #endif
(*inputInfo.pointer->ActivateGrab)(inputInfo.pointer, &tempGrab,
currentTime, TRUE);
}
@@ -2735,6 +2742,13 @@ CheckPassiveGrabsOnWindow(
tempGrab.modifiersDetail.exact&(~0x1f00);
}
#endif
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "CheckPassiveGrabsOnWindow: Activating passive grab on %s.\n",
+ device == inputInfo.keyboard ? "keyboard" : "pointer");
+ }
+ #endif
(*device->ActivateGrab)(device, grab, currentTime, TRUE);
FixUpEventFromWindow(xE, grab->window, None, TRUE);
@@ -3093,7 +3107,17 @@ drawable.id:0;
else
DeliverFocusedEvent(keybd, xE, sprite.win, count);
if (deactivateGrab)
+ #ifdef NX_DEBUG_INPUT
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcessKeyboardEvent: Deactivating grab on keyboard.\n");
+ }
+ #endif
(*keybd->DeactivateGrab)(keybd);
+ #ifdef NX_DEBUG_INPUT
+ }
+ #endif
}
#ifdef XKB
@@ -3320,7 +3344,17 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count
mouse, count);
#endif
if (deactivateGrab)
+ #ifdef NX_DEBUG_INPUT
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcessPointerEvent: Deactivating grab on pointer.\n");
+ }
+ #endif
(*mouse->DeactivateGrab)(mouse);
+ #ifdef NX_DEBUG_INPUT
+ }
+ #endif
}
#define AtMostOneClient \
@@ -4041,6 +4075,12 @@ ProcGrabPointer(ClientPtr client)
pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess);
if (!pWin)
return BadWindow;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcGrabPointer: pWin [%p] client [%d].\n", pWin, client -> index);
+ }
+ #endif
if (stuff->confineTo == None)
confineTo = NullWindow;
else
@@ -4100,6 +4140,12 @@ ProcGrabPointer(ClientPtr client)
tempGrab.keyboardMode = stuff->keyboardMode;
tempGrab.pointerMode = stuff->pointerMode;
tempGrab.device = device;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcGrabPointer: Activating active grab on pointer.\n");
+ }
+ #endif
(*device->ActivateGrab)(device, &tempGrab, time, FALSE);
if (oldCursor)
FreeCursor (oldCursor, (Cursor)0);
@@ -4163,6 +4209,12 @@ ProcUngrabPointer(ClientPtr client)
TimeStamp time;
REQUEST(xResourceReq);
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabPointer: client [%d].\n", client -> index);
+ }
+ #endif
REQUEST_SIZE_MATCH(xResourceReq);
UpdateCurrentTime();
grab = device->grab;
@@ -4170,7 +4222,25 @@ ProcUngrabPointer(ClientPtr client)
if ((CompareTimeStamps(time, currentTime) != LATER) &&
(CompareTimeStamps(time, device->grabTime) != EARLIER) &&
(grab) && SameClient(grab, client))
+ #ifdef NX_DEBUG_INPUT
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabPointer: Deactivating grab on pointer.\n");
+ }
+ #endif
(*device->DeactivateGrab)(device);
+ #ifdef NX_DEBUG_INPUT
+ }
+ else
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabPointer: current time [%lu] request time [%lu] grab time [%lu].\n",
+ currentTime.milliseconds, time.milliseconds, device->grabTime.milliseconds);
+ }
+ }
+ #endif
return Success;
}
@@ -4225,6 +4295,12 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev,
tempGrab.pointerMode = other_mode;
tempGrab.eventMask = mask;
tempGrab.device = dev;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "GrabDevice: Activating active grab on keyboard.\n");
+ }
+ #endif
(*dev->ActivateGrab)(dev, &tempGrab, time, FALSE);
*status = GrabSuccess;
}
@@ -4238,6 +4314,12 @@ ProcGrabKeyboard(ClientPtr client)
REQUEST(xGrabKeyboardReq);
int result;
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcGrabKeyboard: client [%d].\n", client -> index);
+ }
+ #endif
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
#ifdef XCSECURITY
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
@@ -4268,6 +4350,12 @@ ProcUngrabKeyboard(ClientPtr client)
TimeStamp time;
REQUEST(xResourceReq);
+ #ifdef NX_DEBUG_INPUT
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabKeyboard: client [%d].\n", client -> index);
+ }
+ #endif
REQUEST_SIZE_MATCH(xResourceReq);
UpdateCurrentTime();
grab = device->grab;
@@ -4275,7 +4363,25 @@ ProcUngrabKeyboard(ClientPtr client)
if ((CompareTimeStamps(time, currentTime) != LATER) &&
(CompareTimeStamps(time, device->grabTime) != EARLIER) &&
(grab) && SameClient(grab, client))
+ #ifdef NX_DEBUG_INPUT
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabKeyboard: Deactivating grab on keyboard.\n");
+ }
+ #endif
(*device->DeactivateGrab)(device);
+ #ifdef NX_DEBUG_INPUT
+ }
+ else
+ {
+ if (nxagentDebugInputDevices == 1)
+ {
+ fprintf(stderr, "ProcUngrabKeyboard: current time [%lu] request time [%lu] grab time [%lu].\n",
+ currentTime.milliseconds, time.milliseconds, device->grabTime.milliseconds);
+ }
+ }
+ #endif
return Success;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c
index a510c9356..6e67b7ffe 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c.NX.original
index a510c9356..6e67b7ffe 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXextension.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c
index aee27e820..172252b32 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c.NX.original
index aee27e820..172252b32 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXglxext.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c
index f51a8bce9..6340de537 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.NX.original
index f51a8bce9..6340de537 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c
index 3e105ac64..d6cd96631 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c.NX.original
index 3e105ac64..d6cd96631 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h
index 0f30843d6..e78a1bf14 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h.NX.original
index 0f30843d6..e78a1bf14 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXglyphstr.h.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c
index af07fdcc2..c71ea8142 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c.NX.original
index af07fdcc2..c71ea8142 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiexpose.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c
index 6ad60223f..efb295861 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c.NX.original
index 6ad60223f..efb295861 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiglyph.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c
index e08f5e45f..d2bead0bc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c.NX.original
index e08f5e45f..d2bead0bc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXmitrap.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c
index 1731e0753..be1096c6c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c.NX.original
index 1731e0753..be1096c6c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXmiwindow.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
index 5d6f71475..be961c400 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -62,6 +62,7 @@
#include "Screen.h"
#include "Pixmaps.h"
#include "Drawable.h"
+#include "Render.h"
#define PANIC
#define WARNING
@@ -1063,7 +1064,47 @@ static void initGradient(SourcePictPtr pGradient, int stopCount,
static PicturePtr createSourcePicture(void)
{
PicturePtr pPicture;
- pPicture = (PicturePtr) xalloc(sizeof(PictureRec));
+
+ extern int nxagentPicturePrivateIndex;
+
+ unsigned int totalPictureSize;
+
+ DevUnion *ppriv;
+
+ char *privPictureRecAddr;
+
+ int i;
+
+ /*
+ * Compute size of entire PictureRect, plus privates.
+ */
+
+ totalPictureSize = sizeof(PictureRec) +
+ picturePrivateCount * sizeof(DevUnion) +
+ sizeof(nxagentPrivPictureRec);
+
+ pPicture = (PicturePtr) xalloc(totalPictureSize);
+
+ if (pPicture != NULL)
+ {
+ ppriv = (DevUnion *) (pPicture + 1);
+
+ for (i = 0; i < picturePrivateCount; ++i)
+ {
+ /*
+ * Other privates are inaccessible.
+ */
+
+ ppriv[i].ptr = NULL;
+ }
+
+ privPictureRecAddr = (char *) &ppriv[picturePrivateCount];
+
+ ppriv[nxagentPicturePrivateIndex].ptr = (pointer) privPictureRecAddr;
+
+ pPicture -> devPrivates = ppriv;
+ }
+
pPicture->pDrawable = 0;
pPicture->pFormat = 0;
pPicture->pNext = 0;
@@ -1697,6 +1738,10 @@ FreePicture (pointer value,
if (--pPicture->refcnt == 0)
{
+#ifdef NXAGENT_SERVER
+ nxagentDestroyPicture(pPicture);
+#endif
+
if (pPicture->transform)
xfree (pPicture->transform);
if (!pPicture->pDrawable) {
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c.NX.original
index 5d6f71475..be961c400 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -62,6 +62,7 @@
#include "Screen.h"
#include "Pixmaps.h"
#include "Drawable.h"
+#include "Render.h"
#define PANIC
#define WARNING
@@ -1063,7 +1064,47 @@ static void initGradient(SourcePictPtr pGradient, int stopCount,
static PicturePtr createSourcePicture(void)
{
PicturePtr pPicture;
- pPicture = (PicturePtr) xalloc(sizeof(PictureRec));
+
+ extern int nxagentPicturePrivateIndex;
+
+ unsigned int totalPictureSize;
+
+ DevUnion *ppriv;
+
+ char *privPictureRecAddr;
+
+ int i;
+
+ /*
+ * Compute size of entire PictureRect, plus privates.
+ */
+
+ totalPictureSize = sizeof(PictureRec) +
+ picturePrivateCount * sizeof(DevUnion) +
+ sizeof(nxagentPrivPictureRec);
+
+ pPicture = (PicturePtr) xalloc(totalPictureSize);
+
+ if (pPicture != NULL)
+ {
+ ppriv = (DevUnion *) (pPicture + 1);
+
+ for (i = 0; i < picturePrivateCount; ++i)
+ {
+ /*
+ * Other privates are inaccessible.
+ */
+
+ ppriv[i].ptr = NULL;
+ }
+
+ privPictureRecAddr = (char *) &ppriv[picturePrivateCount];
+
+ ppriv[nxagentPicturePrivateIndex].ptr = (pointer) privPictureRecAddr;
+
+ pPicture -> devPrivates = ppriv;
+ }
+
pPicture->pDrawable = 0;
pPicture->pFormat = 0;
pPicture->pNext = 0;
@@ -1697,6 +1738,10 @@ FreePicture (pointer value,
if (--pPicture->refcnt == 0)
{
+#ifdef NXAGENT_SERVER
+ nxagentDestroyPicture(pPicture);
+#endif
+
if (pPicture->transform)
xfree (pPicture->transform);
if (!pPicture->pDrawable) {
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
index 255411a9b..b6cee91f1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h.NX.original
index 255411a9b..b6cee91f1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c
index 772a1fbe5..d02f3f015 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c.NX.original
index 772a1fbe5..d02f3f015 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXproperty.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c
index 426d15b1b..e1bb44148 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c.NX.original
index 426d15b1b..e1bb44148 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXrandr.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c
index de2df855f..562cd2c66 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c
@@ -26,7 +26,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -35,7 +35,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -116,7 +116,6 @@ int nxagentCursorSaveRenderInfo(ScreenPtr, CursorPtr);
void nxagentCursorPostSaveRenderInfo(CursorPtr, ScreenPtr, PicturePtr, int, int);
int nxagentRenderRealizeCursor(ScreenPtr, CursorPtr);
int nxagentCreatePicture(PicturePtr, Mask);
-void nxagentDestroyPicture(PicturePtr pPicture);
void nxagentChangePicture(PicturePtr, Mask);
int nxagentChangePictureClip(PicturePtr, int, int, xRectangle *, int, int);
void nxagentComposite(CARD8, PicturePtr, PicturePtr, PicturePtr, INT16, INT16,
@@ -132,6 +131,28 @@ void nxagentSetPictureFilter(PicturePtr pPicture, char *filter, int name_size,
void nxagentTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat,
INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid *traps);
+void nxagentRenderCreateSolidFill(PicturePtr pPicture, xRenderColor *color);
+
+void nxagentRenderCreateLinearGradient(PicturePtr pPicture, xPointFixed *p1,
+ xPointFixed *p2, int nStops,
+ xFixed *stops,
+ xRenderColor *colors);
+
+void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner,
+ xPointFixed *outer,
+ xFixed innerRadius,
+ xFixed outerRadius,
+ int nStops,
+ xFixed *stops,
+ xRenderColor *colors);
+
+void nxagentRenderCreateConicalGradient(PicturePtr pPicture,
+ xPointFixed *center,
+ xFixed angle, int nStops,
+ xFixed *stops,
+ xRenderColor *colors);
+
+
/*
* The void pointer is actually a XGlyphElt8.
*/
@@ -823,8 +844,6 @@ ProcRenderFreePicture (ClientPtr client)
VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityDestroyAccess,
RenderErrBase + BadPicture);
- nxagentDestroyPicture(pPicture);
-
FreeResource (stuff->picture, RT_NONE);
return(client->noClientException);
}
@@ -926,9 +945,16 @@ ProcRenderComposite (ClientPtr client)
RenderErrBase + BadPicture);
VERIFY_ALPHA (pMask, stuff->mask, client, SecurityReadAccess,
RenderErrBase + BadPicture);
+/*
+FIXME: Imported change from newest version of Xorg. Changed pSrc to pDst.
+
if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) ||
(pMask && pMask->pDrawable && pSrc->pDrawable->pScreen != pMask->pDrawable->pScreen))
return BadMatch;
+*/
+ if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) ||
+ (pMask && pMask->pDrawable && pDst->pDrawable->pScreen != pMask->pDrawable->pScreen))
+ return BadMatch;
ValidatePicture (pSrc);
if (pMask)
@@ -2336,6 +2362,11 @@ static int ProcRenderCreateSolidFill(ClientPtr client)
pPicture = CreateSolidPicture(stuff->pid, &stuff->color, &error);
if (!pPicture)
return error;
+ /* AGENT SERVER */
+
+ nxagentRenderCreateSolidFill(pPicture, &stuff -> color);
+
+ /* AGENT SERVER */
if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
return BadAlloc;
return Success;
@@ -2367,6 +2398,12 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
stuff->nStops, stops, colors, &error);
if (!pPicture)
return error;
+ /* AGENT SERVER */
+
+ nxagentRenderCreateLinearGradient(pPicture, &stuff->p1, &stuff->p2,
+ stuff->nStops, stops, colors);
+
+ /* AGENT SERVER */
if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
return BadAlloc;
return Success;
@@ -2397,6 +2434,14 @@ static int ProcRenderCreateRadialGradient (ClientPtr client)
stuff->nStops, stops, colors, &error);
if (!pPicture)
return error;
+ /* AGENT SERVER */
+
+ nxagentRenderCreateRadialGradient(pPicture, &stuff->inner, &stuff->outer,
+ stuff->inner_radius,
+ stuff->outer_radius,
+ stuff->nStops, stops, colors);
+
+ /* AGENT SERVER */
if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
return BadAlloc;
return Success;
@@ -2426,6 +2471,13 @@ static int ProcRenderCreateConicalGradient (ClientPtr client)
stuff->nStops, stops, colors, &error);
if (!pPicture)
return error;
+ /* AGENT SERVER */
+
+ nxagentRenderCreateConicalGradient(pPicture, &stuff->center,
+ stuff->angle, stuff->nStops, stops,
+ colors);
+
+ /* AGENT SERVER */
if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
return BadAlloc;
return Success;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.NX.original
index de2df855f..562cd2c66 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.NX.original
@@ -26,7 +26,7 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -35,7 +35,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -116,7 +116,6 @@ int nxagentCursorSaveRenderInfo(ScreenPtr, CursorPtr);
void nxagentCursorPostSaveRenderInfo(CursorPtr, ScreenPtr, PicturePtr, int, int);
int nxagentRenderRealizeCursor(ScreenPtr, CursorPtr);
int nxagentCreatePicture(PicturePtr, Mask);
-void nxagentDestroyPicture(PicturePtr pPicture);
void nxagentChangePicture(PicturePtr, Mask);
int nxagentChangePictureClip(PicturePtr, int, int, xRectangle *, int, int);
void nxagentComposite(CARD8, PicturePtr, PicturePtr, PicturePtr, INT16, INT16,
@@ -132,6 +131,28 @@ void nxagentSetPictureFilter(PicturePtr pPicture, char *filter, int name_size,
void nxagentTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat,
INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid *traps);
+void nxagentRenderCreateSolidFill(PicturePtr pPicture, xRenderColor *color);
+
+void nxagentRenderCreateLinearGradient(PicturePtr pPicture, xPointFixed *p1,
+ xPointFixed *p2, int nStops,
+ xFixed *stops,
+ xRenderColor *colors);
+
+void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner,
+ xPointFixed *outer,
+ xFixed innerRadius,
+ xFixed outerRadius,
+ int nStops,
+ xFixed *stops,
+ xRenderColor *colors);
+
+void nxagentRenderCreateConicalGradient(PicturePtr pPicture,
+ xPointFixed *center,
+ xFixed angle, int nStops,
+ xFixed *stops,
+ xRenderColor *colors);
+
+
/*
* The void pointer is actually a XGlyphElt8.
*/
@@ -823,8 +844,6 @@ ProcRenderFreePicture (ClientPtr client)
VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityDestroyAccess,
RenderErrBase + BadPicture);
- nxagentDestroyPicture(pPicture);
-
FreeResource (stuff->picture, RT_NONE);
return(client->noClientException);
}
@@ -926,9 +945,16 @@ ProcRenderComposite (ClientPtr client)
RenderErrBase + BadPicture);
VERIFY_ALPHA (pMask, stuff->mask, client, SecurityReadAccess,
RenderErrBase + BadPicture);
+/*
+FIXME: Imported change from newest version of Xorg. Changed pSrc to pDst.
+
if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) ||
(pMask && pMask->pDrawable && pSrc->pDrawable->pScreen != pMask->pDrawable->pScreen))
return BadMatch;
+*/
+ if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) ||
+ (pMask && pMask->pDrawable && pDst->pDrawable->pScreen != pMask->pDrawable->pScreen))
+ return BadMatch;
ValidatePicture (pSrc);
if (pMask)
@@ -2336,6 +2362,11 @@ static int ProcRenderCreateSolidFill(ClientPtr client)
pPicture = CreateSolidPicture(stuff->pid, &stuff->color, &error);
if (!pPicture)
return error;
+ /* AGENT SERVER */
+
+ nxagentRenderCreateSolidFill(pPicture, &stuff -> color);
+
+ /* AGENT SERVER */
if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
return BadAlloc;
return Success;
@@ -2367,6 +2398,12 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
stuff->nStops, stops, colors, &error);
if (!pPicture)
return error;
+ /* AGENT SERVER */
+
+ nxagentRenderCreateLinearGradient(pPicture, &stuff->p1, &stuff->p2,
+ stuff->nStops, stops, colors);
+
+ /* AGENT SERVER */
if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
return BadAlloc;
return Success;
@@ -2397,6 +2434,14 @@ static int ProcRenderCreateRadialGradient (ClientPtr client)
stuff->nStops, stops, colors, &error);
if (!pPicture)
return error;
+ /* AGENT SERVER */
+
+ nxagentRenderCreateRadialGradient(pPicture, &stuff->inner, &stuff->outer,
+ stuff->inner_radius,
+ stuff->outer_radius,
+ stuff->nStops, stops, colors);
+
+ /* AGENT SERVER */
if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
return BadAlloc;
return Success;
@@ -2426,6 +2471,13 @@ static int ProcRenderCreateConicalGradient (ClientPtr client)
stuff->nStops, stops, colors, &error);
if (!pPicture)
return error;
+ /* AGENT SERVER */
+
+ nxagentRenderCreateConicalGradient(pPicture, &stuff->center,
+ stuff->angle, stuff->nStops, stops,
+ colors);
+
+ /* AGENT SERVER */
if (!AddResource (stuff->pid, PictureType, (pointer)pPicture))
return BadAlloc;
return Success;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c
index 91e03cb0e..8c69217e7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c.NX.original
index 91e03cb0e..8c69217e7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c
index a6d638ea7..b99cbe3e3 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.NX.original
index a6d638ea7..b99cbe3e3 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c
index 24dad322f..4022bc397 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c.NX.original
index 24dad322f..4022bc397 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXwindow.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c
index 15fdd9ff3..aa902226e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c.NX.original b/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c.NX.original
index 15fdd9ff3..aa902226e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c.NX.original
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c.NX.original
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm b/nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm
index d35ac4ec1..5955f1705 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm
+++ b/nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm b/nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm
index 497fa2511..e7dee27b1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm
+++ b/nx-X11/programs/Xserver/hw/nxagent/nxmissing.xpm
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/os2Stub.c b/nx-X11/programs/Xserver/hw/nxagent/os2Stub.c
index 81c479233..80419d871 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/os2Stub.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/os2Stub.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/screensaver b/nx-X11/programs/Xserver/hw/nxagent/screensaver
index b9408a2b7..4c5c10620 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/screensaver
+++ b/nx-X11/programs/Xserver/hw/nxagent/screensaver
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2003 NoMachine, http://www.nomachine.com. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */