New ARGB client handling mode: off(default), borderless, or full.
SVN revision: 14582
This commit is contained in:
parent
55009989fa
commit
558aebf700
|
@ -52,6 +52,10 @@ void ECompMgrConfigSet(const cfg_composite * cfg);
|
|||
void ECompMgrMoveResizeFix(EObj * eo, int x, int y, int w,
|
||||
int h);
|
||||
|
||||
#else
|
||||
|
||||
#define EVisualIsARGB(vis) 0
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _ECOMPMGR_H */
|
||||
|
|
13
src/ewins.c
13
src/ewins.c
|
@ -66,16 +66,15 @@ EwinCreate(Window win, int type)
|
|||
EWin *ewin;
|
||||
XSetWindowAttributes att;
|
||||
Window frame;
|
||||
int require_argb;
|
||||
int use_argb;
|
||||
XWindowAttributes win_attr;
|
||||
|
||||
require_argb = 0;
|
||||
use_argb = 0;
|
||||
if (type == EWIN_TYPE_NORMAL)
|
||||
{
|
||||
if (!XGetWindowAttributes(disp, win, &win_attr))
|
||||
return NULL;
|
||||
if (win_attr.depth == 32)
|
||||
require_argb = 1;
|
||||
use_argb = Conf.argb_client_mode > 0 && EVisualIsARGB(win_attr.visual);
|
||||
}
|
||||
|
||||
ewin = Ecalloc(1, sizeof(EWin));
|
||||
|
@ -117,7 +116,7 @@ EwinCreate(Window win, int type)
|
|||
|
||||
ewin->ewmh.opacity = 0; /* If 0, ignore */
|
||||
|
||||
if (require_argb)
|
||||
if (use_argb)
|
||||
frame = ECreateVisualWindow(VRoot.win, -10, -10, 1, 1, 1, &win_attr);
|
||||
else
|
||||
frame = ECreateWindow(VRoot.win, -10, -10, 1, 1, 1);
|
||||
|
@ -129,7 +128,7 @@ EwinCreate(Window win, int type)
|
|||
EoSetShadow(ewin, 1);
|
||||
EobjListFocusAdd(&ewin->o, 0);
|
||||
|
||||
if (require_argb)
|
||||
if (use_argb)
|
||||
ewin->win_container =
|
||||
ECreateVisualWindow(EoGetWin(ewin), 0, 0, 1, 1, 0, &win_attr);
|
||||
else
|
||||
|
@ -168,7 +167,7 @@ EwinCreate(Window win, int type)
|
|||
ewin->client.bw = 0;
|
||||
}
|
||||
|
||||
if (require_argb && Conf.argb_clients_borderless)
|
||||
if (use_argb && Conf.argb_client_mode < 2)
|
||||
ewin->border =
|
||||
FindItem("BORDERLESS", 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ static const CfgItem MiscCfgItems[] = {
|
|||
CFG_ITEM_BOOL(Conf, memory_paranoia, 1),
|
||||
CFG_ITEM_BOOL(Conf, save_under, 0),
|
||||
CFG_ITEM_INT(Conf, edge_flip_resistance, 25),
|
||||
CFG_ITEM_BOOL(Conf, argb_clients_borderless, 1),
|
||||
CFG_ITEM_INT(Conf, argb_client_mode, 0),
|
||||
};
|
||||
#define N_CFG_ITEMS ((int)(sizeof(MiscCfgItems)/sizeof(CfgItem)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue