FX: Make it work in regular compositing mode

This commit is contained in:
Kim Woelders 2021-05-06 18:53:11 +02:00
parent 47d1aa9d19
commit 8170ada68c
3 changed files with 14 additions and 1 deletions

View File

@ -2147,6 +2147,12 @@ ECompMgrIsActive(void)
return Mode_compmgr.active; return Mode_compmgr.active;
} }
EX_Window
ECompMgrRootWin(void)
{
return Mode_compmgr.root;
}
static void static void
ECompMgrStart(void) ECompMgrStart(void)
{ {

View File

@ -68,6 +68,8 @@ void ECompMgrConfigSet(const cfg_composite * cfg);
void ECompMgrRepaint(void); void ECompMgrRepaint(void);
int ECompMgrRender(int dt); int ECompMgrRender(int dt);
EX_Window ECompMgrRootWin(void);
#else #else
#define ECompMgrIsActive() 0 #define ECompMgrIsActive() 0

View File

@ -72,7 +72,12 @@ _FxSetup(FXData * d, unsigned int height)
if (!d->above) if (!d->above)
{ {
d->win = EobjGetWin(bgeo); d->win = EobjGetWin(bgeo);
d->root = EobjGetXwin(bgeo); #if USE_COMPOSITE
if (ECompMgrIsActive() && !Mode.wm.window)
d->root = ECompMgrRootWin();
else
#endif
d->root = EobjGetXwin(bgeo);
d->above = ECreatePixmap(d->win, WinGetW(VROOT), height, 0); d->above = ECreatePixmap(d->win, WinGetW(VROOT), height, 0);
XGCValues xgcv; XGCValues xgcv;