Move argb bit from Eobj down to Win struct.
SVN revision: 30040
This commit is contained in:
parent
f7a0f9b160
commit
4e1398d8a4
|
@ -1235,7 +1235,7 @@ ECompMgrWinSetOpacity(EObj * eo, unsigned int opacity)
|
|||
|
||||
if (eo->noredir)
|
||||
mode = WINDOW_UNREDIR;
|
||||
else if (eo->argb)
|
||||
else if (eo->win->argb)
|
||||
mode = WINDOW_ARGB;
|
||||
else if (cw->opacity != OPAQUE)
|
||||
mode = WINDOW_TRANS;
|
||||
|
|
13
src/eobj.c
13
src/eobj.c
|
@ -158,12 +158,16 @@ EobjIsShaped(const EObj * eo)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if USE_GLX
|
||||
#define WINTYPE(t) ((t == EOBJ_TYPE_GLX) ? 2 : 1)
|
||||
#else
|
||||
#define WINTYPE(t) 1
|
||||
#endif
|
||||
|
||||
void
|
||||
EobjInit(EObj * eo, int type, Win win, int x, int y, int w, int h,
|
||||
int su, const char *name)
|
||||
{
|
||||
char argb;
|
||||
|
||||
if (!eo->desk)
|
||||
eo->desk = DeskGet(0);
|
||||
|
||||
|
@ -176,9 +180,8 @@ EobjInit(EObj * eo, int type, Win win, int x, int y, int w, int h,
|
|||
}
|
||||
else
|
||||
{
|
||||
win = ECreateObjectWindow(EoGetWin(eo->desk), x, y, w, h, su, 0,
|
||||
NULL, &argb);
|
||||
eo->argb = argb;
|
||||
win = ECreateObjectWindow(EoGetWin(eo->desk), x, y, w, h, su,
|
||||
WINTYPE(type), NULL);
|
||||
}
|
||||
}
|
||||
eo->type = type;
|
||||
|
|
|
@ -40,7 +40,6 @@ struct _eobj
|
|||
char sticky;
|
||||
char floating;
|
||||
unsigned external:1;
|
||||
unsigned argb:1;
|
||||
unsigned inputonly:1;
|
||||
unsigned shown:1;
|
||||
unsigned gone:1;
|
||||
|
@ -72,6 +71,7 @@ struct _eobj
|
|||
#define EOBJ_TYPE_EXT 5
|
||||
#define EOBJ_TYPE_MISC_NR 6 /* Unredirected */
|
||||
#define EOBJ_TYPE_ROOT_BG 7
|
||||
#define EOBJ_TYPE_GLX 8
|
||||
|
||||
#define EobjGetWin(eo) ((eo)->win)
|
||||
#define EobjGetXwin(eo) WinGetXwin((eo)->win)
|
||||
|
|
|
@ -196,7 +196,6 @@ EwinManage(EWin * ewin)
|
|||
{
|
||||
XSetWindowAttributes att;
|
||||
Win frame;
|
||||
char argb;
|
||||
|
||||
if (ewin->client.w <= 0)
|
||||
ewin->client.w = 100;
|
||||
|
@ -211,9 +210,8 @@ EwinManage(EWin * ewin)
|
|||
{
|
||||
frame =
|
||||
ECreateObjectWindow(VRoot.win, ewin->client.x, ewin->client.y,
|
||||
ewin->client.w, ewin->client.h, 0, 1,
|
||||
EwinGetClientWin(ewin), &argb);
|
||||
ewin->o.argb = argb;
|
||||
ewin->client.w, ewin->client.h, 0, 0,
|
||||
EwinGetClientWin(ewin));
|
||||
ewin->win_container =
|
||||
ECreateWindow(frame, 0, 0, ewin->client.w, ewin->client.h, 0);
|
||||
|
||||
|
|
29
src/x.c
29
src/x.c
|
@ -33,6 +33,9 @@
|
|||
#if USE_COMPOSITE
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#endif
|
||||
#if USE_GLX
|
||||
#include "eglx.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_XWIN 0
|
||||
|
||||
|
@ -413,7 +416,7 @@ ECreateWindowVD(Win parent, int x, int y, int w, int h,
|
|||
|
||||
Win
|
||||
ECreateObjectWindow(Win parent, int x, int y, int w, int h, int saveunder,
|
||||
int type, Win cwin, char *argb_ret)
|
||||
int type, Win cwin)
|
||||
{
|
||||
Win win;
|
||||
int argb = 0;
|
||||
|
@ -421,30 +424,36 @@ ECreateObjectWindow(Win parent, int x, int y, int w, int h, int saveunder,
|
|||
#if USE_COMPOSITE
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
case 0: /* Internal */
|
||||
if (Conf.testing.argb_internal_objects)
|
||||
argb = 1;
|
||||
break;
|
||||
case 1: /* Client window */
|
||||
case 0: /* Client window */
|
||||
if (Conf.testing.argb_clients || EVisualIsARGB(cwin->visual))
|
||||
argb = 1;
|
||||
break;
|
||||
default:
|
||||
case 1: /* Internal */
|
||||
if (Conf.testing.argb_internal_objects)
|
||||
argb = 1;
|
||||
break;
|
||||
#if USE_GLX
|
||||
case 2: /* Internal GL */
|
||||
argb = 1;
|
||||
win =
|
||||
ECreateWindowVD(parent, x, y, w, h, EGlGetVisual(), EGlGetDepth());
|
||||
win->argb = 1;
|
||||
return win;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (argb)
|
||||
win = ECreateArgbWindow(parent, x, y, w, h, cwin);
|
||||
else
|
||||
win = ECreateWindow(parent, x, y, w, h, saveunder);
|
||||
win->argb = argb;
|
||||
#else
|
||||
win = ECreateWindow(parent, x, y, w, h, saveunder);
|
||||
type = 0;
|
||||
cwin = NULL;
|
||||
#endif
|
||||
|
||||
if (argb_ret)
|
||||
*argb_ret = argb;
|
||||
|
||||
return win;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,9 @@ struct _xwin
|
|||
Window xwin;
|
||||
Win parent;
|
||||
int x, y, w, h;
|
||||
int bw;
|
||||
short depth;
|
||||
unsigned short bw;
|
||||
char argb;
|
||||
char mapped;
|
||||
char in_use;
|
||||
signed char do_del;
|
||||
|
@ -77,7 +79,6 @@ struct _xwin
|
|||
int ord;
|
||||
XRectangle *rects;
|
||||
Visual *visual;
|
||||
int depth;
|
||||
Colormap cmap;
|
||||
Pixmap bgpmap;
|
||||
unsigned int bgcol;
|
||||
|
@ -130,7 +131,7 @@ Win ECreateWindowVD(Win parent, int x, int y, int w, int h,
|
|||
Win ECreateClientWindow(Win parent, int x, int y, int w, int h);
|
||||
Win ECreateObjectWindow(Win parent, int x, int y, int w,
|
||||
int h, int saveunder, int type,
|
||||
Win cwin, char *argb);
|
||||
Win cwin);
|
||||
Win ECreateEventWindow(Win parent, int x, int y, int w, int h);
|
||||
Win ECreateFocusWindow(Win parent, int x, int y, int w, int h);
|
||||
void EWindowSync(Win win);
|
||||
|
|
Loading…
Reference in New Issue