diff --git a/src/eobj.c b/src/eobj.c index ad5c860d..a9e9343d 100644 --- a/src/eobj.c +++ b/src/eobj.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2012 Kim Woelders + * Copyright (C) 2004-2013 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -372,6 +372,22 @@ EobjUnregister(EObj * eo) EobjDestroy(eo); } +void +EobjRegisterOR(Window xwin __UNUSED__) +{ +#if USE_COMPOSITE + EObj *eo; + + if (!ECompMgrIsActive()) + return; + + eo = EobjRegister(xwin, EOBJ_TYPE_EXT); + eo->shown = 1; + EobjListStackRaise(eo, 0); + ECompMgrWinMap(eo); +#endif +} + void EobjMap(EObj * eo, int raise) { diff --git a/src/eobj.h b/src/eobj.h index ca265e1a..e9797a99 100644 --- a/src/eobj.h +++ b/src/eobj.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2012 Kim Woelders + * Copyright (C) 2004-2013 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -155,9 +155,11 @@ EObj *EobjWindowCreate(int type, int x, int y, int w, int h, int su, const char *name); void EobjWindowDestroy(EObj * eo); -EObj *EobjRegister(Window win, int type); +EObj *EobjRegister(Window xwin, int type); void EobjUnregister(EObj * eo); +void EobjRegisterOR(Window xwin); + void EobjMap(EObj * eo, int raise); void EobjUnmap(EObj * eo); void EobjMove(EObj * eo, int x, int y); diff --git a/src/ewins.c b/src/ewins.c index e6c25f14..8d51cb2e 100644 --- a/src/ewins.c +++ b/src/ewins.c @@ -2242,14 +2242,9 @@ EwinsManage(void) continue; if (attr.override_redirect) - { - XUnmapWindow(disp, xwin); /* Makes the CM catch it on map */ - XMapWindow(disp, xwin); - } + EobjRegisterOR(xwin); else - { - AddToFamily(NULL, xwin, 1); - } + AddToFamily(NULL, xwin, 1); } XFree(xwins); }