Enable compiling without pseudo-trans support (Tres Melton).
SVN revision: 15255
This commit is contained in:
parent
72dd701326
commit
0859350f49
4
src/E.h
4
src/E.h
|
@ -1874,6 +1874,10 @@ void TransparencySet(int transparency);
|
|||
int TransparencyEnabled(void);
|
||||
int TransparencyUpdateNeeded(void);
|
||||
int ImageclassIsTransparent(ImageClass * ic);
|
||||
#else
|
||||
#define TransparencyEnabled() 0
|
||||
#define TransparencyUpdateNeeded() 0
|
||||
#define ImageclassIsTransparent(ic) 0
|
||||
#endif
|
||||
ImageState *ImageclassGetImageState(ImageClass * ic, int state,
|
||||
int active, int sticky);
|
||||
|
|
24
src/iclass.c
24
src/iclass.c
|
@ -41,9 +41,6 @@ TransparencyEnabled(void)
|
|||
int
|
||||
TransparencyUpdateNeeded(void)
|
||||
{
|
||||
/* For this to work right prev_alpha needs set to zero on initialization */
|
||||
/* if transparency is disabled (by being set to zero). */
|
||||
/* FIXME - Check this. We call TransparencySet(Conf.trans.alpha) at startup */
|
||||
return Conf.trans.alpha || prev_alpha;
|
||||
}
|
||||
|
||||
|
@ -84,27 +81,18 @@ TransparencySet(int transparency)
|
|||
if (prev_alpha == -1)
|
||||
{
|
||||
prev_alpha = Conf.trans.alpha = transparency;
|
||||
/* Generate the color modifier tables */
|
||||
TransparencyMakeColorModifier();
|
||||
ModulesSignal(ESIGNAL_THEME_TRANS_CHANGE, NULL);
|
||||
changed = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
changed = Conf.trans.alpha != transparency;
|
||||
prev_alpha = Conf.trans.alpha;
|
||||
Conf.trans.alpha = transparency;
|
||||
/* Generate the color modifier tables */
|
||||
TransparencyMakeColorModifier();
|
||||
if (changed)
|
||||
ModulesSignal(ESIGNAL_THEME_TRANS_CHANGE, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void
|
||||
TransparencySet(int transparency __UNUSED__)
|
||||
{
|
||||
/* Generate the color modifier tables */
|
||||
TransparencyMakeColorModifier();
|
||||
if (changed)
|
||||
ModulesSignal(ESIGNAL_THEME_TRANS_CHANGE, NULL);
|
||||
}
|
||||
|
||||
#endif /* ENABLE_THEME_TRANSPARENCY */
|
||||
|
@ -620,11 +608,13 @@ ImageclassCreateSimple(const char *name, const char *image)
|
|||
return ic;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_THEME_TRANSPARENCY
|
||||
int
|
||||
ImageclassIsTransparent(ImageClass * ic)
|
||||
{
|
||||
return ic && ic->norm.normal && ic->norm.normal->transparent;
|
||||
}
|
||||
#endif
|
||||
|
||||
static ImageState *
|
||||
ImageclassGetImageState1(ImageStateArray * pisa, int state)
|
||||
|
|
|
@ -50,7 +50,10 @@ extern EModule ModSound;
|
|||
extern EModule ModTextclass;
|
||||
extern EModule ModTheme;
|
||||
extern EModule ModTooltips;
|
||||
|
||||
#ifdef ENABLE_THEME_TRANSPARENCY
|
||||
extern EModule ModTransparency;
|
||||
#endif
|
||||
extern EModule ModWarplist;
|
||||
extern EModule ModWindowMatch;
|
||||
|
||||
|
@ -77,7 +80,9 @@ const EModule *p_modules[] = {
|
|||
&ModTextclass,
|
||||
&ModTheme,
|
||||
&ModTooltips,
|
||||
#ifdef ENABLE_THEME_TRANSPARENCY
|
||||
&ModTransparency,
|
||||
#endif
|
||||
&ModWarplist,
|
||||
&ModWindowMatch,
|
||||
};
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#include "E.h"
|
||||
|
||||
#ifdef ENABLE_THEME_TRANSPARENCY
|
||||
/*
|
||||
* Theme transparency settings
|
||||
*/
|
||||
|
@ -426,3 +427,5 @@ EModule ModTransparency = {
|
|||
{N_IPC_FUNCS, TransIpcArray},
|
||||
{N_CFG_ITEMS, TransCfgItems}
|
||||
};
|
||||
|
||||
#endif /* ENABLE_THEME_TRANSPARENCY */
|
||||
|
|
Loading…
Reference in New Issue