Add ipc/match bits to enable/disable fading of particular windows.

SVN revision: 26392
This commit is contained in:
Kim Woelders 2006-10-07 12:02:34 +00:00
parent 0f8af4c56b
commit 6efc2c6872
5 changed files with 19 additions and 3 deletions

View File

@ -106,6 +106,7 @@ struct _eobj
#if USE_COMPOSITE
#define EoSetOpacity(eo, _o) EoObj(eo)->opacity = (_o)
#define EoGetOpacity(eo) (EoObj(eo)->opacity)
#define EoGetFade(eo) (EoObj(eo)->fade)
#define EoGetShadow(eo) (EoObj(eo)->shadow)
#define EoGetNoRedirect(eo) (EoObj(eo)->noredir)
#define EoGetSerial(eo) (EoObj(eo)->serial)

View File

@ -87,6 +87,7 @@ static const WinOp winops[] = {
{"no_user_size", 0, 1, 1, EWIN_OP_INH_USER_SIZE},
{"no_wm_focus", 0, 1, 1, EWIN_OP_INH_WM_FOCUS},
{"fade", 0, 1, 1, EWIN_OP_FADE},
{"noredir", 4, 1, 1, EWIN_OP_NO_REDIRECT},
{NULL, 0, 0, 0, EWIN_OP_INVALID} /* Terminator */

View File

@ -71,6 +71,7 @@ typedef enum
EWIN_OP_INH_USER_SIZE,
EWIN_OP_INH_WM_FOCUS,
EWIN_OP_FADE,
EWIN_OP_SHADOW,
EWIN_OP_NO_REDIRECT,
} winop_e;

View File

@ -882,6 +882,12 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
break;
#if USE_COMPOSITE
case EWIN_OP_FADE:
on = EoGetFade(ewin);
if (SetEwinBoolean(wop->name, &on, param1, 1))
EoSetFade(ewin, on);
break;
case EWIN_OP_SHADOW:
on = EoGetShadow(ewin);
if (SetEwinBoolean(wop->name, &on, param1, 1))
@ -1134,7 +1140,7 @@ EwinShowInfo(const EWin * ewin)
"State %i Shown %i Visibility %i Active %i\n"
"Member of groups %i\n"
#if USE_COMPOSITE
"Opacity %3i(%x) Shadow %i NoRedirect %i\n"
"Opacity %3i(%x) Shadow %i Fade %i NoRedirect %i\n"
#else
"Opacity %3i\n"
#endif
@ -1180,7 +1186,8 @@ EwinShowInfo(const EWin * ewin)
ewin->state.visibility, ewin->state.active, ewin->num_groups,
OpacityToPercent(ewin->ewmh.opacity)
#if USE_COMPOSITE
, EoGetOpacity(ewin), EoGetShadow(ewin), EoGetNoRedirect(ewin)
, EoGetOpacity(ewin), EoGetShadow(ewin), EoGetFade(ewin),
EoGetNoRedirect(ewin)
#endif
);
}
@ -1409,6 +1416,9 @@ static const IpcItem IPCArray[] = {
" win_op <windowid> title <title>\n"
" win_op <windowid> <close/kill>\n"
" win_op <windowid> <focus/iconify/shade/stick>\n"
#if USE_COMPOSITE
" win_op <windowid> <fade/shadow>\n"
#endif
" win_op <windowid> desk <desktochangeto/next/prev>\n"
" win_op <windowid> area <x> <y>\n"
" win_op <windowid> <move/size> <x> <y>\n"
@ -1426,7 +1436,6 @@ static const IpcItem IPCArray[] = {
" win_op <windowid> <no_app_focus/move/size>\n"
" win_op <windowid> <no_user_close/move/size>\n"
" win_op <windowid> <no_wm_focus>\n"
" win_op <windowid> noshadow\n"
"<windowid> may be substituted with \"current\" to use the current window\n"},
{
IPC_WinList,

View File

@ -767,6 +767,10 @@ WindowMatchEwinOpsAction(EWin * ewin, int op, const char *args)
break;
#if USE_COMPOSITE
case EWIN_OP_FADE:
WINOP_SET_BOOL(ewin->o.fade, args);
break;
case EWIN_OP_SHADOW:
WINOP_SET_BOOL(ewin->o.shadow, args);
break;