diff options
author | Mihai Moldovan <ionic@ionic.de> | 2016-06-25 01:35:40 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2016-06-25 01:35:40 +0200 |
commit | 975511c875674f097bbd2be33fa947a48d8c77c6 (patch) | |
tree | 207bba2c48054f551f19ed5aa89b9dd9616b8c60 /nx-X11/programs/Xserver/dix/window.c | |
parent | 9df153668423af868d0df739188a772fbc3356c6 (diff) | |
parent | a5befd4e20813910022ed771cb599f15bbf4664d (diff) | |
download | nx-libs-975511c875674f097bbd2be33fa947a48d8c77c6.tar.gz nx-libs-975511c875674f097bbd2be33fa947a48d8c77c6.tar.bz2 nx-libs-975511c875674f097bbd2be33fa947a48d8c77c6.zip |
Merge branch 'sunweaver-pr/hw-nxagent-drop-duplicate-Xserver-code_disable-Xserver-code-and-include-in-nxagent' into arctica-3.6.x
Attributes GH PR #120: https://github.com/ArcticaProject/nx-libs/pull/120
Diffstat (limited to 'nx-X11/programs/Xserver/dix/window.c')
-rw-r--r-- | nx-X11/programs/Xserver/dix/window.c | 68 |
1 files changed, 51 insertions, 17 deletions
diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c index 5a4818f88..708b67aa1 100644 --- a/nx-X11/programs/Xserver/dix/window.c +++ b/nx-X11/programs/Xserver/dix/window.c @@ -160,7 +160,7 @@ static Bool TileScreenSaver(int i, int kind); int numSaveUndersViewable = 0; int deltaSaveUndersViewable = 0; -#ifdef DEBUG +#if defined(DEBUG) || (defined(NXAGENT_SERVER) && defined(WINDOW_TREE_DEBUG)) /****** * PrintWindowTree * For debugging only @@ -286,6 +286,7 @@ SetWindowToDefaults(register WindowPtr pWin) #endif } +#ifndef NXAGENT_SERVER static void MakeRootTile(WindowPtr pWin) { @@ -331,6 +332,7 @@ MakeRootTile(WindowPtr pWin) FreeScratchGC(pGC); } +#endif /* NXAGENT_SERVER */ WindowPtr AllocateWindow(ScreenPtr pScreen) @@ -477,6 +479,7 @@ CreateRootWindow(ScreenPtr pScreen) return TRUE; } +#ifndef NXAGENT_SERVER void InitRootWindow(WindowPtr pWin) { @@ -498,6 +501,7 @@ InitRootWindow(WindowPtr pWin) MapWindow(pWin, serverClient); } +#endif /* NXAGENT_SERVER */ /* Set the region to the intersection of the rectangle and the * window's winSize. The window is typically the parent of the @@ -509,7 +513,6 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn, register int x, register int y, register int w, register int h) { - ScreenPtr pScreen = pWin->drawable.pScreen; BoxRec box; box = *(RegionExtents(&pWin->winSize)); @@ -872,13 +875,15 @@ CrushTree(WindowPtr pWin) } } } - + + /***** * DeleteWindow * Deletes child of window then window itself * If wid is None, don't send any events *****/ +#ifndef NXAGENT_SERVER int DeleteWindow(void * value, XID wid) { @@ -914,6 +919,7 @@ DeleteWindow(void * value, XID wid) xfree(pWin); return Success; } +#endif /* NXAGENT_SERVER */ void DestroySubwindows(register WindowPtr pWin, ClientPtr client) @@ -1231,6 +1237,25 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt #endif /* DO_SAVE_UNDERS */ break; case CWEventMask: + + /* + * TODO: Some applications like java bean shell + * don' t work if they cannot monitor the root + * window for Structure Redirect events. However + * this doesn't seem to be the best solution, since + * also an X server with a window manager running, + * doesn't allow to monitor for those events, but + * the java bean shell works flawlessy on this + * server. + * + * #ifdef NXAGENT_SERVER + * if (nxagentCheckIllegalRootMonitoring(pWin, (Mask)*pVlist)) + * { + * return BadAccess; + * } + * #endif + */ + result = EventSelectForWindow(pWin, client, (Mask )*pVlist); if (result) { @@ -1599,8 +1624,6 @@ CreateUnclippedWinSize (register WindowPtr pWin) pRgn = RegionCreate(&box, 1); #ifdef SHAPE if (wBoundingShape (pWin) || wClipShape (pWin)) { - ScreenPtr pScreen = pWin->drawable.pScreen; - RegionTranslate(pRgn, - pWin->drawable.x, - pWin->drawable.y); if (wBoundingShape (pWin)) @@ -1635,8 +1658,6 @@ SetWinSize (register WindowPtr pWin) (int)pWin->drawable.height); #ifdef SHAPE if (wBoundingShape (pWin) || wClipShape (pWin)) { - ScreenPtr pScreen = pWin->drawable.pScreen; - RegionTranslate(&pWin->winSize, - pWin->drawable.x, - pWin->drawable.y); if (wBoundingShape (pWin)) @@ -1677,8 +1698,6 @@ SetBorderSize (register WindowPtr pWin) (int)(pWin->drawable.height + (bw<<1))); #ifdef SHAPE if (wBoundingShape (pWin)) { - ScreenPtr pScreen = pWin->drawable.pScreen; - RegionTranslate(&pWin->borderSize, - pWin->drawable.x, - pWin->drawable.y); RegionIntersect(&pWin->borderSize, &pWin->borderSize, @@ -1752,6 +1771,7 @@ GravityTranslate (register int x, register int y, int oldx, int oldy, } /* XXX need to retile border on each window with ParentRelative origin */ +#ifndef NXAGENT_SERVER void ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh) { @@ -1816,6 +1836,7 @@ ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh) } } } +#endif /* NXAGENT_SERVER */ #define GET_INT16(m, f) \ if (m & mask) \ @@ -1888,7 +1909,6 @@ MakeBoundingRegion ( BoxPtr pBox) { RegionPtr pRgn; - ScreenPtr pScreen = pWin->drawable.pScreen; pRgn = RegionCreate(pBox, 1); if (wBoundingShape (pWin)) { @@ -1909,12 +1929,10 @@ ShapeOverlap ( BoxPtr pSibBox) { RegionPtr pWinRgn, pSibRgn; - register ScreenPtr pScreen; Bool ret; if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib)) return TRUE; - pScreen = pWin->drawable.pScreen; pWinRgn = MakeBoundingRegion (pWin, pWinBox); pSibRgn = MakeBoundingRegion (pSib, pSibBox); RegionIntersect(pWinRgn, pWinRgn, pSibRgn); @@ -2015,7 +2033,6 @@ WhereDoIGoInTheStack( int smode) { BoxRec box; - register ScreenPtr pScreen; WindowPtr pHead, pFirst; if ((pWin == pWin->parent->firstChild) && @@ -2023,7 +2040,6 @@ WhereDoIGoInTheStack( return((WindowPtr ) NULL); pHead = RealChildHead(pWin->parent); pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild; - pScreen = pWin->drawable.pScreen; box.x1 = x; box.y1 = y; box.x2 = x + (int)w; @@ -2164,6 +2180,7 @@ ReflectStackChange( * ConfigureWindow *****/ +#ifndef NXAGENT_SERVER int ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientPtr client) { @@ -2417,6 +2434,7 @@ ActuallyDoSomething: #undef RESIZE_WIN #undef REBORDER_WIN } +#endif /* NXAGENT_SERVER */ /****** @@ -2436,6 +2454,17 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) xEvent event; BoxRec box; + /* + * #ifdef NXAGENT_SERVER + * if (nxagentOption(Rootless) && nxagentWMIsRunning && + * nxagentWindowTopLevel(pWin) && pWin -> overrideRedirect == 0) + * { + * nxagentCirculateRootlessWindows(direction); + * return Success; + * } + * #endif + */ + pHead = RealChildHead(pParent); pFirst = pHead ? pHead->nextSib : pParent->firstChild; if (direction == RaiseLowest) @@ -2501,6 +2530,7 @@ CompareWIDs( * ReparentWindow *****/ +#ifndef NXAGENT_SERVER int ReparentWindow(register WindowPtr pWin, register WindowPtr pParent, int x, int y, ClientPtr client) @@ -2593,6 +2623,7 @@ ReparentWindow(register WindowPtr pWin, register WindowPtr pParent, RecalculateDeliverableEvents(pWin); return(Success); } +#endif /* NXAGENT_SERVER */ static void RealizeTree(WindowPtr pWin) @@ -2635,6 +2666,7 @@ RealizeTree(WindowPtr pWin) * MapNotify event is generated. *****/ +#ifndef NXAGENT_SERVER int MapWindow(register WindowPtr pWin, ClientPtr client) { @@ -2737,7 +2769,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client) return(Success); } - +#endif /* NXAGENT_SERVER */ /***** * MapSubwindows @@ -2926,6 +2958,7 @@ UnrealizeTree( * generated. Cannot unmap a root window. *****/ +#ifndef NXAGENT_SERVER int UnmapWindow(register WindowPtr pWin, Bool fromConfigure) { @@ -2979,6 +3012,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure) WindowsRestructured (); return(Success); } +#endif /* NXAGENT_SERVER */ /***** * UnmapSubwindows @@ -3159,10 +3193,8 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y) RegionPtr NotClippedByChildren(register WindowPtr pWin) { - register ScreenPtr pScreen; RegionPtr pReg; - pScreen = pWin->drawable.pScreen; pReg = RegionCreate(NullBox, 1); if (pWin->parent || screenIsSaved != SCREEN_SAVER_ON || @@ -3251,6 +3283,7 @@ static void DrawLogo( ); #endif +#ifndef NXAGENT_SERVER void SaveScreens(int on, int mode) { @@ -3363,6 +3396,7 @@ SaveScreens(int on, int mode) if (mode == ScreenSaverReset) SetScreenSaverTimer(); } +#endif /* NXAGENT_SERVER */ static Bool TileScreenSaver(int i, int kind) |