CM: Adjust shadowing conditions some more
Re-enable sharp shadows on shaped windows. Should be ok now that sharp shadowing shaped windows has been fixed.
This commit is contained in:
parent
5b071a0e26
commit
dc5db9e4a1
|
@ -754,7 +754,7 @@ ECompMgrWinSetExtents(EObj * eo)
|
|||
|
||||
case ECM_SHADOWS_SHARP:
|
||||
case ECM_SHADOWS_ECHO:
|
||||
if (!EobjShadowOk(eo))
|
||||
if (!EobjShadowOk(eo, true))
|
||||
goto skip_shadow;
|
||||
|
||||
cw->shadow_dx = Conf_compmgr.shadows.offset_x;
|
||||
|
@ -764,7 +764,7 @@ ECompMgrWinSetExtents(EObj * eo)
|
|||
break;
|
||||
|
||||
case ECM_SHADOWS_BLURRED:
|
||||
if (!EobjShadowOk(eo))
|
||||
if (!EobjShadowOk(eo, false))
|
||||
goto skip_shadow;
|
||||
|
||||
if (!gaussianMap)
|
||||
|
|
18
src/eobj.c
18
src/eobj.c
|
@ -163,26 +163,30 @@ EobjSetFloating(EObj * eo, int floating)
|
|||
EobjSetLayer(eo, eo->layer);
|
||||
}
|
||||
|
||||
int
|
||||
EobjShadowOk(const EObj * eo)
|
||||
bool
|
||||
EobjShadowOk(const EObj * eo, bool sharp)
|
||||
{
|
||||
if (!eo->shadow)
|
||||
return 0; /* Shadow disabled by configuration */
|
||||
return false; /* Disabled by configuration */
|
||||
|
||||
switch (eo->type)
|
||||
{
|
||||
default:
|
||||
if (sharp)
|
||||
return true; /* Enabled if sharp */
|
||||
if (eo->shaped)
|
||||
return 0; /* Shadow disabled if shaped */
|
||||
return false; /* Disabled if shaped */
|
||||
break;
|
||||
case EOBJ_TYPE_EWIN:
|
||||
if (((EWin *) eo)->state.fullscreen)
|
||||
return 0; /* Shadow disabled if fullscreen */
|
||||
return false; /* Disabled if fullscreen */
|
||||
if (sharp)
|
||||
return true; /* Enabled if sharp */
|
||||
if (((EWin *) eo)->state.shaped)
|
||||
return 0; /* Shadow disabled if client is shaped */
|
||||
return false; /* Disabled if client is shaped */
|
||||
}
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
#if USE_GLX
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#ifndef _EOBJ_H_
|
||||
#define _EOBJ_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "etypes.h"
|
||||
#include "xwin.h"
|
||||
|
||||
|
@ -186,7 +187,7 @@ void EobjChangeOpacity(EObj * eo, unsigned int opacity);
|
|||
void EobjChangeShadow(EObj * eo, int shadow);
|
||||
void EobjSetLayer(EObj * eo, int layer);
|
||||
void EobjSetFloating(EObj * eo, int floating);
|
||||
int EobjShadowOk(const EObj * eo);
|
||||
bool EobjShadowOk(const EObj * eo, bool sharp);
|
||||
|
||||
void EobjsOpacityUpdate(int op_or);
|
||||
|
||||
|
|
Loading…
Reference in New Issue