Commit 39b738a6 authored by Reinhard Tartler's avatar Reinhard Tartler

Imported nxagent-3.5.0-2.tar.gz

Summary: Imported nxagent-3.5.0-2.tar.gz Keywords: Imported nxagent-3.5.0-2.tar.gz into Git repository
parent e6db7e93
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -562,11 +562,15 @@ int ddxProcessArgument(int argc, char *argv[], int i) ...@@ -562,11 +562,15 @@ int ddxProcessArgument(int argc, char *argv[], int i)
if (!strcmp(argv[i],"fullscreen")) if (!strcmp(argv[i],"fullscreen"))
{ {
nxagentChangeOption(Fullscreen, True); nxagentChangeOption(Fullscreen, True);
nxagentChangeOption(AllScreens, True);
} }
else if (!strcmp(argv[i],"ipaq")) else if (!strcmp(argv[i],"ipaq"))
{ {
nxagentChangeOption(Fullscreen, True); nxagentChangeOption(Fullscreen, True);
nxagentChangeOption(AllScreens, True);
nxagentIpaq = True; nxagentIpaq = True;
} }
else else
...@@ -1071,10 +1075,14 @@ static void nxagentParseOptions(char *name, char *value) ...@@ -1071,10 +1075,14 @@ static void nxagentParseOptions(char *name, char *value)
else if (!strcmp(value, "1")) else if (!strcmp(value, "1"))
{ {
nxagentChangeOption(Fullscreen, True); nxagentChangeOption(Fullscreen, True);
nxagentChangeOption(AllScreens, True);
} }
else if (!strcmp(value, "0")) else if (!strcmp(value, "0"))
{ {
nxagentChangeOption(Fullscreen, False); nxagentChangeOption(Fullscreen, False);
nxagentChangeOption(AllScreens, False);
} }
else else
{ {
...@@ -1680,6 +1688,11 @@ N/A ...@@ -1680,6 +1688,11 @@ N/A
nxagentChangeOption(Fullscreen, False); nxagentChangeOption(Fullscreen, False);
} }
if (nxagentOption(AllScreens) == UNDEFINED)
{
nxagentChangeOption(AllScreens, False);
}
if (nxagentOption(Binder) == UNDEFINED) if (nxagentOption(Binder) == UNDEFINED)
{ {
nxagentChangeOption(Binder, False); nxagentChangeOption(Binder, False);
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
ChangeLog: ChangeLog:
nxagent-3.5.0-2
- Fixed TR0502449. Initialized font server path even if font server
connection fails.
nxagent-3.5.0-1
- Opened the 3.5.0 branch based on nxagent-3.4.0-16.
- Updated copyright to year 2009.
- Fixed TR0302438. Added a check in function exporting property in
order to handle the case looking up an atom name returns a null
pointer.
nxagent-3.4.0-16
- Updated copyright to year 2011.
nxagent-3.4.0-15
- Added reference to fixed TR11H02405.
nxagent-3.4.0-14
- Reverted fix for TR03H02335 implemented in nxagent-3.4.0-6. The
emulation of right click by Control key + left click introduces
issues for some applications changing the reaction to the left click
depending on the state of Control key. Issue reported in TR03H02335
affects Apple laptop touchpads having a single button acting as
left button: on those devices the right button can be emulated by
a double-fingered tap (using two fingertips simultaneously).
nxagent-3.4.0-13
- Fixed TR12H02414. Exported property must be split if ChangeProperty
request exceeds 262140 bytes.
- Reset AllScreens option at reconnection time if full screen mode
have to be automatically turned off.
nxagent-3.4.0-12
- If one of the two full screen modes is active ('one screen' or 'all
screens') both keystrokes Ctrl-Alt-F and Ctrl-Alt-Shift-F change the
mode back to 'windowed'.
- Fixed TR11H02405. XRenderFreePicture is called only for pictures
that were actually created on the X server side.
- Ctrl+Alt+f switch fullscreen to all monitors, while Ctrl+Alt+Shift+f
does it to one monitor only.
- If the fullscreen option is enabled at the startup, session starts
in the fullscreen mode on all monitors.
- Added a call to XReparentWindow in the nxagentSwitchAllScreens().
- Corrected focus and grab when switching to fullscreen on
all monitors.
- Removed a compile warning e deleted some unused variables.
- Removed nxagentPointerAndKeyboardGrabbed variable.
- Use the override redirect attribute to switch to fullscreen to all
monitors instead of send _NET_WM_FULLSCREEN_MONITORS hint to the WM.
- Added nxagentMinimizeFromFullScreen(), nxagentMaximizeToFullScreen()
and nxagentCreateIconWindow().
- Removed check on EnterNotify to grab the keyboard in fullscreen
mode not only if mode is 'NotifyNormal'.
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 nxagent-3.4.0-9
- Fixed TR06H02362. No icon was swown in the task bar. - Fixed TR06H02362. No icon was swown in the task bar.
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -205,8 +205,6 @@ CARD32 nxagentLastEventTime = 0; ...@@ -205,8 +205,6 @@ CARD32 nxagentLastEventTime = 0;
CARD32 nxagentLastKeyPressTime = 0; CARD32 nxagentLastKeyPressTime = 0;
Time nxagentLastServerTime = 0; Time nxagentLastServerTime = 0;
int nxagentPointerAndKeyboardGrabbed = 0;
/* /*
* Used for storing windows that need to * Used for storing windows that need to
* receive expose events from the agent. * receive expose events from the agent.
...@@ -582,6 +580,9 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen) ...@@ -582,6 +580,9 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
{ {
sizeHints.max_width = nxagentOption(RootWidth); sizeHints.max_width = nxagentOption(RootWidth);
sizeHints.max_height = nxagentOption(RootHeight); sizeHints.max_height = nxagentOption(RootHeight);
XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum],
&sizeHints);
} }
} }
else else
...@@ -590,6 +591,9 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen) ...@@ -590,6 +591,9 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
nxagentLaunchDialog(DIALOG_ENABLE_DESKTOP_RESIZE_MODE); nxagentLaunchDialog(DIALOG_ENABLE_DESKTOP_RESIZE_MODE);
nxagentRRSetScreenConfig(pScreen, nxagentOption(Width),
nxagentOption(Height));
if (nxagentOption(ClientOs) == ClientOsWinnt) if (nxagentOption(ClientOs) == ClientOsWinnt)
{ {
NXSetExposeParameters(nxagentDisplay, 0, 0, 0); NXSetExposeParameters(nxagentDisplay, 0, 0, 0);
...@@ -597,10 +601,10 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen) ...@@ -597,10 +601,10 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); sizeHints.max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); sizeHints.max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
}
XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum],
&sizeHints); &sizeHints);
}
} }
void nxagentShadowSwitchResizeMode(ScreenPtr pScreen) void nxagentShadowSwitchResizeMode(ScreenPtr pScreen)
...@@ -800,6 +804,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) ...@@ -800,6 +804,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
Bool startKbd = False; Bool startKbd = False;
Bool closeSession = False; Bool closeSession = False;
Bool switchFullscreen = False; Bool switchFullscreen = False;
Bool switchAllScreens = False;
/* /*
* Last entered top level window. * Last entered top level window.
...@@ -984,6 +989,12 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) ...@@ -984,6 +989,12 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
break; break;
} }
case doSwitchAllScreens:
{
switchAllScreens = TRUE;
break;
}
case doViewportMoveUp: case doViewportMoveUp:
{ {
nxagentMoveViewport(pScreen, 0, -nxagentOption(Height)); nxagentMoveViewport(pScreen, 0, -nxagentOption(Height));
...@@ -1084,6 +1095,8 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) ...@@ -1084,6 +1095,8 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
if (nxagentOption(ViewOnly) == 0 && nxagentOption(Shadow) == 1 && result == doNothing) if (nxagentOption(ViewOnly) == 0 && nxagentOption(Shadow) == 1 && result == doNothing)
{ {
X.xkey.keycode = nxagentConvertKeycode(X.xkey.keycode);
NXShadowEvent(nxagentDisplay, X); NXShadowEvent(nxagentDisplay, X);
} }
...@@ -1095,13 +1108,19 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) ...@@ -1095,13 +1108,19 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
int sendKey = 0; 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 FIXME: Don't enqueue the KeyRelease event if the key was
not already pressed. This workaround avoids a fake not already pressed. This workaround avoids a fake
KeyPress is enqueued by the XKEYBOARD extension. KeyPress is enqueued by the XKEYBOARD extension.
Another solution would be to let the events are Another solution would be to let the events are
enqueued and to remove the KeyPress afterwards. enqueued and to remove the KeyPress afterwards.
*/ */
if (BitIsOn(inputInfo.keyboard -> key -> down, if (BitIsOn(inputInfo.keyboard -> key -> down,
nxagentConvertKeycode(X.xkey.keycode))) nxagentConvertKeycode(X.xkey.keycode)))
{ {
...@@ -1160,6 +1179,8 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -1160,6 +1179,8 @@ FIXME: Don't enqueue the KeyRelease event if the key was
if (nxagentOption(ViewOnly) == 0 && nxagentOption(Shadow)) if (nxagentOption(ViewOnly) == 0 && nxagentOption(Shadow))
{ {
X.xkey.keycode = nxagentConvertKeycode(X.xkey.keycode);
NXShadowEvent(nxagentDisplay, X); NXShadowEvent(nxagentDisplay, X);
} }
} }
...@@ -1177,23 +1198,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -1177,23 +1198,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was
nxagentInputEvent = 1; 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 (nxagentOption(Fullscreen))
{ {
if (nxagentMagicPixelZone(X.xbutton.x, X.xbutton.y)) if (nxagentMagicPixelZone(X.xbutton.x, X.xbutton.y))
...@@ -1297,11 +1301,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -1297,11 +1301,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was
nxagentInputEvent = 1; nxagentInputEvent = 1;
if (nxagentOption(ClientOs) == ClientOsMac && (X.xbutton.state & ControlMask) == ControlMask)
{
break;
}
if (viewportCursor) if (viewportCursor)
{ {
/* /*
...@@ -1672,15 +1671,12 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -1672,15 +1671,12 @@ FIXME: Don't enqueue the KeyRelease event if the key was
nxagentScreenTrap = 0; nxagentScreenTrap = 0;
} }
if (nxagentOption(Fullscreen) == 1) if (nxagentOption(Fullscreen) == 1 &&
{ X.xcrossing.window == nxagentFullscreenWindow &&
if (X.xcrossing.window == nxagentDefaultWindows[0] && X.xcrossing.detail != NotifyInferior)
X.xcrossing.detail != NotifyInferior &&
X.xcrossing.mode == NotifyNormal)
{ {
nxagentGrabPointerAndKeyboard(&X); nxagentGrabPointerAndKeyboard(&X);
} }
}
if (X.xcrossing.detail != NotifyInferior) if (X.xcrossing.detail != NotifyInferior)
{ {
...@@ -1986,7 +1982,8 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -1986,7 +1982,8 @@ FIXME: Don't enqueue the KeyRelease event if the key was
} }
if (nxagentUseNXTrans == 1 && nxagentOption(Rootless) == 0 && if (nxagentUseNXTrans == 1 && nxagentOption(Rootless) == 0 &&
nxagentOption(Nested) == 0) nxagentOption(Nested) == 0 &&
X.xmap.window != nxagentIconWindow)
{ {
nxagentVisibility = VisibilityFullyObscured; nxagentVisibility = VisibilityFullyObscured;
} }
...@@ -2025,6 +2022,15 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -2025,6 +2022,15 @@ FIXME: Don't enqueue the KeyRelease event if the key was
} }
} }
if (nxagentOption(AllScreens) == 1)
{
if (X.xmap.window == nxagentIconWindow)
{
pScreen = nxagentScreen(X.xmap.window);
nxagentMaximizeToFullScreen(pScreen);
}
}
if (nxagentOption(Fullscreen) == 1) if (nxagentOption(Fullscreen) == 1)
{ {
nxagentVisibility = VisibilityUnobscured; nxagentVisibility = VisibilityUnobscured;
...@@ -2120,15 +2126,41 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -2120,15 +2126,41 @@ FIXME: Don't enqueue the KeyRelease event if the key was
if (nxagentWMIsRunning) if (nxagentWMIsRunning)
{ {
if (nxagentOption(AllScreens))
{
nxagentMinimizeFromFullScreen(pScreen);
}
else
{
XIconifyWindow(nxagentDisplay, nxagentDefaultWindows[0], XIconifyWindow(nxagentDisplay, nxagentDefaultWindows[0],
DefaultScreen(nxagentDisplay)); DefaultScreen(nxagentDisplay));
} }
} }
}
if (switchFullscreen) if (switchFullscreen)
{ {
if (nxagentOption(AllScreens) == 1 && nxagentOption(Fullscreen) == 1)
{
nxagentSwitchAllScreens(pScreen, 0);
}
else
{
nxagentSwitchFullscreen(pScreen, !nxagentOption(Fullscreen)); nxagentSwitchFullscreen(pScreen, !nxagentOption(Fullscreen));
} }
}
if (switchAllScreens)
{
if (nxagentOption(AllScreens) == 0 && nxagentOption(Fullscreen) == 1)
{
nxagentSwitchFullscreen(pScreen, 0);
}
else
{
nxagentSwitchAllScreens(pScreen, !nxagentOption(AllScreens));
}
}
if (startKbd) if (startKbd)
{ {
...@@ -2599,6 +2631,7 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X) ...@@ -2599,6 +2631,7 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
{ {
ScreenPtr pScreen;
WindowPtr pWin; WindowPtr pWin;
xEvent x; xEvent x;
...@@ -2714,7 +2747,19 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) ...@@ -2714,7 +2747,19 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
fprintf(stderr, "Events: WM_DELETE_WINDOW arrived Atom = %ld.\n", wmAtom); fprintf(stderr, "Events: WM_DELETE_WINDOW arrived Atom = %ld.\n", wmAtom);
#endif #endif
if (X -> xclient.window == nxagentDefaultWindows[0] || 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]) ||
nxagentWMIsRunning == 0) nxagentWMIsRunning == 0)
{ {
*result = doCloseSession; *result = doCloseSession;
...@@ -3312,6 +3357,8 @@ int nxagentHandleConfigureNotify(XEvent* X) ...@@ -3312,6 +3357,8 @@ int nxagentHandleConfigureNotify(XEvent* X)
if (X -> xconfigure.window == nxagentDefaultWindows[pScreen -> myNum]) if (X -> xconfigure.window == nxagentDefaultWindows[pScreen -> myNum])
{ {
if (nxagentOption(AllScreens) == 0)
{
if (nxagentOption(DesktopResize) == 1) if (nxagentOption(DesktopResize) == 1)
{ {
if (nxagentOption(Width) != X -> xconfigure.width || if (nxagentOption(Width) != X -> xconfigure.width ||
...@@ -3417,6 +3464,7 @@ int nxagentHandleConfigureNotify(XEvent* X) ...@@ -3417,6 +3464,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
nxagentRRSetScreenConfig(screenInfo.screens[DefaultScreen(nxagentDisplay)], nxagentRRSetScreenConfig(screenInfo.screens[DefaultScreen(nxagentDisplay)],
nxagentOption(Width), nxagentOption(Height)); nxagentOption(Width), nxagentOption(Height));
} }
}
return 1; return 1;
} }
...@@ -3782,10 +3830,7 @@ void nxagentGrabPointerAndKeyboard(XEvent *X) ...@@ -3782,10 +3830,7 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
int resource; int resource;
if (nxagentPointerAndKeyboardGrabbed == 1) int result;
{
return;
}
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentGrabPointerAndKeyboard: Grabbing pointer and keyboard with event at [%p].\n", fprintf(stderr, "nxagentGrabPointerAndKeyboard: Grabbing pointer and keyboard with event at [%p].\n",
...@@ -3805,9 +3850,14 @@ void nxagentGrabPointerAndKeyboard(XEvent *X) ...@@ -3805,9 +3850,14 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
fprintf(stderr, "nxagentGrabPointerAndKeyboard: Going to grab the keyboard in context [B1].\n"); fprintf(stderr, "nxagentGrabPointerAndKeyboard: Going to grab the keyboard in context [B1].\n");
#endif #endif
XGrabKeyboard(nxagentDisplay, nxagentFullscreenWindow, result = XGrabKeyboard(nxagentDisplay, nxagentFullscreenWindow,
True, GrabModeAsync, GrabModeAsync, now); True, GrabModeAsync, GrabModeAsync, now);
if (result != GrabSuccess)
{
return;
}
/* /*
* The smart scheduler could be stopped while * The smart scheduler could be stopped while
* waiting for the reply. In this case we need * waiting for the reply. In this case we need
...@@ -3844,19 +3894,12 @@ void nxagentGrabPointerAndKeyboard(XEvent *X) ...@@ -3844,19 +3894,12 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
XSetInputFocus(nxagentDisplay, nxagentFullscreenWindow, XSetInputFocus(nxagentDisplay, nxagentFullscreenWindow,
RevertToParent, now); RevertToParent, now);
} }
nxagentPointerAndKeyboardGrabbed = 1;
} }
void nxagentUngrabPointerAndKeyboard(XEvent *X) void nxagentUngrabPointerAndKeyboard(XEvent *X)
{ {
unsigned long now; unsigned long now;
if (nxagentPointerAndKeyboardGrabbed == 0)
{
return;
}
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentUngrabPointerAndKeyboard: Ungrabbing pointer and keyboard with event at [%p].\n", fprintf(stderr, "nxagentUngrabPointerAndKeyboard: Ungrabbing pointer and keyboard with event at [%p].\n",
(void *) X); (void *) X);
...@@ -3882,8 +3925,6 @@ void nxagentUngrabPointerAndKeyboard(XEvent *X) ...@@ -3882,8 +3925,6 @@ void nxagentUngrabPointerAndKeyboard(XEvent *X)
#endif #endif
XUngrabPointer(nxagentDisplay, now); XUngrabPointer(nxagentDisplay, now);
nxagentPointerAndKeyboardGrabbed = 0;
} }
void nxagentDeactivatePointerGrab() void nxagentDeactivatePointerGrab()
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -33,6 +33,7 @@ enum HandleEventResult ...@@ -33,6 +33,7 @@ enum HandleEventResult
doCloseSession, doCloseSession,
doStartKbd, doStartKbd,
doSwitchFullscreen, doSwitchFullscreen,
doSwitchAllScreens,
doViewportMoveUp, doViewportMoveUp,
doViewportMoveLeft, doViewportMoveLeft,
doViewportMoveRight, doViewportMoveRight,
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -1269,7 +1269,7 @@ Bool nxagentReconnectFailedFonts(void *p0) ...@@ -1269,7 +1269,7 @@ Bool nxagentReconnectFailedFonts(void *p0)
const int maxAttempt = 5; const int maxAttempt = 5;
char **fontPaths, **localFontPaths, **newFontPaths; char **fontPaths, **localFontPaths, **newFontPaths;
char fontServerPath[256]; char fontServerPath[256] = "";
int nPaths = 0; int nPaths = 0;
Bool repeat = True; Bool repeat = True;
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -74,7 +74,7 @@ is" without express or implied warranty. ...@@ -74,7 +74,7 @@ is" without express or implied warranty.
#undef DEBUG #undef DEBUG
#undef DUMP #undef DUMP
#define NXAGENT_VERSION "3.4.0" #define NXAGENT_VERSION "3.5.0"
/* /*
* ProcVector array defined in tables.c. * ProcVector array defined in tables.c.
...@@ -193,7 +193,7 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) ...@@ -193,7 +193,7 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
if (serverGeneration <= 1) if (serverGeneration <= 1)
{ {
fprintf(stderr, "\nNXAGENT - Version " NXAGENT_VERSION "\n\n"); fprintf(stderr, "\nNXAGENT - Version " NXAGENT_VERSION "\n\n");
fprintf(stderr, "Copyright (C) 2001, 2010 NoMachine.\n"); fprintf(stderr, "Copyright (C) 2001, 2011 NoMachine.\n");
fprintf(stderr, "See http://www.nomachine.com/ for more information.\n\n"); fprintf(stderr, "See http://www.nomachine.com/ for more information.\n\n");
fprintf(stderr, "Info: Agent running with pid '%d'.\n", getpid()); fprintf(stderr, "Info: Agent running with pid '%d'.\n", getpid());
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -116,7 +116,7 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) ...@@ -116,7 +116,7 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
{ {
if (nxagentOption(Rootless) == False) if (nxagentOption(Rootless) == False)
{ {
*result = doSwitchFullscreen; *result = doSwitchAllScreens;
} }
break; break;
...@@ -282,6 +282,16 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) ...@@ -282,6 +282,16 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
{ {
switch (sym) switch (sym)
{ {
case XK_f:
case XK_F:
{
if (nxagentOption(Rootless) == 0)
{
*result = doSwitchFullscreen;
}
break;
}
case XK_Left: case XK_Left:
case XK_KP_Left: case XK_KP_Left:
{ {
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
Copyright (c) 2001, 2010 NoMachine - http://www.nomachine.com/. Copyright (c) 2001, 2011 NoMachine - http://www.nomachine.com/.
NXAGENT and NX extensions to X are copyright of NoMachine. NXAGENT and NX extensions to X are copyright of NoMachine.
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -103,6 +103,13 @@ typedef struct _AgentOptions ...@@ -103,6 +103,13 @@ typedef struct _AgentOptions
int Fullscreen; int Fullscreen;
/* /*
* True if the fullscreen NX session will
* extend on all available screens.
*/
int AllScreens;
/*
* Set to the auto-disconnect timeout, if * Set to the auto-disconnect timeout, if
* the user activated this feature. * the user activated this feature.
*/ */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -584,16 +584,16 @@ XRenderPictFormat *nxagentMatchingFormats(PictFormatPtr pFormat) ...@@ -584,16 +584,16 @@ XRenderPictFormat *nxagentMatchingFormats(PictFormatPtr pFormat)
void nxagentDestroyPicture(PicturePtr pPicture) void nxagentDestroyPicture(PicturePtr pPicture)
{ {
if (pPicture == NULL || nxagentPicturePriv(pPicture) -> picture == 0)
{
return;
}
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentDestroyPicture: Going to destroy picture at [%p].\n", fprintf(stderr, "nxagentDestroyPicture: Going to destroy picture at [%p].\n",
(void *) pPicture); (void *) pPicture);
#endif #endif
if (pPicture == NULL)
{
return;
}
XRenderFreePicture(nxagentDisplay, XRenderFreePicture(nxagentDisplay,
nxagentPicturePriv(pPicture) -> picture); nxagentPicturePriv(pPicture) -> picture);
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -625,6 +625,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -625,6 +625,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
{ {
XlibAtom *atoms = malloc(nUnits * sizeof(*atoms)); XlibAtom *atoms = malloc(nUnits * sizeof(*atoms));
Atom *input = value; Atom *input = value;
char *atomName = NULL;
int i; int i;
int j = 0; int j = 0;
...@@ -644,7 +645,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -644,7 +645,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
* instead of just getting rid of the property. * instead of just getting rid of the property.
*/ */
if (strcmp(NameForAtom(input[i]), "_NET_WM_PING") != 0) if ((atomName = NameForAtom(input[i])) != NULL &&
strcmp(atomName, "_NET_WM_PING") != 0)
{ {
atoms[j] = nxagentLocalToRemoteAtom(input[i]); atoms[j] = nxagentLocalToRemoteAtom(input[i]);
...@@ -652,7 +654,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -652,7 +654,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
{ {
#ifdef WARNING #ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom %ld [%s].\n", fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom %ld [%s].\n",
(long int) input[i], validateString(NameForAtom(input[i]))); (long int) input[i], validateString(atomName));
#endif #endif
} }
...@@ -725,7 +727,57 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -725,7 +727,57 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
} }
else else
{ {
XChangeProperty(nxagentDisplay, nxagentWindow(pWin), propertyX, typeX, format, mode, (void*)output, nUnits); #ifdef TEST
fprintf(stderr, "nxagentExportProperty: Property [%lu] format [%i] "
"units [%lu].\n", propertyX, format, nUnits);
#endif
if ((format >> 3) * nUnits + sizeof(xChangePropertyReq) <
(MAX_REQUEST_SIZE << 2))
{
XChangeProperty(nxagentDisplay, nxagentWindow(pWin), propertyX, typeX,
format, mode, (void*)output, nUnits);
}
else if (mode == PropModeReplace)
{
int n;
char *data;
XDeleteProperty(nxagentDisplay, nxagentWindow(pWin), propertyX);
data = (char *) output;
while (nUnits > 0)
{
if ((format >> 3) * nUnits + sizeof(xChangePropertyReq) <
(MAX_REQUEST_SIZE << 2))
{
n = nUnits;
}
else
{
n = ((MAX_REQUEST_SIZE << 2) - sizeof(xChangePropertyReq)) /
(format >> 3);
}
XChangeProperty(nxagentDisplay, nxagentWindow(pWin), propertyX,
typeX, format, PropModeAppend, (void*) data, n);
nUnits -= n;
data = (char *) data + n * (format >> 3);
}
}
else
{
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! "
"Property [%lu] too long.\n", propertyX);
#endif
goto nxagentExportPropertyError;
}
nxagentAddPropertyToList(propertyX, pWin); nxagentAddPropertyToList(propertyX, pWin);
} }
} }
...@@ -740,6 +792,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -740,6 +792,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
#endif #endif
} }
nxagentExportPropertyError:
if (freeMem) if (freeMem)
{ {
xfree(output); xfree(output);
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -160,6 +160,7 @@ void nxagentPropagateArtsdProperties(ScreenPtr pScreen, char *port); ...@@ -160,6 +160,7 @@ void nxagentPropagateArtsdProperties(ScreenPtr pScreen, char *port);
#endif #endif
Window nxagentIconWindow = None;
Window nxagentFullscreenWindow = None; Window nxagentFullscreenWindow = None;
#ifdef VIEWPORT_FRAME #ifdef VIEWPORT_FRAME
...@@ -287,6 +288,166 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo) ...@@ -287,6 +288,166 @@ 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, "nxagentMaximizeToFullscreen: 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) Bool nxagentMagicPixelZone(int x, int y)
{ {
return (x >= nxagentOption(Width) - 1 && y < 1); return (x >= nxagentOption(Width) - 1 && y < 1);
...@@ -816,6 +977,8 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, ...@@ -816,6 +977,8 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen,
nxagentChangeOption(Fullscreen, False); nxagentChangeOption(Fullscreen, False);
nxagentChangeOption(AllScreens, False);
nxagentFullscreenWindow = 0; nxagentFullscreenWindow = 0;
resetAgentPosition = True; resetAgentPosition = True;
...@@ -1221,6 +1384,11 @@ N/A ...@@ -1221,6 +1384,11 @@ N/A
nxagentChangeOption(Height, gattributes.height); nxagentChangeOption(Height, gattributes.height);
} }
if (nxagentOption(AllScreens))
{
attributes.override_redirect = True;
}
if (nxagentOption(Fullscreen)) if (nxagentOption(Fullscreen))
{ {
/* /*
...@@ -1448,7 +1616,8 @@ N/A ...@@ -1448,7 +1616,8 @@ N/A
if (nxagentDoFullGeneration == 1 || if (nxagentDoFullGeneration == 1 ||
nxagentReconnectTrap == 1) nxagentReconnectTrap == 1)
{ {
valuemask = CWBackPixel | CWEventMask | CWColormap; valuemask = CWBackPixel | CWEventMask | CWColormap |
(nxagentOption(AllScreens) == 1 ? CWOverrideRedirect : 0);
attributes.background_pixel = nxagentBlackPixel; attributes.background_pixel = nxagentBlackPixel;
...@@ -1456,6 +1625,11 @@ N/A ...@@ -1456,6 +1625,11 @@ N/A
attributes.colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen)); attributes.colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen));
if (nxagentOption(AllScreens) == 1)
{
attributes.override_redirect = True;
}
if (nxagentOption(Fullscreen) == 1) if (nxagentOption(Fullscreen) == 1)
{ {
if (nxagentReconnectTrap) if (nxagentReconnectTrap)
...@@ -1635,6 +1809,21 @@ N/A ...@@ -1635,6 +1809,21 @@ N/A
XClearWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum]); XClearWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum]);
if (nxagentOption(AllScreens))
{
if (nxagentReconnectTrap)
{
XGrabKeyboard(nxagentDisplay, nxagentFullscreenWindow, True, GrabModeAsync,
GrabModeAsync, CurrentTime);
}
nxagentIconWindow = nxagentCreateIconWindow();
}
else
{
nxagentIconWindow = 0;
}
/* /*
* When we don't have window manager we grab keyboard * When we don't have window manager we grab keyboard
* to let nxagent get keyboard events. * to let nxagent get keyboard events.
...@@ -1983,8 +2172,6 @@ Bool nxagentResizeScreen(ScreenPtr pScreen, int width, int height, ...@@ -1983,8 +2172,6 @@ Bool nxagentResizeScreen(ScreenPtr pScreen, int width, int height,
int oldMmWidth; int oldMmWidth;
int oldMmHeight; int oldMmHeight;
RegionPtr pRootWinSize;
#ifdef TEST #ifdef TEST
nxagentPrintAgentGeometry("Before Resize Screen", "nxagentResizeScreen:"); nxagentPrintAgentGeometry("Before Resize Screen", "nxagentResizeScreen:");
#endif #endif
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -47,6 +47,8 @@ extern ScreenPtr nxagentDefaultScreen; ...@@ -47,6 +47,8 @@ extern ScreenPtr nxagentDefaultScreen;
extern Pixmap nxagentPixmapLogo; extern Pixmap nxagentPixmapLogo;
extern Window nxagentIconWindow;
extern Window nxagentFullscreenWindow; extern Window nxagentFullscreenWindow;
extern RegionRec nxagentShadowUpdateRegion; extern RegionRec nxagentShadowUpdateRegion;
...@@ -87,6 +89,12 @@ extern int nxagentBitsPerPixel(int depth); ...@@ -87,6 +89,12 @@ extern int nxagentBitsPerPixel(int depth);
void nxagentSetScreenSaverTime(void); void nxagentSetScreenSaverTime(void);
void nxagentMinimizeFromFullScreen(ScreenPtr pScreen);
void nxagentMaximizeToFullScreen(ScreenPtr pScreen);
Window nxagentCreateIconWindow(void);
Bool nxagentMagicPixelZone(int x, int y); Bool nxagentMagicPixelZone(int x, int y);
Bool nxagentResizeScreen(ScreenPtr pScreen, int width, int height, Bool nxagentResizeScreen(ScreenPtr pScreen, int width, int height,
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -693,7 +693,6 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) ...@@ -693,7 +693,6 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib)
void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
{ {
XEvent e; XEvent e;
XSizeHints sizeHints;
if (nxagentOption(Rootless) == 1) if (nxagentOption(Rootless) == 1)
{ {
...@@ -731,27 +730,6 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) ...@@ -731,27 +730,6 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
nxagentChangeOption(Fullscreen, switchOn); nxagentChangeOption(Fullscreen, switchOn);
if (nxagentOption(DesktopResize) == 1)
{
sizeHints.flags = PSize;
if (switchOn == 1)
{
sizeHints.width =
WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints.height =
HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
}
else
{
sizeHints.width = nxagentOption(RootWidth);
sizeHints.height = nxagentOption(RootHeight);
}
XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen -> myNum],
&sizeHints);
}
memset(&e, 0, sizeof(e)); memset(&e, 0, sizeof(e));
e.xclient.type = ClientMessage; e.xclient.type = ClientMessage;
...@@ -779,6 +757,245 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) ...@@ -779,6 +757,245 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
} }
} }
void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
{
Window w;
XSetWindowAttributes attributes;
unsigned long valuemask;
if (nxagentOption(Rootless))
{
return;
}
if (!switchOn)
{
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);
XReparentWindow(nxagentDisplay, w, DefaultRootWindow(nxagentDisplay), 0, 0);
if (switchOn)
{
/*
* Change to fullscreen mode.
*/
struct timeval timeout;
int i;
XEvent e;
/*
* Wait for window manager reparenting the default window.
*/
for (i = 0; i < 100 && nxagentWMIsRunning; i++)
{
#ifdef TEST
fprintf(stderr, "nxagentSwitchAllScreens: WARNING! Going to wait for the ReparentNotify event.\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);
}
if (i < 100)
{
/*
* The window manager has done with the reparent
* operation. We can resize and map the window.
*/
nxagentChangeOption(Fullscreen, True);
nxagentChangeOption(AllScreens, 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();
XMapWindow(nxagentDisplay, nxagentIconWindow);
}
XMapRaised(nxagentDisplay, w);
XSetInputFocus(nxagentDisplay, w, RevertToParent, CurrentTime);
XCheckTypedWindowEvent(nxagentDisplay, w, LeaveNotify, &e);
nxagentFullscreenWindow = w;
if (nxagentOption(DesktopResize) == 1)
{
if (nxagentOption(Shadow) == 0)
{
nxagentRRSetScreenConfig(pScreen, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)),
HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)));
}
else
{
nxagentShadowAdaptToRatio();
}
}
}
else
{
/*
* We have waited for a reparent event unsuccessfully.
* Something happened to the window manager.
*/
#ifdef WARNING
fprintf(stderr, "nxagentSwitchAllScreens: WARNING! Expected ReparentNotify event missing.\n");
#endif
nxagentWMIsRunning = False;
attributes.override_redirect = False;
XChangeWindowAttributes(nxagentDisplay, w, valuemask, &attributes);
XMapWindow(nxagentDisplay, w);
}
}
else
{
/*
* FIXME:
* It could be necessary:
* - To restore screensaver.
* - To set or reset nxagentForceBackingStore flag.
* - To propagate device settings to the X server if no WM is running.
*/
/*
* Change to windowed mode.
*/
nxagentChangeOption(Fullscreen, False);
nxagentChangeOption(AllScreens, False);
XDestroyWindow(nxagentDisplay, nxagentIconWindow);
nxagentIconWindow = nxagentFullscreenWindow = None;
if (nxagentOption(DesktopResize) == 1)
{
nxagentChangeOption(RootWidth, nxagentOption(SavedRootWidth));
nxagentChangeOption(RootHeight, nxagentOption(SavedRootHeight));
if (nxagentOption(Shadow) == 0)
{
nxagentRRSetScreenConfig(pScreen, nxagentOption(RootWidth), nxagentOption(RootHeight));
}
}
if (nxagentOption(WMBorderWidth) > 0 && nxagentOption(WMTitleHeight) > 0)
{
nxagentChangeOption(X, nxagentOption(SavedX) -
nxagentOption(WMBorderWidth));
nxagentChangeOption(Y, nxagentOption(SavedY) -
nxagentOption(WMTitleHeight));
}
else
{
nxagentChangeOption(X, nxagentOption(SavedX));
nxagentChangeOption(Y, nxagentOption(SavedY));
}
nxagentChangeOption(Width, nxagentOption(SavedWidth));
nxagentChangeOption(Height, nxagentOption(SavedHeight));
if (nxagentOption(Shadow) == 1 && nxagentOption(DesktopResize) == 1)
{
nxagentShadowAdaptToRatio();
}
XMoveResizeWindow(nxagentDisplay, w, nxagentOption(X), nxagentOption(Y),
nxagentOption(Width), nxagentOption(Height));
nxagentUpdateViewportFrame(0, 0, nxagentOption(Width), nxagentOption(Height));
XMoveWindow(nxagentDisplay, nxagentWindow(WindowTable[pScreen -> myNum]), 0, 0);
XMapWindow(nxagentDisplay, w);
nxagentChangeOption(RootX, 0);
nxagentChangeOption(RootY, 0);
}
XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0,
nxagentOption(Width), nxagentOption(Height));
nxagentSetPrintGeometry(pScreen -> myNum);
}
#ifdef VIEWPORT_FRAME #ifdef VIEWPORT_FRAME
void nxagentUpdateViewportFrame(int x, int y, int w, int h) void nxagentUpdateViewportFrame(int x, int y, int w, int h)
...@@ -2281,7 +2498,7 @@ void nxagentMapDefaultWindows() ...@@ -2281,7 +2498,7 @@ void nxagentMapDefaultWindows()
if (nxagentOption(Fullscreen) == 1 && nxagentWMIsRunning == 1) if (nxagentOption(Fullscreen) == 1 && nxagentWMIsRunning == 1)
{ {
nxagentSwitchFullscreen(pScreen, 1); nxagentMaximizeToFullScreen(pScreen);
} }
} }
...@@ -2313,6 +2530,26 @@ void nxagentMapDefaultWindows() ...@@ -2313,6 +2530,26 @@ 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. * Ensure that the fullscreen window gets the focus.
*/ */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -222,6 +222,8 @@ void nxagentSetTopLevelEventMask(WindowPtr pWin); ...@@ -222,6 +222,8 @@ void nxagentSetTopLevelEventMask(WindowPtr pWin);
void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn); void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn);
void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn);
void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift); void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift);
#ifdef VIEWPORT_FRAME #ifdef VIEWPORT_FRAME
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -873,6 +873,9 @@ AllocatePicture (ScreenPtr pScreen) ...@@ -873,6 +873,9 @@ AllocatePicture (ScreenPtr pScreen)
else else
ppriv->ptr = (pointer)NULL; ppriv->ptr = (pointer)NULL;
} }
nxagentPicturePriv(pPicture) -> picture = 0;
return pPicture; return pPicture;
} }
...@@ -1103,6 +1106,8 @@ static PicturePtr createSourcePicture(void) ...@@ -1103,6 +1106,8 @@ static PicturePtr createSourcePicture(void)
ppriv[nxagentPicturePrivateIndex].ptr = (pointer) privPictureRecAddr; ppriv[nxagentPicturePrivateIndex].ptr = (pointer) privPictureRecAddr;
pPicture -> devPrivates = ppriv; pPicture -> devPrivates = ppriv;
nxagentPicturePriv(pPicture) -> picture = 0;
} }
pPicture->pDrawable = 0; pPicture->pDrawable = 0;
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
...@@ -873,6 +873,9 @@ AllocatePicture (ScreenPtr pScreen) ...@@ -873,6 +873,9 @@ AllocatePicture (ScreenPtr pScreen)
else else
ppriv->ptr = (pointer)NULL; ppriv->ptr = (pointer)NULL;
} }
nxagentPicturePriv(pPicture) -> picture = 0;
return pPicture; return pPicture;
} }
...@@ -1103,6 +1106,8 @@ static PicturePtr createSourcePicture(void) ...@@ -1103,6 +1106,8 @@ static PicturePtr createSourcePicture(void)
ppriv[nxagentPicturePrivateIndex].ptr = (pointer) privPictureRecAddr; ppriv[nxagentPicturePrivateIndex].ptr = (pointer) privPictureRecAddr;
pPicture -> devPrivates = ppriv; pPicture -> devPrivates = ppriv;
nxagentPicturePriv(pPicture) -> picture = 0;
} }
pPicture->pDrawable = 0; pPicture->pDrawable = 0;
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/ /**************************************************************************/
/* */ /* */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ /* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */ /* */
/* NXAGENT, NX protocol compression and NX extensions to this software */ /* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */ /* are copyright of NoMachine. Redistribution and use of the present */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment