Commit e6db7e93 authored by Reinhard Tartler's avatar Reinhard Tartler

Imported nxagent-3.4.0-9.tar.gz

Summary: Imported nxagent-3.4.0-9.tar.gz Keywords: Imported nxagent-3.4.0-9.tar.gz into Git repository
parent b7494f08
ChangeLog: ChangeLog:
nxagent-3.4.0-9
- Fixed TR06H02362. No icon was swown in the task bar.
- Fixed keyboard grab in fullscreen mode.
- Fixed compiler warnings.
nxagent-3.4.0-8 nxagent-3.4.0-8
- Grab the keyboard in fullscreen mode on EnterNotify only if mode is - Grab the keyboard in fullscreen mode on EnterNotify only if mode is
......
...@@ -1728,14 +1728,11 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -1728,14 +1728,11 @@ FIXME: Don't enqueue the KeyRelease event if the key was
nxagentLastEnteredWindow = NULL; nxagentLastEnteredWindow = NULL;
} }
if (nxagentPointerAndKeyboardGrabbed == 1) if (X.xcrossing.window == nxagentDefaultWindows[0] &&
X.xcrossing.detail != NotifyInferior &&
X.xcrossing.mode == NotifyNormal)
{ {
if (X.xcrossing.window == nxagentDefaultWindows[0] && nxagentUngrabPointerAndKeyboard(&X);
X.xcrossing.detail != NotifyInferior &&
X.xcrossing.mode == NotifyNormal)
{
nxagentUngrabPointerAndKeyboard(&X);
}
} }
if (X.xcrossing.detail != NotifyInferior) if (X.xcrossing.detail != NotifyInferior)
...@@ -2123,14 +2120,8 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -2123,14 +2120,8 @@ FIXME: Don't enqueue the KeyRelease event if the key was
if (nxagentWMIsRunning) if (nxagentWMIsRunning)
{ {
if (nxagentOption(Fullscreen)) XIconifyWindow(nxagentDisplay, nxagentDefaultWindows[0],
{ DefaultScreen(nxagentDisplay));
nxagentMinimizeFromFullScreen(pScreen);
}
else
{
XIconifyWindow(nxagentDisplay, nxagentDefaultWindows[0], DefaultScreen(nxagentDisplay));
}
} }
} }
...@@ -3791,6 +3782,11 @@ void nxagentGrabPointerAndKeyboard(XEvent *X) ...@@ -3791,6 +3782,11 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
int resource; int resource;
if (nxagentPointerAndKeyboardGrabbed == 1)
{
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",
(void *) X); (void *) X);
...@@ -3856,6 +3852,11 @@ void nxagentUngrabPointerAndKeyboard(XEvent *X) ...@@ -3856,6 +3852,11 @@ 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);
......
...@@ -287,57 +287,6 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo) ...@@ -287,57 +287,6 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo)
} }
} }
void nxagentMinimizeFromFullScreen(ScreenPtr pScreen)
{
XUnmapWindow(nxagentDisplay, nxagentFullscreenWindow);
}
void nxagentMaximizeToFullScreen(ScreenPtr pScreen)
{
if(nxagentIpaq)
{
XMapWindow(nxagentDisplay, nxagentFullscreenWindow);
}
else
{
/*
FIXME: We'll chech for ReparentNotify and LeaveNotify events after XReparentWindow()
in order to avoid the session window is iconified.
We could avoid the sesssion window is iconified when a LeaveNotify event is received,
so this check would be unnecessary.
*/
struct timeval timeout;
int i;
XEvent e;
XReparentWindow(nxagentDisplay, nxagentFullscreenWindow,
RootWindow(nxagentDisplay, DefaultScreen(nxagentDisplay)), 0, 0);
for (i = 0; i < 100 && nxagentWMIsRunning; i++)
{
#ifdef TEST
fprintf(stderr, "nxagentSwitchFullscreen: WARNING! Going to wait for the ReparentNotify event.\n");
#endif
if (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, ReparentNotify, &e))
{
break;
}
XSync(nxagentDisplay, 0);
timeout.tv_sec = 0;
timeout.tv_usec = 50 * 1000;
nxagentWaitEvents(nxagentDisplay, &timeout);
}
XMapRaised(nxagentDisplay, nxagentFullscreenWindow);
while (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, LeaveNotify, &e));
}
}
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);
......
...@@ -60,6 +60,8 @@ extern short nxagentShadowUid; ...@@ -60,6 +60,8 @@ extern short nxagentShadowUid;
void nxagentSetScreenInfo(ScreenInfo *screenInfo); void nxagentSetScreenInfo(ScreenInfo *screenInfo);
void nxagentSetPixmapFormats(ScreenInfo *screenInfo); void nxagentSetPixmapFormats(ScreenInfo *screenInfo);
void nxagentPrintGeometry();
extern Window nxagentDefaultWindows[MAXSCREENS]; extern Window nxagentDefaultWindows[MAXSCREENS];
extern Window nxagentInputWindows[MAXSCREENS]; extern Window nxagentInputWindows[MAXSCREENS];
extern Window nxagentScreenSaverWindows[MAXSCREENS]; extern Window nxagentScreenSaverWindows[MAXSCREENS];
...@@ -85,9 +87,6 @@ extern int nxagentBitsPerPixel(int depth); ...@@ -85,9 +87,6 @@ extern int nxagentBitsPerPixel(int depth);
void nxagentSetScreenSaverTime(void); void nxagentSetScreenSaverTime(void);
void nxagentMinimizeFromFullScreen(ScreenPtr pScreen);
void nxagentMaximizeToFullScreen(ScreenPtr pScreen);
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,
......
...@@ -768,10 +768,14 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) ...@@ -768,10 +768,14 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
if (switchOn == 1) if (switchOn == 1)
{ {
nxagentFullscreenWindow = nxagentDefaultWindows[pScreen -> myNum]; nxagentFullscreenWindow = nxagentDefaultWindows[pScreen -> myNum];
nxagentGrabPointerAndKeyboard(NULL);
} }
else else
{ {
nxagentFullscreenWindow = None; nxagentFullscreenWindow = None;
nxagentUngrabPointerAndKeyboard(NULL);
} }
} }
......
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