Add X_CFLAGS to INCLUDES. Rename root to VRoot to avoid warnings with -Wshadow.
SVN revision: 10053
This commit is contained in:
parent
af5da19f50
commit
2b847dfbe9
|
@ -7,7 +7,7 @@ edox_SOURCES = dox.c dox.h file.c format.c text.c ttfont.c
|
|||
|
||||
LDADD = $(TTF_LIBS) $(FNLIB_LIBS) $(IMLIB_LIBS) $(X_LIBS) $(XINERAMA_LIBS) -lX11 -lm
|
||||
|
||||
INCLUDES = $(IMLIB_CFLAGS) -I$(top_builddir) -I$(top_srcdir)/intl
|
||||
INCLUDES = -I$(top_builddir) -I$(top_srcdir)/intl $(IMLIB_CFLAGS) $(X_CFLAGS)
|
||||
|
||||
DEFS=-DENLIGHTENMENT_ROOT=\"@ENLIGHTENMENT_ROOT@\" -DENLIGHTENMENT_BIN=\"@ENLIGHTENMENT_BIN@\"
|
||||
|
||||
|
|
36
dox/dox.c
36
dox/dox.c
|
@ -75,7 +75,7 @@ typedef struct _mwmhints
|
|||
} MWMHints;
|
||||
|
||||
Display *disp;
|
||||
Root root;
|
||||
Root VRoot;
|
||||
|
||||
#if !USE_IMLIB2
|
||||
ImlibData *pI1Ctx;
|
||||
|
@ -110,7 +110,7 @@ CreateWindow(Window parent, int x, int y, int ww, int hh)
|
|||
|
||||
attr.backing_store = NotUseful;
|
||||
attr.override_redirect = False;
|
||||
attr.colormap = root.cmap;
|
||||
attr.colormap = VRoot.cmap;
|
||||
attr.border_pixel = 0;
|
||||
attr.background_pixel = 0;
|
||||
attr.save_under = False;
|
||||
|
@ -119,8 +119,8 @@ CreateWindow(Window parent, int x, int y, int ww, int hh)
|
|||
mwm.decorations = 0;
|
||||
mwm.inputMode = 0;
|
||||
/* a = XInternAtom(disp, "_MOTIF_WM_HINTS", False); */
|
||||
win = XCreateWindow(disp, parent, x, y, ww, hh, 0, root.depth,
|
||||
InputOutput, root.vis,
|
||||
win = XCreateWindow(disp, parent, x, y, ww, hh, 0, VRoot.depth,
|
||||
InputOutput, VRoot.vis,
|
||||
CWOverrideRedirect | CWSaveUnder | CWBackingStore |
|
||||
CWColormap | CWBackPixel | CWBorderPixel, &attr);
|
||||
XSetWindowBackground(disp, win, 0);
|
||||
|
@ -254,18 +254,18 @@ main(int argc, char **argv)
|
|||
/* I dont want any internationalisation of my numeric input & output */
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
|
||||
root.scr = DefaultScreen(disp);
|
||||
VRoot.scr = DefaultScreen(disp);
|
||||
#if USE_IMLIB2
|
||||
root.win = DefaultRootWindow(disp);
|
||||
root.vis = DefaultVisual(disp, root.scr);
|
||||
root.depth = DefaultDepth(disp, root.scr);
|
||||
root.cmap = DefaultColormap(disp, root.scr);
|
||||
VRoot.win = DefaultRootWindow(disp);
|
||||
VRoot.vis = DefaultVisual(disp, VRoot.scr);
|
||||
VRoot.depth = DefaultDepth(disp, VRoot.scr);
|
||||
VRoot.cmap = DefaultColormap(disp, VRoot.scr);
|
||||
|
||||
imlib_set_color_usage(128);
|
||||
|
||||
imlib_context_set_display(disp);
|
||||
imlib_context_set_visual(root.vis);
|
||||
imlib_context_set_colormap(root.cmap);
|
||||
imlib_context_set_visual(VRoot.vis);
|
||||
imlib_context_set_colormap(VRoot.cmap);
|
||||
imlib_context_set_dither(1);
|
||||
imlib_context_set_dither_mask(0);
|
||||
#else
|
||||
|
@ -274,10 +274,10 @@ main(int argc, char **argv)
|
|||
params.pixmapcachesize = (w * h * 3 * 2 * 8);
|
||||
pI1Ctx = Imlib_init_with_params(disp, ¶ms);
|
||||
Imlib_set_render_type(pI1Ctx, RT_DITHER_TRUECOL);
|
||||
root.win = pI1Ctx->x.root;
|
||||
root.vis = Imlib_get_visual(pI1Ctx);
|
||||
root.depth = pI1Ctx->x.depth;
|
||||
root.cmap = Imlib_get_colormap(pI1Ctx);
|
||||
VRoot.win = pI1Ctx->x.root;
|
||||
VRoot.vis = Imlib_get_visual(pI1Ctx);
|
||||
VRoot.depth = pI1Ctx->x.depth;
|
||||
VRoot.cmap = Imlib_get_colormap(pI1Ctx);
|
||||
#endif
|
||||
#if USE_FNLIB
|
||||
pFnlibData = Fnlib_init(pI1Ctx);
|
||||
|
@ -360,7 +360,7 @@ main(int argc, char **argv)
|
|||
int num;
|
||||
XineramaScreenInfo *screens;
|
||||
|
||||
XQueryPointer(disp, root.win, &rt, &ch, &pointer_x, &pointer_y,
|
||||
XQueryPointer(disp, VRoot.win, &rt, &ch, &pointer_x, &pointer_y,
|
||||
&d, &d, &ud);
|
||||
|
||||
screens = XineramaQueryScreens(disp, &num);
|
||||
|
@ -390,7 +390,7 @@ main(int argc, char **argv)
|
|||
|
||||
}
|
||||
#endif
|
||||
win_main = CreateWindow(root.win, wx, wy, w, h + t);
|
||||
win_main = CreateWindow(VRoot.win, wx, wy, w, h + t);
|
||||
win_title =
|
||||
XCreateSimpleWindow(disp, win_main, 0, 0, (w - 64 - 64 - t), t, 0, 0, 0);
|
||||
win_prev =
|
||||
|
@ -408,7 +408,7 @@ main(int argc, char **argv)
|
|||
XSelectInput(disp, win_text, ButtonPressMask | ButtonReleaseMask |
|
||||
KeyPressMask | KeyReleaseMask | PointerMotionMask);
|
||||
|
||||
draw = XCreatePixmap(disp, win_text, w, h, root.depth);
|
||||
draw = XCreatePixmap(disp, win_text, w, h, VRoot.depth);
|
||||
|
||||
ApplyImage1(win_title, im_title);
|
||||
ApplyImage1(win_prev, im_prev1);
|
||||
|
|
|
@ -58,12 +58,12 @@
|
|||
#define IMLIB1_SET_CONTEXT(root_ctx)
|
||||
|
||||
#define EAllocColor(pxc) \
|
||||
XAllocColor(disp, root.cmap, pxc)
|
||||
XAllocColor(disp, VRoot.cmap, pxc)
|
||||
|
||||
#define IMLIB_FREE_PIXMAP_AND_MASK(pmap, mask) \
|
||||
imlib_free_pixmap_and_mask(pmap)
|
||||
|
||||
#define IC_RenderDepth() DefaultDepth(disp, root.scr)
|
||||
#define IC_RenderDepth() DefaultDepth(disp, VRoot.scr)
|
||||
|
||||
#else
|
||||
|
||||
|
@ -314,7 +314,7 @@ void GetLinkColors(int page_num, int *r, int *g, int *b);
|
|||
Link *RenderPage(Window win, int page_num, int w, int h);
|
||||
|
||||
extern Display *disp;
|
||||
extern Root root;
|
||||
extern Root VRoot;
|
||||
|
||||
#if USE_FNLIB
|
||||
extern FnlibData *pFnlibData;
|
||||
|
|
12
dox/text.c
12
dox/text.c
|
@ -292,25 +292,25 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
EAllocColor(&ts->bg_col);
|
||||
XSetForeground(disp, gc, ts->bg_col.pixel);
|
||||
EFont_draw_string(disp, win, gc, xx + 1, yy + 1,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
}
|
||||
else if (ts->effect == 2)
|
||||
{
|
||||
EAllocColor(&ts->bg_col);
|
||||
XSetForeground(disp, gc, ts->bg_col.pixel);
|
||||
EFont_draw_string(disp, win, gc, xx - 1, yy,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
EFont_draw_string(disp, win, gc, xx + 1, yy,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
EFont_draw_string(disp, win, gc, xx, yy - 1,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
EFont_draw_string(disp, win, gc, xx, yy + 1,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
}
|
||||
EAllocColor(&ts->fg_col);
|
||||
XSetForeground(disp, gc, ts->fg_col.pixel);
|
||||
EFont_draw_string(disp, win, gc, xx, yy,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
yy += ascent + descent;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ eesh_SOURCES = E.h comms.c globals.c lists.c main.c setup.c memory.c
|
|||
|
||||
LDADD = $(X_LIBS) -lX11
|
||||
|
||||
INCLUDES = $(IMLIB_CFLAGS) -I$(top_builddir) -I$(top_srcdir)/intl
|
||||
INCLUDES = -I$(top_builddir) -I$(top_srcdir)/intl $(X_CFLAGS)
|
||||
|
||||
DEFS=-DENLIGHTENMENT_ROOT=\"@ENLIGHTENMENT_ROOT@\"
|
||||
|
||||
|
|
8
src/E.h
8
src/E.h
|
@ -56,12 +56,12 @@
|
|||
#define IMLIB1_SET_CONTEXT(root_ctx)
|
||||
|
||||
#define EAllocColor(pxc) \
|
||||
XAllocColor(disp, root.cmap, pxc)
|
||||
XAllocColor(disp, VRoot.cmap, pxc)
|
||||
|
||||
#define IMLIB_FREE_PIXMAP_AND_MASK(pmap, mask) \
|
||||
imlib_free_pixmap_and_mask(pmap)
|
||||
|
||||
#define IC_RenderDepth() DefaultDepth(disp, root.scr)
|
||||
#define IC_RenderDepth() DefaultDepth(disp, VRoot.scr)
|
||||
|
||||
#define ENABLE_TRANSPARENCY 1
|
||||
#define ENABLE_THEME_TRANSPARENCY 1
|
||||
|
@ -164,7 +164,7 @@ extern Drawable vIcDrw;
|
|||
|
||||
#define XSync(d, f) \
|
||||
{XImage *__xim; \
|
||||
__xim = XGetImage(d, root.win, 0, 0, 1, 1, 0xffffffff, ZPixmap); \
|
||||
__xim = XGetImage(d, VRoot.win, 0, 0, 1, 1, 0xffffffff, ZPixmap); \
|
||||
if (__xim) XDestroyImage(__xim);}
|
||||
|
||||
#ifdef HAS_XINERAMA
|
||||
|
@ -2801,7 +2801,7 @@ extern Imlib_Context *prImlib_Context;
|
|||
extern FnlibData *pFnlibData;
|
||||
#endif
|
||||
extern List *lists;
|
||||
extern Root root;
|
||||
extern Root VRoot;
|
||||
extern EConf Conf;
|
||||
extern EMode Mode;
|
||||
extern Desktops desks;
|
||||
|
|
|
@ -102,7 +102,7 @@ LDADD = \
|
|||
$(E_X_LIBS) \
|
||||
-lX11 -lm
|
||||
|
||||
INCLUDES = $(ESD_CFLAGS) $(IMLIB_CFLAGS) -I$(top_builddir) -I$(top_srcdir)/intl
|
||||
INCLUDES = -I$(top_builddir) -I$(top_srcdir)/intl $(ESD_CFLAGS) $(IMLIB_CFLAGS) $(X_CFLAGS)
|
||||
|
||||
DEFS=-DENLIGHTENMENT_ROOT=\"@ENLIGHTENMENT_ROOT@\" -DENLIGHTENMENT_BIN=\"@ENLIGHTENMENT_BIN@\" -DLOCALEDIR=\"@LOCALEDIR@\"
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ RefreshScreen(void)
|
|||
attr.backing_store = NotUseful;
|
||||
|
||||
win =
|
||||
XCreateWindow(disp, root.win, 0, 0, root.w, root.h, 0, CopyFromParent,
|
||||
XCreateWindow(disp, VRoot.win, 0, 0, VRoot.w, VRoot.h, 0, CopyFromParent,
|
||||
CopyFromParent, CopyFromParent,
|
||||
CWBackingStore | CWSaveUnder, &attr);
|
||||
XMapRaised(disp, win);
|
||||
|
@ -601,7 +601,7 @@ spawnMenu(EWin * ewin, const void *params)
|
|||
{
|
||||
EGetGeometry(disp, Mode.context_win, &dw, &di, &di, &w, &h, &d,
|
||||
&d);
|
||||
XTranslateCoordinates(disp, Mode.context_win, root.win, 0, 0, &x,
|
||||
XTranslateCoordinates(disp, Mode.context_win, VRoot.win, 0, 0, &x,
|
||||
&y, &dw);
|
||||
|
||||
if (w >= h)
|
||||
|
@ -1301,15 +1301,15 @@ doCleanup(EWin * edummy, const void *params)
|
|||
fixed[k].x += fixed[k].w;
|
||||
fixed[k].x = 0;
|
||||
}
|
||||
if ((fixed[k].x + fixed[k].w) > root.w)
|
||||
fixed[k].w = root.w - fixed[k].x;
|
||||
if ((fixed[k].x + fixed[k].w) > VRoot.w)
|
||||
fixed[k].w = VRoot.w - fixed[k].x;
|
||||
if (fixed[k].y < 0)
|
||||
{
|
||||
fixed[k].y += fixed[k].h;
|
||||
fixed[k].y = 0;
|
||||
}
|
||||
if ((fixed[k].y + fixed[k].h) > root.h)
|
||||
fixed[k].h = root.h - fixed[k].y;
|
||||
if ((fixed[k].y + fixed[k].h) > VRoot.h)
|
||||
fixed[k].h = VRoot.h - fixed[k].y;
|
||||
if ((fixed[k].w > 0) && (fixed[k].h > 0))
|
||||
{
|
||||
if (!ewin->never_use_area)
|
||||
|
@ -1336,15 +1336,15 @@ doCleanup(EWin * edummy, const void *params)
|
|||
fixed[k].x += fixed[k].w;
|
||||
fixed[k].x = 0;
|
||||
}
|
||||
if ((fixed[k].x + fixed[k].w) > root.w)
|
||||
fixed[k].w = root.w - fixed[k].x;
|
||||
if ((fixed[k].x + fixed[k].w) > VRoot.w)
|
||||
fixed[k].w = VRoot.w - fixed[k].x;
|
||||
if (fixed[k].y < 0)
|
||||
{
|
||||
fixed[k].y += fixed[k].h;
|
||||
fixed[k].y = 0;
|
||||
}
|
||||
if ((fixed[k].y + fixed[k].h) > root.h)
|
||||
fixed[k].h = root.h - fixed[k].y;
|
||||
if ((fixed[k].y + fixed[k].h) > VRoot.h)
|
||||
fixed[k].h = VRoot.h - fixed[k].y;
|
||||
if ((fixed[k].w <= 0) || (fixed[k].h <= 0))
|
||||
continue;
|
||||
|
||||
|
@ -1357,7 +1357,7 @@ doCleanup(EWin * edummy, const void *params)
|
|||
Efree(blst);
|
||||
}
|
||||
|
||||
ArrangeRects(fixed, k, floating, j, ret, 0, 0, root.w, root.h, method,
|
||||
ArrangeRects(fixed, k, floating, j, ret, 0, 0, VRoot.w, VRoot.h, method,
|
||||
0);
|
||||
|
||||
for (i = 0; i < (j + k); i++)
|
||||
|
@ -1698,7 +1698,7 @@ doDragButtonStart(EWin * edummy, const void *params)
|
|||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
GrabThePointer(root.win);
|
||||
GrabThePointer(VRoot.win);
|
||||
Mode.mode = MODE_BUTTONDRAG;
|
||||
Mode.button_move_pending = 1;
|
||||
Mode.start_x = Mode.x;
|
||||
|
|
|
@ -260,8 +260,8 @@ SetCurrentArea(int ax, int ay)
|
|||
tt = FindItem("DEFAULT", 0, LIST_FINDBY_NAME, LIST_TYPE_TOOLTIP);
|
||||
HideToolTip(tt);
|
||||
|
||||
dx = root.w * (ax - desks.desk[desks.current].current_area_x);
|
||||
dy = root.h * (ay - desks.desk[desks.current].current_area_y);
|
||||
dx = VRoot.w * (ax - desks.desk[desks.current].current_area_x);
|
||||
dy = VRoot.h * (ay - desks.desk[desks.current].current_area_y);
|
||||
|
||||
if (dx < 0)
|
||||
SoundPlay("SOUND_MOVE_AREA_LEFT");
|
||||
|
|
|
@ -553,9 +553,9 @@ ArrangeRects(RectBox * fixed, int fixed_count, RectBox * floating,
|
|||
for (i = 0; i < num_sorted; i++)
|
||||
{
|
||||
if ((sorted[i].x + sorted[i].w) > width)
|
||||
sorted[i].x = root.w - sorted[i].w;
|
||||
sorted[i].x = VRoot.w - sorted[i].w;
|
||||
if ((sorted[i].y + sorted[i].h) > height)
|
||||
sorted[i].y = root.h - sorted[i].h;
|
||||
sorted[i].y = VRoot.h - sorted[i].h;
|
||||
if (sorted[i].x < startx)
|
||||
sorted[i].x = startx;
|
||||
if (sorted[i].y < starty)
|
||||
|
@ -853,15 +853,15 @@ ArrangeEwinXY(EWin * ewin, int *px, int *py)
|
|||
fixed[j].w += fixed[j].x;
|
||||
fixed[j].x = 0;
|
||||
}
|
||||
if ((fixed[j].x + fixed[j].w) > root.w)
|
||||
fixed[j].w = root.w - fixed[j].x;
|
||||
if ((fixed[j].x + fixed[j].w) > VRoot.w)
|
||||
fixed[j].w = VRoot.w - fixed[j].x;
|
||||
if (fixed[j].y < 0)
|
||||
{
|
||||
fixed[j].h += fixed[j].y;
|
||||
fixed[j].y = 0;
|
||||
}
|
||||
if ((fixed[j].y + fixed[j].h) > root.h)
|
||||
fixed[j].h = root.h - fixed[j].y;
|
||||
if ((fixed[j].y + fixed[j].h) > VRoot.h)
|
||||
fixed[j].h = VRoot.h - fixed[j].y;
|
||||
if ((fixed[j].w <= 0) || (fixed[j].h <= 0))
|
||||
continue;
|
||||
|
||||
|
@ -885,15 +885,15 @@ ArrangeEwinXY(EWin * ewin, int *px, int *py)
|
|||
fixed[j].w += fixed[j].x;
|
||||
fixed[j].x = 0;
|
||||
}
|
||||
if ((fixed[j].x + fixed[j].w) > root.w)
|
||||
fixed[j].w = root.w - fixed[j].x;
|
||||
if ((fixed[j].x + fixed[j].w) > VRoot.w)
|
||||
fixed[j].w = VRoot.w - fixed[j].x;
|
||||
if (fixed[j].y < 0)
|
||||
{
|
||||
fixed[j].h += fixed[j].y;
|
||||
fixed[j].y = 0;
|
||||
}
|
||||
if ((fixed[j].y + fixed[j].h) > root.h)
|
||||
fixed[j].h = root.h - fixed[j].y;
|
||||
if ((fixed[j].y + fixed[j].h) > VRoot.h)
|
||||
fixed[j].h = VRoot.h - fixed[j].y;
|
||||
if ((fixed[j].w <= 0) || (fixed[j].h <= 0))
|
||||
continue;
|
||||
|
||||
|
@ -913,7 +913,7 @@ ArrangeEwinXY(EWin * ewin, int *px, int *py)
|
|||
newrect.h = ewin->h;
|
||||
newrect.p = ewin->layer;
|
||||
ArrangeRects(fixed, j, &newrect, 1, ret,
|
||||
0, 0, root.w, root.h, ARRANGE_BY_SIZE, 1);
|
||||
0, 0, VRoot.w, VRoot.h, ARRANGE_BY_SIZE, 1);
|
||||
|
||||
for (i = 0; i < j + 1; i++)
|
||||
{
|
||||
|
|
|
@ -308,7 +308,7 @@ BgFindImageSize(BgPart * bgp, int rw, int rh, int *pw, int *ph, int setbg)
|
|||
else
|
||||
{
|
||||
if (!setbg)
|
||||
w = (imlib_image_get_width() * rw) / root.w;
|
||||
w = (imlib_image_get_width() * rw) / VRoot.w;
|
||||
else
|
||||
w = imlib_image_get_width();
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ BgFindImageSize(BgPart * bgp, int rw, int rh, int *pw, int *ph, int setbg)
|
|||
{
|
||||
if (!setbg)
|
||||
{
|
||||
h = (imlib_image_get_height() * rh) / root.h;
|
||||
h = (imlib_image_get_height() * rh) / VRoot.h;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -368,7 +368,7 @@ BackgroundApply(Background * bg, Window win, int setbg)
|
|||
if (!WinExists(win))
|
||||
EDBUG_RETURN_;
|
||||
|
||||
IMLIB1_SET_CONTEXT(win == root.win);
|
||||
IMLIB1_SET_CONTEXT(win == VRoot.win);
|
||||
|
||||
GetWinWH(win, &rw, &rh);
|
||||
depth = GetWinDepth(win);
|
||||
|
|
|
@ -65,14 +65,14 @@ DetermineEwinFloat(EWin * ewin, int dx, int dy)
|
|||
{
|
||||
case 0:
|
||||
if (((ewin->x + dx < 0) ||
|
||||
((ewin->x + dx + ewin->w <= root.w) &&
|
||||
((ewin->x + dx + ewin->w <= VRoot.w) &&
|
||||
((DesktopAt
|
||||
(desks.desk[ewin->desktop].x + ewin->x + dx + ewin->w - 1,
|
||||
desks.desk[ewin->desktop].y) != ewin->desktop)))))
|
||||
dofloat = 1;
|
||||
break;
|
||||
case 1:
|
||||
if (((ewin->x + dx + ewin->w > root.w) ||
|
||||
if (((ewin->x + dx + ewin->w > VRoot.w) ||
|
||||
((ewin->x + dx >= 0) &&
|
||||
((DesktopAt
|
||||
(desks.desk[ewin->desktop].x + ewin->x + dx,
|
||||
|
@ -81,7 +81,7 @@ DetermineEwinFloat(EWin * ewin, int dx, int dy)
|
|||
break;
|
||||
case 2:
|
||||
if (((ewin->y + dy < 0) ||
|
||||
((ewin->y + dy + ewin->h <= root.h) &&
|
||||
((ewin->y + dy + ewin->h <= VRoot.h) &&
|
||||
((DesktopAt
|
||||
(desks.desk[ewin->desktop].x,
|
||||
desks.desk[ewin->desktop].y + ewin->y + dy + ewin->h -
|
||||
|
@ -89,7 +89,7 @@ DetermineEwinFloat(EWin * ewin, int dx, int dy)
|
|||
dofloat = 1;
|
||||
break;
|
||||
case 3:
|
||||
if (((ewin->y + dy + ewin->h > root.h) ||
|
||||
if (((ewin->y + dy + ewin->h > VRoot.h) ||
|
||||
((ewin->y + dy >= 0) &&
|
||||
((DesktopAt
|
||||
(desks.desk[ewin->desktop].x,
|
||||
|
@ -443,7 +443,7 @@ AddToFamily(Window win)
|
|||
if ((!ewin->client.transient) && (Conf.manual_placement)
|
||||
&& (!ewin->client.already_placed) && (!Mode.startup) && (!Mode.place))
|
||||
{
|
||||
cangrab = GrabThePointer(root.win);
|
||||
cangrab = GrabThePointer(VRoot.win);
|
||||
if ((cangrab == GrabNotViewable) || (cangrab == AlreadyGrabbed)
|
||||
|| (cangrab == GrabFrozen))
|
||||
{
|
||||
|
@ -477,8 +477,8 @@ AddToFamily(Window win)
|
|||
if (ewin->desktop >= 0)
|
||||
GotoDesktop(ewin->desktop);
|
||||
|
||||
GrabThePointer(root.win);
|
||||
XQueryPointer(disp, root.win, &root_return, &junk, &rx, &ry, &wx,
|
||||
GrabThePointer(VRoot.win);
|
||||
XQueryPointer(disp, VRoot.win, &root_return, &junk, &rx, &ry, &wx,
|
||||
&wy, &mask);
|
||||
XUngrabPointer(disp, CurrentTime);
|
||||
Mode.x = rx;
|
||||
|
@ -494,8 +494,8 @@ AddToFamily(Window win)
|
|||
newWinY -= ewin->h / 2;
|
||||
|
||||
/* keep it all on this screen if possible */
|
||||
newWinX = MIN(newWinX, root.w - ewin->w);
|
||||
newWinY = MIN(newWinY, root.h - ewin->h);
|
||||
newWinX = MIN(newWinX, VRoot.w - ewin->w);
|
||||
newWinY = MIN(newWinY, VRoot.h - ewin->h);
|
||||
newWinX = MAX(newWinX, 0);
|
||||
newWinY = MAX(newWinY, 0);
|
||||
|
||||
|
@ -580,7 +580,7 @@ AddToFamily(Window win)
|
|||
/* the window there */
|
||||
if (ewin->desktop >= 0)
|
||||
GotoDesktop(ewin->desktop);
|
||||
XQueryPointer(disp, root.win, &root_return, &junk, &rx, &ry, &wx, &wy,
|
||||
XQueryPointer(disp, VRoot.win, &root_return, &junk, &rx, &ry, &wx, &wy,
|
||||
&mask);
|
||||
Mode.x = rx;
|
||||
Mode.y = ry;
|
||||
|
@ -594,7 +594,7 @@ AddToFamily(Window win)
|
|||
MoveEwin(ewin, x, y);
|
||||
RaiseEwin(ewin);
|
||||
ShowEwin(ewin);
|
||||
GrabThePointer(root.win);
|
||||
GrabThePointer(VRoot.win);
|
||||
Mode.have_place_grab = 1;
|
||||
Mode.place = 1;
|
||||
ICCCM_Configure(ewin);
|
||||
|
@ -604,27 +604,27 @@ AddToFamily(Window win)
|
|||
}
|
||||
else if ((doslide) && (!Mode.doingslide))
|
||||
{
|
||||
MoveEwin(ewin, root.w, root.h);
|
||||
MoveEwin(ewin, VRoot.w, VRoot.h);
|
||||
k = rand() % 4;
|
||||
if (k == 0)
|
||||
{
|
||||
fx = (rand() % (root.w)) - ewin->w;
|
||||
fx = (rand() % (VRoot.w)) - ewin->w;
|
||||
fy = -ewin->h;
|
||||
}
|
||||
else if (k == 1)
|
||||
{
|
||||
fx = (rand() % (root.w));
|
||||
fy = root.h;
|
||||
fx = (rand() % (VRoot.w));
|
||||
fy = VRoot.h;
|
||||
}
|
||||
else if (k == 2)
|
||||
{
|
||||
fx = -ewin->w;
|
||||
fy = (rand() % (root.h));
|
||||
fy = (rand() % (VRoot.h));
|
||||
}
|
||||
else
|
||||
{
|
||||
fx = root.w;
|
||||
fy = (rand() % (root.h)) - ewin->h;
|
||||
fx = VRoot.w;
|
||||
fy = (rand() % (VRoot.h)) - ewin->h;
|
||||
}
|
||||
EwinBorderDraw(ewin, 1, 1);
|
||||
MoveEwinToDesktop(ewin, ewin->desktop);
|
||||
|
@ -1261,7 +1261,7 @@ EwinCreate(Window win)
|
|||
ewin->client.mwm_func_close = 1;
|
||||
ewin->desktop = desks.current;
|
||||
ewin->layer = 4;
|
||||
ewin->win = ECreateWindow(root.win, -10, -10, 1, 1, 1);
|
||||
ewin->win = ECreateWindow(VRoot.win, -10, -10, 1, 1, 1);
|
||||
ewin->win_container = ECreateWindow(ewin->win, 0, 0, 1, 1, 0);
|
||||
#if 0 /* ENABLE_GNOME - Not actually used */
|
||||
ewin->expanded_width = -1;
|
||||
|
@ -1386,11 +1386,11 @@ EwinWithdraw(EWin * ewin)
|
|||
Eprintf("EwinWithdraw %#lx state=%d\n", ewin->client.win, ewin->state);
|
||||
|
||||
/* Park the client window on the root */
|
||||
XTranslateCoordinates(disp, ewin->client.win, root.win,
|
||||
XTranslateCoordinates(disp, ewin->client.win, VRoot.win,
|
||||
-ewin->border->border.left,
|
||||
-ewin->border->border.top, &ewin->client.x,
|
||||
&ewin->client.y, &win);
|
||||
EReparentWindow(disp, ewin->client.win, root.win, ewin->client.x,
|
||||
EReparentWindow(disp, ewin->client.win, VRoot.win, ewin->client.x,
|
||||
ewin->client.y);
|
||||
|
||||
ICCCM_Withdraw(ewin);
|
||||
|
@ -1722,8 +1722,8 @@ doMoveResizeEwin(EWin * ewin, int x, int y, int w, int h, int flags)
|
|||
if (Mode.mode == MODE_NONE)
|
||||
{
|
||||
/* Don't throw windows offscreen */
|
||||
sw = root.w;
|
||||
sh = root.h;
|
||||
sw = VRoot.w;
|
||||
sh = VRoot.h;
|
||||
if (ewin->sticky)
|
||||
{
|
||||
x0 = y0 = 0;
|
||||
|
@ -3061,9 +3061,9 @@ DetermineEwinArea(EWin * ewin)
|
|||
EDBUG(4, "DetermineEwinArea");
|
||||
|
||||
ax = (ewin->x + (ewin->w / 2) +
|
||||
(desks.desk[ewin->desktop].current_area_x * root.w)) / root.w;
|
||||
(desks.desk[ewin->desktop].current_area_x * VRoot.w)) / VRoot.w;
|
||||
ay = (ewin->y + (ewin->h / 2) +
|
||||
(desks.desk[ewin->desktop].current_area_y * root.h)) / root.h;
|
||||
(desks.desk[ewin->desktop].current_area_y * VRoot.h)) / VRoot.h;
|
||||
|
||||
AreaFix(&ax, &ay);
|
||||
EwinSetArea(ewin, ax, ay);
|
||||
|
@ -3076,8 +3076,8 @@ MoveEwinToArea(EWin * ewin, int ax, int ay)
|
|||
{
|
||||
EDBUG(4, "MoveEwinToArea");
|
||||
AreaFix(&ax, &ay);
|
||||
MoveEwin(ewin, ewin->x + (root.w * (ax - ewin->area_x)),
|
||||
ewin->y + (root.h * (ay - ewin->area_y)));
|
||||
MoveEwin(ewin, ewin->x + (VRoot.w * (ax - ewin->area_x)),
|
||||
ewin->y + (VRoot.h * (ay - ewin->area_y)));
|
||||
EwinSetArea(ewin, ax, ay);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -3148,7 +3148,7 @@ EwinIsOnScreen(EWin * ewin)
|
|||
w = ewin->w;
|
||||
h = ewin->h;
|
||||
|
||||
if (x + w <= 0 || x >= root.w || y + h <= 0 || y >= root.h)
|
||||
if (x + w <= 0 || x >= VRoot.w || y + h <= 0 || y >= VRoot.h)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -191,8 +191,8 @@ ButtonCalc(Button * b)
|
|||
}
|
||||
else
|
||||
{
|
||||
w = ((b->geom.xsizerel * root.w) >> 10) + b->geom.xsizeabs;
|
||||
h = ((b->geom.ysizerel * root.h) >> 10) + b->geom.ysizeabs;
|
||||
w = ((b->geom.xsizerel * VRoot.w) >> 10) + b->geom.xsizeabs;
|
||||
h = ((b->geom.ysizerel * VRoot.h) >> 10) + b->geom.ysizeabs;
|
||||
}
|
||||
if (w > b->geom.width.max)
|
||||
w = b->geom.width.max;
|
||||
|
@ -204,8 +204,8 @@ ButtonCalc(Button * b)
|
|||
h = b->geom.height.min;
|
||||
xo = (w * b->geom.xorigin) >> 10;
|
||||
yo = (h * b->geom.yorigin) >> 10;
|
||||
x = ((b->geom.xrel * root.w) >> 10) + b->geom.xabs - xo;
|
||||
y = ((b->geom.yrel * root.h) >> 10) + b->geom.yabs - yo;
|
||||
x = ((b->geom.xrel * VRoot.w) >> 10) + b->geom.xabs - xo;
|
||||
y = ((b->geom.yrel * VRoot.h) >> 10) + b->geom.yabs - yo;
|
||||
b->x = x;
|
||||
b->y = y;
|
||||
b->w = w;
|
||||
|
@ -328,21 +328,21 @@ ButtonMoveToCoord(Button * b, int x, int y)
|
|||
if (b->flags & FLAG_FIXED)
|
||||
EDBUG_RETURN_;
|
||||
|
||||
if ((x + (b->w >> 1)) < (root.w / 3))
|
||||
if ((x + (b->w >> 1)) < (VRoot.w / 3))
|
||||
relx = 0;
|
||||
else if ((x + (b->w >> 1)) > ((root.w * 2) / 3))
|
||||
else if ((x + (b->w >> 1)) > ((VRoot.w * 2) / 3))
|
||||
relx = 1024;
|
||||
else
|
||||
relx = 512;
|
||||
rx = (relx * root.w) >> 10;
|
||||
rx = (relx * VRoot.w) >> 10;
|
||||
absx = x - rx;
|
||||
if ((y + (b->h >> 1)) < (root.h / 3))
|
||||
if ((y + (b->h >> 1)) < (VRoot.h / 3))
|
||||
rely = 0;
|
||||
else if ((y + (b->h >> 1)) > ((root.h * 2) / 3))
|
||||
else if ((y + (b->h >> 1)) > ((VRoot.h * 2) / 3))
|
||||
rely = 1024;
|
||||
else
|
||||
rely = 512;
|
||||
ry = (rely * root.h) >> 10;
|
||||
ry = (rely * VRoot.h) >> 10;
|
||||
absy = y - ry;
|
||||
if (!(b->flags & FLAG_FIXED_HORIZ))
|
||||
{
|
||||
|
|
|
@ -40,25 +40,25 @@ CloneEwin(EWin * ewin)
|
|||
if (!gc)
|
||||
{
|
||||
gcv.subwindow_mode = IncludeInferiors;
|
||||
gc = XCreateGC(disp, root.win, GCSubwindowMode, &gcv);
|
||||
gc = XCreateGC(disp, VRoot.win, GCSubwindowMode, &gcv);
|
||||
}
|
||||
c = Emalloc(sizeof(Clone));
|
||||
c->name = NULL;
|
||||
c->ewin = ewin;
|
||||
attr.backing_store = NotUseful;
|
||||
attr.override_redirect = True;
|
||||
attr.colormap = root.cmap;
|
||||
attr.colormap = VRoot.cmap;
|
||||
attr.border_pixel = 0;
|
||||
attr.background_pixel = 0;
|
||||
attr.background_pixmap = None;
|
||||
attr.save_under = False;
|
||||
c->win =
|
||||
XCreateWindow(disp, ewin->parent, ewin->x, ewin->y, ewin->w, ewin->h, 0,
|
||||
root.depth, InputOutput, root.vis,
|
||||
VRoot.depth, InputOutput, VRoot.vis,
|
||||
CWOverrideRedirect | CWSaveUnder | CWBackingStore |
|
||||
CWColormap | CWBackPixmap | CWBackPixel | CWBorderPixel,
|
||||
&attr);
|
||||
pmap = XCreatePixmap(disp, c->win, ewin->w, ewin->h, root.depth);
|
||||
pmap = XCreatePixmap(disp, c->win, ewin->w, ewin->h, VRoot.depth);
|
||||
XSetWindowBackgroundPixmap(disp, c->win, pmap);
|
||||
XCopyArea(disp, ewin->win, pmap, gc, 0, 0, ewin->w, ewin->h, 0, 0);
|
||||
XFreePixmap(disp, pmap);
|
||||
|
|
|
@ -34,13 +34,13 @@ CommsSetup(void)
|
|||
|
||||
EDBUG(5, "CommsSetup");
|
||||
|
||||
comms_win = XCreateSimpleWindow(disp, root.win, -100, -100, 5, 5, 0, 0, 0);
|
||||
comms_win = XCreateSimpleWindow(disp, VRoot.win, -100, -100, 5, 5, 0, 0, 0);
|
||||
XSelectInput(disp, comms_win, StructureNotifyMask | SubstructureNotifyMask);
|
||||
Esnprintf(s, sizeof(s), "WINID %8x", (int)comms_win);
|
||||
XA_ENLIGHTENMENT_COMMS = XInternAtom(disp, "ENLIGHTENMENT_COMMS", False);
|
||||
XChangeProperty(disp, comms_win, XA_ENLIGHTENMENT_COMMS, XA_STRING, 8,
|
||||
PropModeReplace, (unsigned char *)s, strlen(s));
|
||||
XChangeProperty(disp, root.win, XA_ENLIGHTENMENT_COMMS, XA_STRING, 8,
|
||||
XChangeProperty(disp, VRoot.win, XA_ENLIGHTENMENT_COMMS, XA_STRING, 8,
|
||||
PropModeReplace, (unsigned char *)s, strlen(s));
|
||||
|
||||
XA_ENL_MSG = XInternAtom(disp, "ENL_MSG", False);
|
||||
|
@ -64,7 +64,7 @@ CommsFindCommsWindow(void)
|
|||
if (a != None)
|
||||
{
|
||||
s = NULL;
|
||||
XGetWindowProperty(disp, root.win, a, 0, 14, False, AnyPropertyType,
|
||||
XGetWindowProperty(disp, VRoot.win, a, 0, 14, False, AnyPropertyType,
|
||||
&ar, &format, &num, &after, &s);
|
||||
if (s)
|
||||
{
|
||||
|
|
|
@ -3344,8 +3344,8 @@ OpenConfigFileForReading(const char *path, char preprocess)
|
|||
"%s %s/cached/cfg/%s.preparsed",
|
||||
epp_path, EDirRoot(), themepath, EDirRoot(),
|
||||
ENLIGHTENMENT_VERSION, EDirRoot(), EDirBin(),
|
||||
themepath, EDirUser(), EDirUserCache(), root.w, root.h,
|
||||
root.w, root.h, root.depth, def_user, def_home, def_shell,
|
||||
themepath, EDirUser(), EDirUserCache(), VRoot.w, VRoot.h,
|
||||
VRoot.w, VRoot.h, VRoot.depth, def_user, def_home, def_shell,
|
||||
path, EDirUserCache(), s);
|
||||
system(execline);
|
||||
Esnprintf(execline, sizeof(execline), "%s/cached/cfg/%s.preparsed",
|
||||
|
|
|
@ -43,7 +43,7 @@ SetCoords(EWin * ewin)
|
|||
tc = FindItem("COORDS", 0, LIST_FINDBY_NAME, LIST_TYPE_TCLASS);
|
||||
ic = FindItem("COORDS", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS);
|
||||
if (!c_win)
|
||||
c_win = ECreateWindow(root.win, 0, 0, 1, 1, 2);
|
||||
c_win = ECreateWindow(VRoot.win, 0, 0, 1, 1, 2);
|
||||
if ((!ic) || (!tc))
|
||||
return;
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ CreateECursor(char *name, char *image, int native_id, XColor * fg, XColor * bg)
|
|||
mask = 0;
|
||||
xh = 0;
|
||||
yh = 0;
|
||||
XReadBitmapFile(disp, root.win, msk, &w, &h, &mask, &xh, &yh);
|
||||
XReadBitmapFile(disp, root.win, img, &w, &h, &pmap, &xh, &yh);
|
||||
XQueryBestCursor(disp, root.win, w, h, &ww, &hh);
|
||||
XReadBitmapFile(disp, VRoot.win, msk, &w, &h, &mask, &xh, &yh);
|
||||
XReadBitmapFile(disp, VRoot.win, img, &w, &h, &pmap, &xh, &yh);
|
||||
XQueryBestCursor(disp, VRoot.win, w, h, &ww, &hh);
|
||||
if ((w > ww) || (h > hh))
|
||||
{
|
||||
EFreePixmap(disp, pmap);
|
||||
|
|
|
@ -282,12 +282,13 @@ InitDesktopBgs(void)
|
|||
d->viewable = 0;
|
||||
if (i == 0)
|
||||
{
|
||||
d->win = root.win;
|
||||
d->win = VRoot.win;
|
||||
}
|
||||
else
|
||||
{
|
||||
d->win =
|
||||
ECreateWindow(root.win, -root.w, -root.h, root.w, root.h, 0);
|
||||
ECreateWindow(VRoot.win, -VRoot.w, -VRoot.h, VRoot.w, VRoot.h,
|
||||
0);
|
||||
XSelectInput(disp, d->win, EDESK_EVENT_MASK);
|
||||
}
|
||||
at = XInternAtom(disp, "ENLIGHTENMENT_DESKTOP", False);
|
||||
|
@ -470,7 +471,7 @@ InitDesktopControls(void)
|
|||
case 0:
|
||||
w[0] = w[1] = w[2] = h[0] = h[1] = Conf.desks.dragbar_width;
|
||||
if (Conf.desks.dragbar_length == 0)
|
||||
h[2] = root.h - (Conf.desks.dragbar_width * 2);
|
||||
h[2] = VRoot.h - (Conf.desks.dragbar_width * 2);
|
||||
else
|
||||
h[2] = Conf.desks.dragbar_length;
|
||||
x[0] = x[1] = x[2] = 0;
|
||||
|
@ -481,10 +482,10 @@ InitDesktopControls(void)
|
|||
case 1:
|
||||
w[0] = w[1] = w[2] = h[0] = h[1] = Conf.desks.dragbar_width;
|
||||
if (Conf.desks.dragbar_length == 0)
|
||||
h[2] = root.h - (Conf.desks.dragbar_width * 2);
|
||||
h[2] = VRoot.h - (Conf.desks.dragbar_width * 2);
|
||||
else
|
||||
h[2] = Conf.desks.dragbar_length;
|
||||
x[0] = x[1] = x[2] = root.w - Conf.desks.dragbar_width;
|
||||
x[0] = x[1] = x[2] = VRoot.w - Conf.desks.dragbar_width;
|
||||
y[m] = 0;
|
||||
y[n] = y[m] + h[m];
|
||||
y[o] = y[n] + h[n];
|
||||
|
@ -492,7 +493,7 @@ InitDesktopControls(void)
|
|||
case 2:
|
||||
h[0] = h[1] = h[2] = w[0] = w[1] = Conf.desks.dragbar_width;
|
||||
if (Conf.desks.dragbar_length == 0)
|
||||
w[2] = root.w - (Conf.desks.dragbar_width * 2);
|
||||
w[2] = VRoot.w - (Conf.desks.dragbar_width * 2);
|
||||
else
|
||||
w[2] = Conf.desks.dragbar_length;
|
||||
y[0] = y[1] = y[2] = 0;
|
||||
|
@ -503,10 +504,10 @@ InitDesktopControls(void)
|
|||
case 3:
|
||||
h[0] = h[1] = h[2] = w[0] = w[1] = Conf.desks.dragbar_width;
|
||||
if (Conf.desks.dragbar_length == 0)
|
||||
w[2] = root.w - (Conf.desks.dragbar_width * 2);
|
||||
w[2] = VRoot.w - (Conf.desks.dragbar_width * 2);
|
||||
else
|
||||
w[2] = Conf.desks.dragbar_length;
|
||||
y[0] = y[1] = y[2] = root.h - Conf.desks.dragbar_width;
|
||||
y[0] = y[1] = y[2] = VRoot.h - Conf.desks.dragbar_width;
|
||||
x[m] = 0;
|
||||
x[n] = x[m] + w[m];
|
||||
x[o] = x[n] + w[n];
|
||||
|
@ -544,7 +545,7 @@ InitDesktopControls(void)
|
|||
b = ButtonCreate("_DESKTOP_DESKRAY_DRAG_CONTROL", ic4, ac,
|
||||
NULL, NULL, 1, FLAG_FIXED_VERT, 1, 99999, 1,
|
||||
99999, 0, 0,
|
||||
desks.desk[i].x + root.w -
|
||||
desks.desk[i].x + VRoot.w -
|
||||
Conf.desks.dragbar_width, 0, desks.desk[i].y,
|
||||
0, 0, 0, 0, 0, 1, 0, 1);
|
||||
}
|
||||
|
@ -560,7 +561,7 @@ InitDesktopControls(void)
|
|||
b = ButtonCreate("_DESKTOP_DESKRAY_DRAG_CONTROL", ic4, ac,
|
||||
NULL, NULL, 1, FLAG_FIXED_HORIZ, 1, 99999, 1,
|
||||
99999, 0, 0, desks.desk[i].x, 0,
|
||||
desks.desk[i].y + root.h -
|
||||
desks.desk[i].y + VRoot.h -
|
||||
Conf.desks.dragbar_width, 0, 0, 0, 0, 0, 1,
|
||||
0, 1);
|
||||
}
|
||||
|
@ -628,10 +629,10 @@ ConformEwinToDesktop(EWin * ewin)
|
|||
{
|
||||
xo = desks.desk[ewin->desktop].x;
|
||||
yo = desks.desk[ewin->desktop].y;
|
||||
if ((ewin->parent != root.win) && (ewin->floating == 2))
|
||||
if ((ewin->parent != VRoot.win) && (ewin->floating == 2))
|
||||
{
|
||||
ewin->parent = root.win;
|
||||
EReparentWindow(disp, ewin->win, root.win, ewin->x, ewin->y);
|
||||
ewin->parent = VRoot.win;
|
||||
EReparentWindow(disp, ewin->win, VRoot.win, ewin->x, ewin->y);
|
||||
ewin->desktop = 0;
|
||||
}
|
||||
XRaiseWindow(disp, ewin->win);
|
||||
|
@ -665,9 +666,9 @@ DesktopAt(int x, int y)
|
|||
for (i = 0; i < ENLIGHTENMENT_CONF_NUM_DESKTOPS; i++)
|
||||
{
|
||||
if ((x >= desks.desk[desks.order[i]].x)
|
||||
&& (x < (desks.desk[desks.order[i]].x + root.w))
|
||||
&& (x < (desks.desk[desks.order[i]].x + VRoot.w))
|
||||
&& (y >= desks.desk[desks.order[i]].y)
|
||||
&& (y < (desks.desk[desks.order[i]].y + root.h)))
|
||||
&& (y < (desks.desk[desks.order[i]].y + VRoot.h)))
|
||||
EDBUG_RETURN(desks.order[i]);
|
||||
}
|
||||
|
||||
|
@ -691,7 +692,7 @@ MoveStickyWindowsToCurrentDesk(void)
|
|||
ewin->desktop = desks.current;
|
||||
ewin->parent = desks.desk[ewin->desktop].win;
|
||||
EReparentWindow(disp, ewin->win,
|
||||
desks.desk[ewin->desktop].win, root.w, root.h);
|
||||
desks.desk[ewin->desktop].win, VRoot.w, VRoot.h);
|
||||
EMoveWindow(disp, ewin->win, ewin->x, ewin->y);
|
||||
HintsSetWindowArea(ewin);
|
||||
HintsSetWindowDesktop(ewin);
|
||||
|
@ -751,27 +752,27 @@ GotoDesktop(int desk)
|
|||
switch (Conf.desks.dragdir)
|
||||
{
|
||||
case 0:
|
||||
MoveDesktop(desk, root.w, 0);
|
||||
MoveDesktop(desk, VRoot.w, 0);
|
||||
RaiseDesktop(desk);
|
||||
SlideWindowTo(desks.desk[desk].win, root.w, 0, 0, 0,
|
||||
SlideWindowTo(desks.desk[desk].win, VRoot.w, 0, 0, 0,
|
||||
Conf.desks.slidespeed);
|
||||
break;
|
||||
case 1:
|
||||
MoveDesktop(desk, -root.w, 0);
|
||||
MoveDesktop(desk, -VRoot.w, 0);
|
||||
RaiseDesktop(desk);
|
||||
SlideWindowTo(desks.desk[desk].win, -root.w, 0, 0, 0,
|
||||
SlideWindowTo(desks.desk[desk].win, -VRoot.w, 0, 0, 0,
|
||||
Conf.desks.slidespeed);
|
||||
break;
|
||||
case 2:
|
||||
MoveDesktop(desk, 0, root.h);
|
||||
MoveDesktop(desk, 0, VRoot.h);
|
||||
RaiseDesktop(desk);
|
||||
SlideWindowTo(desks.desk[desk].win, 0, root.h, 0, 0,
|
||||
SlideWindowTo(desks.desk[desk].win, 0, VRoot.h, 0, 0,
|
||||
Conf.desks.slidespeed);
|
||||
break;
|
||||
case 3:
|
||||
MoveDesktop(desk, 0, -root.h);
|
||||
MoveDesktop(desk, 0, -VRoot.h);
|
||||
RaiseDesktop(desk);
|
||||
SlideWindowTo(desks.desk[desk].win, 0, -root.h, 0, 0,
|
||||
SlideWindowTo(desks.desk[desk].win, 0, -VRoot.h, 0, 0,
|
||||
Conf.desks.slidespeed);
|
||||
break;
|
||||
default:
|
||||
|
@ -997,7 +998,7 @@ HideDesktop(int desk)
|
|||
if (desks.desk[desk].viewable)
|
||||
BackgroundTouch(desks.desk[desk].bg);
|
||||
desks.desk[desk].viewable = 0;
|
||||
EMoveWindow(disp, desks.desk[desk].win, root.w, 0);
|
||||
EMoveWindow(disp, desks.desk[desk].win, VRoot.w, 0);
|
||||
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
|
|
@ -310,7 +310,7 @@ DialogCreate(const char *name)
|
|||
d->num_buttons = 0;
|
||||
d->win = 0;
|
||||
d->button = NULL;
|
||||
d->win = ECreateWindow(root.win, -20, -20, 2, 2, 0);
|
||||
d->win = ECreateWindow(VRoot.win, -20, -20, 2, 2, 0);
|
||||
|
||||
d->item = NULL;
|
||||
d->exit_func = NULL;
|
||||
|
|
167
src/draw.c
167
src/draw.c
|
@ -299,11 +299,11 @@ ECreatePixImg(Window win, int w, int h)
|
|||
int bpp;
|
||||
PixImg *pi;
|
||||
|
||||
if (root.depth <= 8)
|
||||
if (VRoot.depth <= 8)
|
||||
bpp = 1;
|
||||
else if (root.depth <= 16)
|
||||
else if (VRoot.depth <= 16)
|
||||
bpp = 2;
|
||||
else if (root.depth <= 24)
|
||||
else if (VRoot.depth <= 24)
|
||||
bpp = 3;
|
||||
else
|
||||
bpp = 4;
|
||||
|
@ -322,7 +322,7 @@ ECreatePixImg(Window win, int w, int h)
|
|||
pi->shminfo = Emalloc(sizeof(XShmSegmentInfo));
|
||||
if (pi->shminfo)
|
||||
{
|
||||
pi->xim = XShmCreateImage(disp, root.vis, root.depth, ZPixmap, NULL,
|
||||
pi->xim = XShmCreateImage(disp, VRoot.vis, VRoot.depth, ZPixmap, NULL,
|
||||
pi->shminfo, w, h);
|
||||
if (pi->xim)
|
||||
{
|
||||
|
@ -339,7 +339,7 @@ ECreatePixImg(Window win, int w, int h)
|
|||
XShmAttach(disp, pi->shminfo);
|
||||
pi->pmap =
|
||||
XShmCreatePixmap(disp, win, pi->shminfo->shmaddr,
|
||||
pi->shminfo, w, h, root.depth);
|
||||
pi->shminfo, w, h, VRoot.depth);
|
||||
if (pi->pmap)
|
||||
{
|
||||
gcv.subwindow_mode = IncludeInferiors;
|
||||
|
@ -426,13 +426,13 @@ EBlendRemoveShape(EWin * ewin, Pixmap pmap, int x, int y)
|
|||
}
|
||||
}
|
||||
if (!mask)
|
||||
mask = ECreatePixmap(disp, root.win, w, h, 1);
|
||||
mask = ECreatePixmap(disp, VRoot.win, w, h, 1);
|
||||
if (!gcm)
|
||||
gcm = XCreateGC(disp, mask, 0, &gcv);
|
||||
if (!gc)
|
||||
{
|
||||
gcv.subwindow_mode = IncludeInferiors;
|
||||
gc = XCreateGC(disp, root.win, GCSubwindowMode, &gcv);
|
||||
gc = XCreateGC(disp, VRoot.win, GCSubwindowMode, &gcv);
|
||||
XSetForeground(disp, gcm, 1);
|
||||
XFillRectangle(disp, mask, gcm, 0, 0, w, h);
|
||||
XSetForeground(disp, gcm, 0);
|
||||
|
@ -442,7 +442,7 @@ EBlendRemoveShape(EWin * ewin, Pixmap pmap, int x, int y)
|
|||
XSetClipMask(disp, gc, mask);
|
||||
}
|
||||
XSetClipOrigin(disp, gc, x, y);
|
||||
XCopyArea(disp, pmap, root.win, gc, x, y, w, h, x, y);
|
||||
XCopyArea(disp, pmap, VRoot.win, gc, x, y, w, h, x, y);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -469,7 +469,7 @@ EBlendPixImg(EWin * ewin, PixImg * s1, PixImg * s2, PixImg * dst, int x, int y,
|
|||
if (!gc)
|
||||
{
|
||||
gcv.subwindow_mode = IncludeInferiors;
|
||||
gc = XCreateGC(disp, root.win, GCSubwindowMode, &gcv);
|
||||
gc = XCreateGC(disp, VRoot.win, GCSubwindowMode, &gcv);
|
||||
}
|
||||
if (!rl)
|
||||
{
|
||||
|
@ -483,18 +483,18 @@ EBlendPixImg(EWin * ewin, PixImg * s1, PixImg * s2, PixImg * dst, int x, int y,
|
|||
XSetClipOrigin(disp, gc, x, y);
|
||||
ox = 0;
|
||||
oy = 0;
|
||||
if ((x >= root.w) || (y >= root.h))
|
||||
if ((x >= VRoot.w) || (y >= VRoot.h))
|
||||
return;
|
||||
if (x + w > root.w)
|
||||
w -= ((x + w) - root.w);
|
||||
if (x + w > VRoot.w)
|
||||
w -= ((x + w) - VRoot.w);
|
||||
if (x < 0)
|
||||
{
|
||||
ox = -x;
|
||||
w -= ox;
|
||||
x = 0;
|
||||
}
|
||||
if (y + h > root.h)
|
||||
h -= ((y + h) - root.h);
|
||||
if (y + h > VRoot.h)
|
||||
h -= ((y + h) - VRoot.h);
|
||||
if (y < 0)
|
||||
{
|
||||
oy = -y;
|
||||
|
@ -854,11 +854,11 @@ EBlendPixImg(EWin * ewin, PixImg * s1, PixImg * s2, PixImg * dst, int x, int y,
|
|||
break;
|
||||
}
|
||||
/* workaround since XCopyArea doesnt always work with shared pixmaps */
|
||||
XShmPutImage(disp, root.win, gc, dst->xim, ox, oy, x, y, w, h, False);
|
||||
/* XCopyArea(disp, dst->pmap, root.win, gc, ox, oy, w, h, x, y); */
|
||||
XShmPutImage(disp, VRoot.win, gc, dst->xim, ox, oy, x, y, w, h, False);
|
||||
/* XCopyArea(disp, dst->pmap, VRoot.win, gc, ox, oy, w, h, x, y); */
|
||||
}
|
||||
/* I dont believe it - you cannot do this to a shared pixmaps to the screen */
|
||||
/* XCopyArea(disp, dst->pmap, root.win, dst->gc, x, y, w, h, x, y); */
|
||||
/* XCopyArea(disp, dst->pmap, VRoot.win, dst->gc, x, y, w, h, x, y); */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -907,7 +907,7 @@ ScaleLine(Pixmap dest, Window src, int dx, int dy, int sw, int pw, int sy,
|
|||
px_grab = XGetImage(disp, src, 0, sy, sw, 1, 0xffffffff, ZPixmap);
|
||||
if (px_grab)
|
||||
{
|
||||
px_buf = XCreateImage(disp, root.vis, root.depth, ZPixmap, 0,
|
||||
px_buf = XCreateImage(disp, VRoot.vis, VRoot.depth, ZPixmap, 0,
|
||||
NULL, pw, 1, 32, 0);
|
||||
if (px_buf)
|
||||
{
|
||||
|
@ -1053,13 +1053,13 @@ ScaleRect(Pixmap dest, Window src, int sx, int sy, int dx, int dy, int sw,
|
|||
PixImg *p_grab = NULL, *p_buf = NULL;
|
||||
XImage *px_grab = NULL, *px_buf = NULL;
|
||||
|
||||
if (sw > root.w * 2)
|
||||
if (sw > VRoot.w * 2)
|
||||
return;
|
||||
if (sh > root.h * 2)
|
||||
if (sh > VRoot.h * 2)
|
||||
return;
|
||||
if (dw > root.w * 2)
|
||||
if (dw > VRoot.w * 2)
|
||||
return;
|
||||
if (dh > root.h * 2)
|
||||
if (dh > VRoot.h * 2)
|
||||
return;
|
||||
|
||||
if (!gc)
|
||||
|
@ -1112,7 +1112,7 @@ ScaleRect(Pixmap dest, Window src, int sx, int sy, int dx, int dy, int sw,
|
|||
{
|
||||
Pixmap pmap;
|
||||
|
||||
pmap = ECreatePixmap(disp, src, sw, dh * 2, root.depth);
|
||||
pmap = ECreatePixmap(disp, src, sw, dh * 2, VRoot.depth);
|
||||
for (y = 0; y < (dh * 2); y++)
|
||||
{
|
||||
y2 = (sh * y) / (dh * 2);
|
||||
|
@ -1129,7 +1129,7 @@ ScaleRect(Pixmap dest, Window src, int sx, int sy, int dx, int dy, int sw,
|
|||
{
|
||||
Pixmap pmap;
|
||||
|
||||
pmap = ECreatePixmap(disp, src, sw, dh, root.depth);
|
||||
pmap = ECreatePixmap(disp, src, sw, dh, VRoot.depth);
|
||||
for (y = 0; y < dh; y++)
|
||||
{
|
||||
y2 = (sh * y) / dh;
|
||||
|
@ -1143,7 +1143,7 @@ ScaleRect(Pixmap dest, Window src, int sx, int sy, int dx, int dy, int sw,
|
|||
}
|
||||
|
||||
px_buf =
|
||||
XCreateImage(disp, root.vis, root.depth, ZPixmap, 0, NULL, dw, dh,
|
||||
XCreateImage(disp, VRoot.vis, VRoot.depth, ZPixmap, 0, NULL, dw, dh,
|
||||
32, 0);
|
||||
if (!px_buf)
|
||||
{
|
||||
|
@ -1177,7 +1177,7 @@ ScaleRect(Pixmap dest, Window src, int sx, int sy, int dx, int dy, int sw,
|
|||
}
|
||||
|
||||
difx = (sw / dw) / 2;
|
||||
switch (root.depth)
|
||||
switch (VRoot.depth)
|
||||
{
|
||||
case 24:
|
||||
case 32:
|
||||
|
@ -1330,11 +1330,11 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
md = 0;
|
||||
if (md == 5)
|
||||
{
|
||||
if (root.depth <= 8)
|
||||
if (VRoot.depth <= 8)
|
||||
bpp = 1;
|
||||
else if (root.depth <= 16)
|
||||
else if (VRoot.depth <= 16)
|
||||
bpp = 2;
|
||||
else if (root.depth <= 24)
|
||||
else if (VRoot.depth <= 24)
|
||||
bpp = 3;
|
||||
else
|
||||
bpp = 4;
|
||||
|
@ -1363,13 +1363,13 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
case 4:
|
||||
case 5:
|
||||
if (!b1)
|
||||
b1 = XCreateBitmapFromData(disp, root.win, flipped_gray_bits,
|
||||
b1 = XCreateBitmapFromData(disp, VRoot.win, flipped_gray_bits,
|
||||
flipped_gray_width, flipped_gray_height);
|
||||
if (!b2)
|
||||
b2 = XCreateBitmapFromData(disp, root.win, gray_bits, gray_width,
|
||||
b2 = XCreateBitmapFromData(disp, VRoot.win, gray_bits, gray_width,
|
||||
gray_height);
|
||||
if (!b3)
|
||||
b3 = XCreateBitmapFromData(disp, root.win, gray3_bits, gray3_width,
|
||||
b3 = XCreateBitmapFromData(disp, VRoot.win, gray3_bits, gray3_width,
|
||||
gray3_height);
|
||||
x1 = ewin->x + desks.desk[ewin->desktop].x;
|
||||
y1 = ewin->y + desks.desk[ewin->desktop].y;
|
||||
|
@ -1398,40 +1398,40 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
if (!gc)
|
||||
{
|
||||
gcv.function = GXxor;
|
||||
gcv.foreground = WhitePixel(disp, root.scr);
|
||||
gcv.foreground = WhitePixel(disp, VRoot.scr);
|
||||
if (gcv.foreground == 0)
|
||||
gcv.foreground = BlackPixel(disp, root.scr);
|
||||
gcv.foreground = BlackPixel(disp, VRoot.scr);
|
||||
gcv.subwindow_mode = IncludeInferiors;
|
||||
gc = XCreateGC(disp, root.win,
|
||||
gc = XCreateGC(disp, VRoot.win,
|
||||
GCFunction | GCForeground | GCSubwindowMode, &gcv);
|
||||
}
|
||||
#define DRAW_H_ARROW(x1, x2, y1) \
|
||||
if (((x2) - (x1)) >= 12) \
|
||||
{ \
|
||||
XDrawLine(disp, root.win, gc, x1, y1, (x1) + 6, (y1) - 3); \
|
||||
XDrawLine(disp, root.win, gc, x1, y1, (x1) + 6, (y1) + 3); \
|
||||
XDrawLine(disp, root.win, gc, x2, y1, (x2) - 6, (y1) - 3); \
|
||||
XDrawLine(disp, root.win, gc, x2, y1, (x2) - 6, (y1) + 3); \
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, (x1) + 6, (y1) - 3); \
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, (x1) + 6, (y1) + 3); \
|
||||
XDrawLine(disp, VRoot.win, gc, x2, y1, (x2) - 6, (y1) - 3); \
|
||||
XDrawLine(disp, VRoot.win, gc, x2, y1, (x2) - 6, (y1) + 3); \
|
||||
} \
|
||||
if ((x2) >= (x1)) \
|
||||
{ \
|
||||
XDrawLine(disp, root.win, gc, x1, y1, x2, y1); \
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, x2, y1); \
|
||||
Esnprintf(str, sizeof(str), "%i", (x2) - (x1) + 1); \
|
||||
XDrawString(disp, root.win, gc, ((x1) + (x2)) / 2, (y1) - 10, str, strlen(str)); \
|
||||
XDrawString(disp, VRoot.win, gc, ((x1) + (x2)) / 2, (y1) - 10, str, strlen(str)); \
|
||||
}
|
||||
#define DRAW_V_ARROW(y1, y2, x1) \
|
||||
if (((y2) - (y1)) >= 12) \
|
||||
{ \
|
||||
XDrawLine(disp, root.win, gc, x1, y1, (x1) + 3, (y1) + 6); \
|
||||
XDrawLine(disp, root.win, gc, x1, y1, (x1) - 3, (y1) + 6); \
|
||||
XDrawLine(disp, root.win, gc, x1, y2, (x1) + 3, (y2) - 6); \
|
||||
XDrawLine(disp, root.win, gc, x1, y2, (x1) - 3, (y2) - 6); \
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, (x1) + 3, (y1) + 6); \
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, (x1) - 3, (y1) + 6); \
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y2, (x1) + 3, (y2) - 6); \
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y2, (x1) - 3, (y2) - 6); \
|
||||
} \
|
||||
if ((y2) >= (y1)) \
|
||||
{ \
|
||||
XDrawLine(disp, root.win, gc, x1, y1, x1, y2); \
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, x1, y2); \
|
||||
Esnprintf(str, sizeof(str), "%i", (y2) - (y1) + 1); \
|
||||
XDrawString(disp, root.win, gc, x1 + 10, ((y1) + (y2)) / 2, str, strlen(str)); \
|
||||
XDrawString(disp, VRoot.win, gc, x1 + 10, ((y1) + (y2)) / 2, str, strlen(str)); \
|
||||
}
|
||||
#define DO_DRAW_MODE_1(aa, bb, cc, dd) \
|
||||
if (!font) \
|
||||
|
@ -1446,7 +1446,7 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
aa - 1, \
|
||||
bb + ewin->border->border.top + (dd / 2)); \
|
||||
DRAW_H_ARROW(aa + cc + ewin->border->border.left + ewin->border->border.right, \
|
||||
root.w - 1, \
|
||||
VRoot.w - 1, \
|
||||
bb + ewin->border->border.top + (dd / 2)); \
|
||||
DRAW_V_ARROW(bb + ewin->border->border.top, \
|
||||
bb + ewin->border->border.top + dd - 1, \
|
||||
|
@ -1455,32 +1455,32 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
bb - 1, \
|
||||
aa + ewin->border->border.left + (cc / 2)); \
|
||||
DRAW_V_ARROW(bb + dd + ewin->border->border.top + ewin->border->border.bottom, \
|
||||
root.h - 1, \
|
||||
VRoot.h - 1, \
|
||||
aa + ewin->border->border.left + (cc / 2)); \
|
||||
XDrawLine(disp, root.win, gc, aa, 0, aa, root.h); \
|
||||
XDrawLine(disp, root.win, gc, \
|
||||
XDrawLine(disp, VRoot.win, gc, aa, 0, aa, VRoot.h); \
|
||||
XDrawLine(disp, VRoot.win, gc, \
|
||||
aa + cc + ewin->border->border.left + \
|
||||
ewin->border->border.right - 1, 0, \
|
||||
aa + cc + ewin->border->border.left + \
|
||||
ewin->border->border.right - 1, root.h); \
|
||||
XDrawLine(disp, root.win, gc, 0, bb, root.w, bb); \
|
||||
XDrawLine(disp, root.win, gc, 0, \
|
||||
ewin->border->border.right - 1, VRoot.h); \
|
||||
XDrawLine(disp, VRoot.win, gc, 0, bb, VRoot.w, bb); \
|
||||
XDrawLine(disp, VRoot.win, gc, 0, \
|
||||
bb + dd + ewin->border->border.top + \
|
||||
ewin->border->border.bottom - 1, root.w, \
|
||||
ewin->border->border.bottom - 1, VRoot.w, \
|
||||
bb + dd + ewin->border->border.top + \
|
||||
ewin->border->border.bottom - 1); \
|
||||
XDrawRectangle(disp, root.win, gc, aa + ewin->border->border.left + 1, \
|
||||
XDrawRectangle(disp, VRoot.win, gc, aa + ewin->border->border.left + 1, \
|
||||
bb + ewin->border->border.top + 1, cc - 3, dd - 3);
|
||||
|
||||
#define DO_DRAW_MODE_2(aa, bb, cc, dd) \
|
||||
if (cc < 3) cc = 3; \
|
||||
if (dd < 3) dd = 3; \
|
||||
XDrawRectangle(disp, root.win, gc, aa, bb, \
|
||||
XDrawRectangle(disp, VRoot.win, gc, aa, bb, \
|
||||
cc + ewin->border->border.left + \
|
||||
ewin->border->border.right - 1, \
|
||||
dd + ewin->border->border.top + \
|
||||
ewin->border->border.bottom - 1); \
|
||||
XDrawRectangle(disp, root.win, gc, aa + ewin->border->border.left + 1, \
|
||||
XDrawRectangle(disp, VRoot.win, gc, aa + ewin->border->border.left + 1, \
|
||||
bb + ewin->border->border.top + 1, cc - 3, dd - 3);
|
||||
|
||||
#define DO_DRAW_MODE_3(aa, bb, cc, dd) \
|
||||
|
@ -1488,35 +1488,35 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
XSetStipple(disp, gc, b2); \
|
||||
if ((cc + ewin->border->border.left + ewin->border->border.right > 0) && \
|
||||
(ewin->border->border.top > 0)) \
|
||||
XFillRectangle(disp, root.win, gc, aa, bb, \
|
||||
XFillRectangle(disp, VRoot.win, gc, aa, bb, \
|
||||
cc + ewin->border->border.left + \
|
||||
ewin->border->border.right, \
|
||||
ewin->border->border.top); \
|
||||
if ((cc + ewin->border->border.left + ewin->border->border.right > 0) && \
|
||||
(ewin->border->border.bottom > 0)) \
|
||||
XFillRectangle(disp, root.win, gc, aa, bb + dd + \
|
||||
XFillRectangle(disp, VRoot.win, gc, aa, bb + dd + \
|
||||
ewin->border->border.top, \
|
||||
cc + ewin->border->border.left + \
|
||||
ewin->border->border.right, \
|
||||
ewin->border->border.bottom); \
|
||||
if ((dd > 0) && (ewin->border->border.left > 0)) \
|
||||
XFillRectangle(disp, root.win, gc, aa, bb + ewin->border->border.top, \
|
||||
XFillRectangle(disp, VRoot.win, gc, aa, bb + ewin->border->border.top, \
|
||||
ewin->border->border.left, \
|
||||
dd); \
|
||||
if ((dd > 0) && (ewin->border->border.right > 0)) \
|
||||
XFillRectangle(disp, root.win, gc, aa + cc + ewin->border->border.left, \
|
||||
XFillRectangle(disp, VRoot.win, gc, aa + cc + ewin->border->border.left, \
|
||||
bb + ewin->border->border.top, \
|
||||
ewin->border->border.right, \
|
||||
dd); \
|
||||
XSetStipple(disp, gc, b3); \
|
||||
if ((cc > 0) && (dd > 0)) \
|
||||
XFillRectangle(disp, root.win, gc, aa + ewin->border->border.left + 1, \
|
||||
XFillRectangle(disp, VRoot.win, gc, aa + ewin->border->border.left + 1, \
|
||||
bb + ewin->border->border.top + 1, cc - 3, dd - 3);
|
||||
|
||||
#define DO_DRAW_MODE_4(aa, bb, cc, dd) \
|
||||
XSetFillStyle(disp, gc, FillStippled); \
|
||||
XSetStipple(disp, gc, b2); \
|
||||
XFillRectangle(disp, root.win, gc, aa, bb, \
|
||||
XFillRectangle(disp, VRoot.win, gc, aa, bb, \
|
||||
cc + ewin->border->border.left + \
|
||||
ewin->border->border.right, \
|
||||
dd + ewin->border->border.top + \
|
||||
|
@ -1600,9 +1600,9 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
ewin_pi = NULL;
|
||||
root_pi = NULL;
|
||||
draw_pi = NULL;
|
||||
root_pi = ECreatePixImg(root.win, root.w, root.h);
|
||||
ewin_pi = ECreatePixImg(root.win, ewin->w, ewin->h);
|
||||
draw_pi = ECreatePixImg(root.win, ewin->w, ewin->h);
|
||||
root_pi = ECreatePixImg(VRoot.win, VRoot.w, VRoot.h);
|
||||
ewin_pi = ECreatePixImg(VRoot.win, ewin->w, ewin->h);
|
||||
draw_pi = ECreatePixImg(VRoot.win, ewin->w, ewin->h);
|
||||
if ((!root_pi) || (!ewin_pi) || (!draw_pi))
|
||||
{
|
||||
Conf.movemode = 0;
|
||||
|
@ -1611,7 +1611,7 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
firstlast);
|
||||
goto done;
|
||||
}
|
||||
EFillPixmap(root.win, root_pi->pmap, x1, y1, ewin->w,
|
||||
EFillPixmap(VRoot.win, root_pi->pmap, x1, y1, ewin->w,
|
||||
ewin->h);
|
||||
gc2 = XCreateGC(disp, root_pi->pmap, 0, &gcv2);
|
||||
XCopyArea(disp, root_pi->pmap, ewin_pi->pmap, gc2, x1, y1,
|
||||
|
@ -1640,36 +1640,38 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
if ((adx <= wt) && (ady <= ht))
|
||||
{
|
||||
if (dx < 0)
|
||||
EFillPixmap(root.win, root_pi->pmap, x, y, -dx, ht);
|
||||
EFillPixmap(VRoot.win, root_pi->pmap, x, y, -dx, ht);
|
||||
else if (dx > 0)
|
||||
EFillPixmap(root.win, root_pi->pmap, x + wt - dx, y,
|
||||
EFillPixmap(VRoot.win, root_pi->pmap, x + wt - dx, y,
|
||||
dx, ht);
|
||||
if (dy < 0)
|
||||
EFillPixmap(root.win, root_pi->pmap, x, y, wt, -dy);
|
||||
EFillPixmap(VRoot.win, root_pi->pmap, x, y, wt, -dy);
|
||||
else if (dy > 0)
|
||||
EFillPixmap(root.win, root_pi->pmap, x, y + ht - dy,
|
||||
EFillPixmap(VRoot.win, root_pi->pmap, x, y + ht - dy,
|
||||
wt, dy);
|
||||
}
|
||||
else
|
||||
EFillPixmap(root.win, root_pi->pmap, x, y, wt, ht);
|
||||
EFillPixmap(VRoot.win, root_pi->pmap, x, y, wt, ht);
|
||||
if ((adx <= wt) && (ady <= ht))
|
||||
{
|
||||
EBlendPixImg(ewin, root_pi, ewin_pi, draw_pi, x, y,
|
||||
ewin->w, ewin->h);
|
||||
if (dx > 0)
|
||||
EPastePixmap(root.win, root_pi->pmap, x1, y1, dx, ht);
|
||||
EPastePixmap(VRoot.win, root_pi->pmap, x1, y1, dx,
|
||||
ht);
|
||||
else if (dx < 0)
|
||||
EPastePixmap(root.win, root_pi->pmap, x1 + wt + dx,
|
||||
EPastePixmap(VRoot.win, root_pi->pmap, x1 + wt + dx,
|
||||
y1, -dx, ht);
|
||||
if (dy > 0)
|
||||
EPastePixmap(root.win, root_pi->pmap, x1, y1, wt, dy);
|
||||
EPastePixmap(VRoot.win, root_pi->pmap, x1, y1, wt,
|
||||
dy);
|
||||
else if (dy < 0)
|
||||
EPastePixmap(root.win, root_pi->pmap, x1,
|
||||
EPastePixmap(VRoot.win, root_pi->pmap, x1,
|
||||
y1 + ht + dy, wt, -dy);
|
||||
}
|
||||
else
|
||||
{
|
||||
EPastePixmap(root.win, root_pi->pmap, x1, y1, wt, ht);
|
||||
EPastePixmap(VRoot.win, root_pi->pmap, x1, y1, wt, ht);
|
||||
EBlendPixImg(ewin, root_pi, ewin_pi, draw_pi, x, y,
|
||||
ewin->w, ewin->h);
|
||||
}
|
||||
|
@ -1677,7 +1679,7 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
}
|
||||
else if (firstlast == 2)
|
||||
{
|
||||
EPastePixmap(root.win, root_pi->pmap, x1, y1, ewin->w,
|
||||
EPastePixmap(VRoot.win, root_pi->pmap, x1, y1, ewin->w,
|
||||
ewin->h);
|
||||
if (ewin_pi)
|
||||
EDestroyPixImg(ewin_pi);
|
||||
|
@ -1693,7 +1695,8 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
}
|
||||
else if (firstlast == 3)
|
||||
{
|
||||
EPastePixmap(root.win, root_pi->pmap, x, y, ewin->w, ewin->h);
|
||||
EPastePixmap(VRoot.win, root_pi->pmap, x, y, ewin->w,
|
||||
ewin->h);
|
||||
if (root_pi)
|
||||
EDestroyPixImg(root_pi);
|
||||
root_pi->pmap = 0;
|
||||
|
@ -1704,8 +1707,8 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
|
||||
wt = ewin->w;
|
||||
ht = ewin->h;
|
||||
root_pi = ECreatePixImg(root.win, root.w, root.h);
|
||||
EFillPixmap(root.win, root_pi->pmap, x, y, wt, ht);
|
||||
root_pi = ECreatePixImg(VRoot.win, VRoot.w, VRoot.h);
|
||||
EFillPixmap(VRoot.win, root_pi->pmap, x, y, wt, ht);
|
||||
EBlendPixImg(ewin, root_pi, ewin_pi, draw_pi, x, y, ewin->w,
|
||||
ewin->h);
|
||||
}
|
||||
|
|
20
src/edge.c
20
src/edge.c
|
@ -47,25 +47,25 @@ EdgeTimeout(int val, void *data)
|
|||
case 0:
|
||||
if (ax == 0 && !Conf.areas.wraparound)
|
||||
return;
|
||||
dx = root.w - 2;
|
||||
dx = VRoot.w - 2;
|
||||
dax = -1;
|
||||
break;
|
||||
case 1:
|
||||
if (ax == (aw - 1) && !Conf.areas.wraparound)
|
||||
return;
|
||||
dx = -(root.w - 2);
|
||||
dx = -(VRoot.w - 2);
|
||||
dax = 1;
|
||||
break;
|
||||
case 2:
|
||||
if (ay == 0 && !Conf.areas.wraparound)
|
||||
return;
|
||||
dy = root.h - 2;
|
||||
dy = VRoot.h - 2;
|
||||
day = -1;
|
||||
break;
|
||||
case 3:
|
||||
if (ay == (ah - 1) && !Conf.areas.wraparound)
|
||||
return;
|
||||
dy = -(root.h - 2);
|
||||
dy = -(VRoot.h - 2);
|
||||
day = 1;
|
||||
break;
|
||||
default:
|
||||
|
@ -94,10 +94,10 @@ ShowEdgeWindows(void)
|
|||
}
|
||||
if (!w1)
|
||||
{
|
||||
w1 = ECreateEventWindow(root.win, 0, 0, 1, root.h);
|
||||
w2 = ECreateEventWindow(root.win, root.w - 1, 0, 1, root.h);
|
||||
w3 = ECreateEventWindow(root.win, 0, 0, root.w, 1);
|
||||
w4 = ECreateEventWindow(root.win, 0, root.h - 1, root.w, 1);
|
||||
w1 = ECreateEventWindow(VRoot.win, 0, 0, 1, VRoot.h);
|
||||
w2 = ECreateEventWindow(VRoot.win, VRoot.w - 1, 0, 1, VRoot.h);
|
||||
w3 = ECreateEventWindow(VRoot.win, 0, 0, VRoot.w, 1);
|
||||
w4 = ECreateEventWindow(VRoot.win, 0, VRoot.h - 1, VRoot.w, 1);
|
||||
XSelectInput(disp, w1,
|
||||
EnterWindowMask | LeaveWindowMask | PointerMotionMask |
|
||||
ButtonPressMask | ButtonReleaseMask);
|
||||
|
@ -195,11 +195,11 @@ EdgeHandleMotion(XEvent * ev)
|
|||
dir = -1;
|
||||
if (ev->xmotion.x_root == 0)
|
||||
dir = 0;
|
||||
else if (ev->xmotion.x_root == (root.w - 1))
|
||||
else if (ev->xmotion.x_root == (VRoot.w - 1))
|
||||
dir = 1;
|
||||
else if (ev->xmotion.y_root == 0)
|
||||
dir = 2;
|
||||
else if (ev->xmotion.y_root == (root.h - 1))
|
||||
else if (ev->xmotion.y_root == (VRoot.h - 1))
|
||||
dir = 3;
|
||||
|
||||
if ((lastdir != dir) && (Conf.edge_flip_resistance))
|
||||
|
|
|
@ -77,7 +77,7 @@ EventsInit(void)
|
|||
major, minor, event_base_randr, error_base_randr);
|
||||
|
||||
/* Listen for RandR events */
|
||||
XRRSelectInput(disp, root.win, RRScreenChangeNotifyMask);
|
||||
XRRSelectInput(disp, VRoot.win, RRScreenChangeNotifyMask);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ HandleEvent(XEvent * ev)
|
|||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
if (((ev->type == KeyPress) || (ev->type == KeyRelease))
|
||||
&& (ev->xkey.root != root.win))
|
||||
&& (ev->xkey.root != VRoot.win))
|
||||
{
|
||||
XSetInputFocus(disp, ev->xkey.root, RevertToPointerRoot,
|
||||
CurrentTime);
|
||||
|
|
|
@ -42,7 +42,7 @@ ToolTipTimeout(int val, void *data)
|
|||
/* In the case of multiple screens, check to make sure
|
||||
* the root window is still where the mouse is... */
|
||||
if (False ==
|
||||
XQueryPointer(disp, root.win, &rt, &ch, &x, &y, &dum, &dum, &mask))
|
||||
XQueryPointer(disp, VRoot.win, &rt, &ch, &x, &y, &dum, &dum, &mask))
|
||||
EDBUG_RETURN_;
|
||||
/* dont pop up tooltip is mouse button down */
|
||||
if (mask &
|
||||
|
@ -385,7 +385,7 @@ HandleMotion(XEvent * ev)
|
|||
xdist = x_org + menu_scroll_dist - (Mode.x);
|
||||
}
|
||||
|
||||
if (Mode.y > (root.h - (menu_scroll_dist + 1)))
|
||||
if (Mode.y > (VRoot.h - (menu_scroll_dist + 1)))
|
||||
{
|
||||
ydist = -(menu_scroll_dist + (Mode.y - (y_org + my_height)));
|
||||
}
|
||||
|
@ -535,7 +535,7 @@ HandleMouseIn(XEvent * ev)
|
|||
if (Mode.mode != MODE_NONE)
|
||||
EDBUG_RETURN_;
|
||||
|
||||
if (win == root.win)
|
||||
if (win == VRoot.win)
|
||||
goto done;
|
||||
|
||||
Mode.context_win = win;
|
||||
|
@ -760,7 +760,7 @@ HandleConfigureNotify(XEvent * ev)
|
|||
EDBUG(5, "HandleConfigureNotify");
|
||||
|
||||
#ifdef USE_XRANDR
|
||||
if (ev->xconfigure.window == root.win)
|
||||
if (ev->xconfigure.window == VRoot.win)
|
||||
DialogOK("Wheee! (ConfigureNotify)",
|
||||
"Screen size changed to\n%dx%d pixels",
|
||||
ev->xconfigure.width, ev->xconfigure.height);
|
||||
|
|
44
src/ewmh.c
44
src/ewmh.c
|
@ -223,12 +223,12 @@ EWMH_Init(Window win_wm_check)
|
|||
_ATOM_INIT(_NET_WM_STATE_ABOVE);
|
||||
_ATOM_INIT(_NET_WM_STATE_BELOW);
|
||||
|
||||
_ATOM_SET_ATOM(_NET_SUPPORTED, root.win, atom_list, atom_count);
|
||||
_ATOM_SET_ATOM(_NET_SUPPORTED, VRoot.win, atom_list, atom_count);
|
||||
|
||||
/* Set WM info properties */
|
||||
_ATOM_SET_UTF8_STRING(_NET_WM_NAME, root.win, e_wm_name);
|
||||
_ATOM_SET_UTF8_STRING(_NET_WM_NAME, VRoot.win, e_wm_name);
|
||||
|
||||
_ATOM_SET_WINDOW(_NET_SUPPORTING_WM_CHECK, root.win, &win_wm_check, 1);
|
||||
_ATOM_SET_WINDOW(_NET_SUPPORTING_WM_CHECK, VRoot.win, &win_wm_check, 1);
|
||||
_ATOM_SET_WINDOW(_NET_SUPPORTING_WM_CHECK, win_wm_check, &win_wm_check, 1);
|
||||
_ATOM_SET_UTF8_STRING(_NET_WM_NAME, win_wm_check, e_wm_name);
|
||||
|
||||
|
@ -254,13 +254,13 @@ EWMH_SetDesktopCount(void)
|
|||
EDBUG(6, "EWMH_SetDesktopCount");
|
||||
|
||||
val = Conf.desks.num;
|
||||
_ATOM_SET_CARD32(_NET_NUMBER_OF_DESKTOPS, root.win, &val, 1);
|
||||
_ATOM_SET_CARD32(_NET_NUMBER_OF_DESKTOPS, VRoot.win, &val, 1);
|
||||
|
||||
for (i = 0; i < Conf.desks.num; i++)
|
||||
{
|
||||
wl[i] = desks.desk[i].win;
|
||||
}
|
||||
_ATOM_SET_WINDOW(_NET_VIRTUAL_ROOTS, root.win, &wl, Conf.desks.num);
|
||||
_ATOM_SET_WINDOW(_NET_VIRTUAL_ROOTS, VRoot.win, &wl, Conf.desks.num);
|
||||
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ EWMH_SetDesktopNames(void)
|
|||
for (i = 0; i < Conf.desks.num; i++)
|
||||
s += sprintf(s, "Desk-%d", i) + 1;
|
||||
|
||||
_ATOM_SET_UTF8_STRING_LIST(_NET_DESKTOP_NAMES, root.win, buf, s - buf);
|
||||
_ATOM_SET_UTF8_STRING_LIST(_NET_DESKTOP_NAMES, VRoot.win, buf, s - buf);
|
||||
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -290,9 +290,9 @@ EWMH_SetDesktopSize(void)
|
|||
|
||||
EDBUG(6, "EWMH_SetDesktopSize");
|
||||
GetAreaSize(&ax, &ay);
|
||||
size[0] = ax * root.w;
|
||||
size[1] = ay * root.h;
|
||||
_ATOM_SET_CARD32(_NET_DESKTOP_GEOMETRY, root.win, &size, 2);
|
||||
size[0] = ax * VRoot.w;
|
||||
size[1] = ay * VRoot.h;
|
||||
_ATOM_SET_CARD32(_NET_DESKTOP_GEOMETRY, VRoot.win, &size, 2);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
|
@ -312,10 +312,10 @@ EWMH_SetWorkArea(void)
|
|||
{
|
||||
p_coord[4 * i] = 0;
|
||||
p_coord[4 * i + 1] = 0;
|
||||
p_coord[4 * i + 2] = root.w;
|
||||
p_coord[4 * i + 3] = root.h;
|
||||
p_coord[4 * i + 2] = VRoot.w;
|
||||
p_coord[4 * i + 3] = VRoot.h;
|
||||
}
|
||||
_ATOM_SET_CARD32(_NET_WORKAREA, root.win, p_coord, n_coord);
|
||||
_ATOM_SET_CARD32(_NET_WORKAREA, VRoot.win, p_coord, n_coord);
|
||||
Efree(p_coord);
|
||||
}
|
||||
EDBUG_RETURN_;
|
||||
|
@ -328,7 +328,7 @@ EWMH_SetCurrentDesktop(void)
|
|||
|
||||
EDBUG(6, "EWMH_SetCurrentDesktop");
|
||||
val = desks.current;
|
||||
_ATOM_SET_CARD32(_NET_CURRENT_DESKTOP, root.win, &val, 1);
|
||||
_ATOM_SET_CARD32(_NET_CURRENT_DESKTOP, VRoot.win, &val, 1);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
|
@ -345,10 +345,10 @@ EWMH_SetDesktopViewport(void)
|
|||
{
|
||||
for (i = 0; i < Conf.desks.num; i++)
|
||||
{
|
||||
p_coord[2 * i] = desks.desk[i].current_area_x * root.w;
|
||||
p_coord[2 * i + 1] = desks.desk[i].current_area_y * root.h;
|
||||
p_coord[2 * i] = desks.desk[i].current_area_x * VRoot.w;
|
||||
p_coord[2 * i + 1] = desks.desk[i].current_area_y * VRoot.h;
|
||||
}
|
||||
_ATOM_SET_CARD32(_NET_DESKTOP_VIEWPORT, root.win, p_coord, n_coord);
|
||||
_ATOM_SET_CARD32(_NET_DESKTOP_VIEWPORT, VRoot.win, p_coord, n_coord);
|
||||
Efree(p_coord);
|
||||
}
|
||||
EDBUG_RETURN_;
|
||||
|
@ -374,12 +374,12 @@ EWMH_SetClientList(void)
|
|||
wl = Emalloc(num * sizeof(Window));
|
||||
for (i = 0; i < num; i++)
|
||||
wl[i] = lst[i]->client.win;
|
||||
_ATOM_SET_WINDOW(_NET_CLIENT_LIST, root.win, wl, num);
|
||||
_ATOM_SET_WINDOW(_NET_CLIENT_LIST, VRoot.win, wl, num);
|
||||
Efree(wl);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ATOM_SET_WINDOW(_NET_CLIENT_LIST, root.win, NULL, 0);
|
||||
_ATOM_SET_WINDOW(_NET_CLIENT_LIST, VRoot.win, NULL, 0);
|
||||
}
|
||||
if (lst)
|
||||
Efree(lst);
|
||||
|
@ -403,12 +403,12 @@ EWMH_SetClientStacking(void)
|
|||
wl = Emalloc(num * sizeof(Window));
|
||||
for (i = 0; i < num; i++)
|
||||
wl[i] = lst[num - i - 1]->client.win;
|
||||
_ATOM_SET_WINDOW(_NET_CLIENT_LIST_STACKING, root.win, wl, num);
|
||||
_ATOM_SET_WINDOW(_NET_CLIENT_LIST_STACKING, VRoot.win, wl, num);
|
||||
Efree(wl);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ATOM_SET_WINDOW(_NET_CLIENT_LIST_STACKING, root.win, NULL, 0);
|
||||
_ATOM_SET_WINDOW(_NET_CLIENT_LIST_STACKING, VRoot.win, NULL, 0);
|
||||
}
|
||||
|
||||
EDBUG_RETURN_;
|
||||
|
@ -424,7 +424,7 @@ EWMH_SetActiveWindow(const EWin * ewin)
|
|||
win = (ewin) ? ewin->client.win : None;
|
||||
if (win != win_last_set)
|
||||
{
|
||||
_ATOM_SET_WINDOW(_NET_ACTIVE_WINDOW, root.win, &win, 1);
|
||||
_ATOM_SET_WINDOW(_NET_ACTIVE_WINDOW, VRoot.win, &win, 1);
|
||||
win_last_set = win;
|
||||
}
|
||||
EDBUG_RETURN_;
|
||||
|
@ -737,7 +737,7 @@ EWMH_ProcessClientMessage(XClientMessageEvent * event)
|
|||
}
|
||||
else if (event->message_type == _NET_DESKTOP_VIEWPORT)
|
||||
{
|
||||
SetCurrentArea(event->data.l[0] / root.w, event->data.l[1] / root.h);
|
||||
SetCurrentArea(event->data.l[0] / VRoot.w, event->data.l[1] / VRoot.h);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ FocusHandleEnter(XEvent * ev)
|
|||
EDBUG(5, "FocusHandleEnter");
|
||||
|
||||
/* Entering root may mean entering this screen */
|
||||
if (win == root.win &&
|
||||
if (win == VRoot.win &&
|
||||
(ev->xcrossing.mode == NotifyNormal &&
|
||||
ev->xcrossing.detail != NotifyInferior))
|
||||
{
|
||||
|
@ -425,7 +425,7 @@ FocusHandleLeave(XEvent * ev)
|
|||
Window win = ev->xcrossing.window;
|
||||
|
||||
/* Leaving root may mean entering other screen */
|
||||
if (win == root.win &&
|
||||
if (win == VRoot.win &&
|
||||
(ev->xcrossing.mode == NotifyNormal &&
|
||||
ev->xcrossing.detail != NotifyInferior))
|
||||
FocusToEWin(NULL, FOCUS_SET);
|
||||
|
@ -439,7 +439,7 @@ FocusHandleEnter(XEvent * ev)
|
|||
* multi screen handling -- root windows receive
|
||||
* enter / leave notify
|
||||
*/
|
||||
if (ev->xany.window == root.win)
|
||||
if (ev->xany.window == VRoot.win)
|
||||
{
|
||||
if (!Mode.focuswin || Conf.focus.mode == MODE_FOCUS_POINTER)
|
||||
HandleFocusWindow(0);
|
||||
|
@ -458,7 +458,7 @@ FocusHandleLeave(XEvent * ev)
|
|||
* screens on a multi screen system - need to unfocus
|
||||
* to allow other desk to grab focus...
|
||||
*/
|
||||
if (ev->xcrossing.window == root.win)
|
||||
if (ev->xcrossing.window == VRoot.win)
|
||||
{
|
||||
if (ev->xcrossing.mode == NotifyNormal
|
||||
&& ev->xcrossing.detail != NotifyInferior && Mode.focuswin)
|
||||
|
|
52
src/fx.c
52
src/fx.c
|
@ -271,7 +271,7 @@ FX_ripple_timeout(int val, void *data)
|
|||
fx_ripple_win = desks.desk[desks.current].win;
|
||||
|
||||
fx_ripple_above =
|
||||
ECreatePixmap(disp, fx_ripple_win, root.w, fx_ripple_waterh * 2,
|
||||
ECreatePixmap(disp, fx_ripple_win, VRoot.w, fx_ripple_waterh * 2,
|
||||
GetWinDepth(fx_ripple_win));
|
||||
if (gc)
|
||||
XFreeGC(disp, gc);
|
||||
|
@ -285,7 +285,7 @@ FX_ripple_timeout(int val, void *data)
|
|||
}
|
||||
if (fx_ripple_count == 0)
|
||||
XCopyArea(disp, fx_ripple_win, fx_ripple_above, gc, 0,
|
||||
root.h - (fx_ripple_waterh * 3), root.w, fx_ripple_waterh * 2,
|
||||
VRoot.h - (fx_ripple_waterh * 3), VRoot.w, fx_ripple_waterh * 2,
|
||||
0, 0);
|
||||
fx_ripple_count++;
|
||||
if (fx_ripple_count > 32)
|
||||
|
@ -311,8 +311,8 @@ FX_ripple_timeout(int val, void *data)
|
|||
yy = (fx_ripple_waterh * 2) - yoff;
|
||||
aa = p * p * 64 + inch;
|
||||
off = (int)(sin(aa) * 10 * (1 - p));
|
||||
XCopyArea(disp, fx_ripple_above, fx_ripple_win, gc1, 0, yy, root.w, 1,
|
||||
off, root.h - fx_ripple_waterh + y);
|
||||
XCopyArea(disp, fx_ripple_above, fx_ripple_win, gc1, 0, yy, VRoot.w, 1,
|
||||
off, VRoot.h - fx_ripple_waterh + y);
|
||||
}
|
||||
DoIn("FX_RIPPLE_TIMEOUT", 0.066, FX_ripple_timeout, 0, NULL);
|
||||
return;
|
||||
|
@ -341,7 +341,7 @@ void
|
|||
FX_Ripple_Quit(void)
|
||||
{
|
||||
RemoveTimerEvent("FX_RIPPLE_TIMEOUT");
|
||||
XClearArea(disp, fx_ripple_win, 0, root.h - fx_ripple_waterh, root.w,
|
||||
XClearArea(disp, fx_ripple_win, 0, VRoot.h - fx_ripple_waterh, VRoot.w,
|
||||
fx_ripple_waterh, False);
|
||||
}
|
||||
|
||||
|
@ -519,16 +519,20 @@ FX_raindrops_timeout(int val, void *data)
|
|||
intersect = 0;
|
||||
for (j = 0; j < fx_raindrops_number; j++)
|
||||
{
|
||||
fx_raindrops[i].x = rand() % (root.w - fx_raindrop_size);
|
||||
fx_raindrops[i].y = rand() % (root.h - fx_raindrop_size);
|
||||
fx_raindrops[i].x =
|
||||
rand() % (VRoot.w - fx_raindrop_size);
|
||||
fx_raindrops[i].y =
|
||||
rand() % (VRoot.h - fx_raindrop_size);
|
||||
if (fx_raindrops[i].x < 0)
|
||||
fx_raindrops[i].x = 0;
|
||||
else if (fx_raindrops[i].x > (root.w - fx_raindrop_size))
|
||||
fx_raindrops[i].x = root.w - fx_raindrop_size;
|
||||
else if (fx_raindrops[i].x >
|
||||
(VRoot.w - fx_raindrop_size))
|
||||
fx_raindrops[i].x = VRoot.w - fx_raindrop_size;
|
||||
if (fx_raindrops[i].y < 0)
|
||||
fx_raindrops[i].y = 0;
|
||||
else if (fx_raindrops[i].y > (root.h - fx_raindrop_size))
|
||||
fx_raindrops[i].y = root.h - fx_raindrop_size;
|
||||
else if (fx_raindrops[i].y >
|
||||
(VRoot.h - fx_raindrop_size))
|
||||
fx_raindrops[i].y = VRoot.h - fx_raindrop_size;
|
||||
if (i != j)
|
||||
{
|
||||
if (((fx_raindrops[i].x >= fx_raindrops[j].x)
|
||||
|
@ -640,8 +644,8 @@ FX_Raindrops_Init(const char *name)
|
|||
for (i = 0; i < fx_raindrops_number; i++)
|
||||
{
|
||||
fx_raindrops[i].count = rand() % fx_raindrop_duration;
|
||||
fx_raindrops[i].x = rand() % (root.w - fx_raindrop_size);
|
||||
fx_raindrops[i].y = rand() % (root.h - fx_raindrop_size);
|
||||
fx_raindrops[i].x = rand() % (VRoot.w - fx_raindrop_size);
|
||||
fx_raindrops[i].y = rand() % (VRoot.h - fx_raindrop_size);
|
||||
}
|
||||
DoIn("FX_RAINDROPS_TIMEOUT", 0.066, FX_raindrops_timeout, 0, NULL);
|
||||
return;
|
||||
|
@ -744,7 +748,7 @@ FX_Wave_timeout(int val, void *data)
|
|||
fx_wave_win = desks.desk[desks.current].win;
|
||||
|
||||
fx_wave_above =
|
||||
XCreatePixmap(disp, fx_wave_win, root.w, FX_WAVE_WATERH * 2,
|
||||
XCreatePixmap(disp, fx_wave_win, VRoot.w, FX_WAVE_WATERH * 2,
|
||||
GetWinDepth(fx_wave_win));
|
||||
if (gc)
|
||||
XFreeGC(disp, gc);
|
||||
|
@ -761,8 +765,8 @@ FX_Wave_timeout(int val, void *data)
|
|||
if (fx_wave_count == 0)
|
||||
{
|
||||
XCopyArea(disp, fx_wave_win, fx_wave_above, gc, 0,
|
||||
root.h - (FX_WAVE_WATERH * 3), root.w, FX_WAVE_WATERH * 2, 0,
|
||||
0);
|
||||
VRoot.h - (FX_WAVE_WATERH * 3), VRoot.w, FX_WAVE_WATERH * 2,
|
||||
0, 0);
|
||||
}
|
||||
|
||||
/* Increment and roll the counter */
|
||||
|
@ -787,8 +791,8 @@ FX_Wave_timeout(int val, void *data)
|
|||
if (fx_wave_count == 0)
|
||||
{
|
||||
XCopyArea(disp, fx_wave_above, fx_wave_win, gc1, 0,
|
||||
root.h - FX_WAVE_GRABH, root.w, FX_WAVE_DEPTH * 2, 0,
|
||||
root.h - FX_WAVE_GRABH);
|
||||
VRoot.h - FX_WAVE_GRABH, VRoot.w, FX_WAVE_DEPTH * 2, 0,
|
||||
VRoot.h - FX_WAVE_GRABH);
|
||||
}
|
||||
|
||||
/* Go through the bottom couple (FX_WAVE_WATERH) lines of the window */
|
||||
|
@ -811,7 +815,7 @@ FX_Wave_timeout(int val, void *data)
|
|||
incx2 = incx;
|
||||
|
||||
/* Go through the width of the screen, in block sizes */
|
||||
for (x = 0; x < root.w; x += FX_WAVE_WATERW)
|
||||
for (x = 0; x < VRoot.w; x += FX_WAVE_WATERW)
|
||||
{
|
||||
/* Variables */
|
||||
int sx;
|
||||
|
@ -828,7 +832,7 @@ FX_Wave_timeout(int val, void *data)
|
|||
/* Display this block */
|
||||
XCopyArea(disp, fx_wave_above, fx_wave_win, gc1, x, yy, /* x, y */
|
||||
FX_WAVE_WATERW, 1, /* w, h */
|
||||
off + x, root.h - FX_WAVE_WATERH + y + sx /* dx, dy */
|
||||
off + x, VRoot.h - FX_WAVE_WATERH + y + sx /* dx, dy */
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -865,7 +869,7 @@ void
|
|||
FX_Waves_Quit(void)
|
||||
{
|
||||
RemoveTimerEvent("FX_WAVE_TIMEOUT");
|
||||
XClearArea(disp, fx_wave_win, 0, root.h - FX_WAVE_WATERH, root.w,
|
||||
XClearArea(disp, fx_wave_win, 0, VRoot.h - FX_WAVE_WATERH, VRoot.w,
|
||||
FX_WAVE_WATERH, False);
|
||||
}
|
||||
|
||||
|
@ -945,8 +949,8 @@ FX_imagespinner_timeout(int val, void *data)
|
|||
w = imlib_image_get_width();
|
||||
h = imlib_image_get_height();
|
||||
sscanf(fx_imagespinner_params, "%*s %i %i ", &x, &y);
|
||||
x = ((root.w * x) >> 10) - ((w * x) >> 10);
|
||||
y = ((root.h * y) >> 10) - ((h * y) >> 10);
|
||||
x = ((VRoot.w * x) >> 10) - ((w * x) >> 10);
|
||||
y = ((VRoot.h * y) >> 10) - ((h * y) >> 10);
|
||||
imlib_context_set_drawable(fx_imagespinner_win);
|
||||
imlib_render_image_on_drawable_at_size(x, y, w, h);
|
||||
imlib_free_image();
|
||||
|
@ -978,7 +982,7 @@ void
|
|||
FX_ImageSpinner_Quit(void)
|
||||
{
|
||||
RemoveTimerEvent("FX_IMAGESPINNER_TIMEOUT");
|
||||
XClearArea(disp, fx_imagespinner_win, 0, 0, root.w, root.h, False);
|
||||
XClearArea(disp, fx_imagespinner_win, 0, 0, VRoot.w, VRoot.h, False);
|
||||
if (fx_imagespinner_params)
|
||||
Efree(fx_imagespinner_params);
|
||||
fx_imagespinner_params = NULL;
|
||||
|
|
|
@ -42,7 +42,7 @@ Drawable vIcDrw;
|
|||
FnlibData *pFnlibData;
|
||||
#endif
|
||||
List *lists;
|
||||
Root root;
|
||||
Root VRoot;
|
||||
EConf Conf;
|
||||
EMode Mode;
|
||||
Desktops desks;
|
||||
|
|
24
src/gnome.c
24
src/gnome.c
|
@ -550,7 +550,7 @@ GNOME_SetUsedHints(void)
|
|||
list[7] = XInternAtom(disp, XA_WIN_WORKSPACE_COUNT, False);
|
||||
list[8] = XInternAtom(disp, XA_WIN_WORKSPACE_NAMES, False);
|
||||
list[9] = XInternAtom(disp, XA_WIN_CLIENT_LIST, False);
|
||||
XChangeProperty(disp, root.win, atom_set, XA_ATOM, 32, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, atom_set, XA_ATOM, 32, PropModeReplace,
|
||||
(unsigned char *)list, 10);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -568,7 +568,7 @@ GNOME_SetCurrentArea(void)
|
|||
GetCurrentArea(&ax, &ay);
|
||||
val[0] = ax;
|
||||
val[1] = ay;
|
||||
XChangeProperty(disp, root.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)val, 2);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -583,7 +583,7 @@ GNOME_SetCurrentDesk(void)
|
|||
if (!atom_set)
|
||||
atom_set = XInternAtom(disp, XA_WIN_WORKSPACE, False);
|
||||
val = (CARD32) desks.current;
|
||||
XChangeProperty(disp, root.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&val, 1);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ GNOME_SetWMCheck(Window win_wm_check)
|
|||
if (!atom_set)
|
||||
atom_set = XInternAtom(disp, XA_WIN_SUPPORTING_WM_CHECK, False);
|
||||
val = win_wm_check;
|
||||
XChangeProperty(disp, root.win, atom_set, XA_CARDINAL,
|
||||
XChangeProperty(disp, VRoot.win, atom_set, XA_CARDINAL,
|
||||
32, PropModeReplace, (unsigned char *)&val, 1);
|
||||
XChangeProperty(disp, win_wm_check, atom_set, XA_CARDINAL,
|
||||
32, PropModeReplace, (unsigned char *)&val, 1);
|
||||
|
@ -616,7 +616,7 @@ GNOME_SetDeskCount(void)
|
|||
if (!atom_set)
|
||||
atom_set = XInternAtom(disp, XA_WIN_WORKSPACE_COUNT, False);
|
||||
val = Conf.desks.num;
|
||||
XChangeProperty(disp, root.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&val, 1);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -634,7 +634,7 @@ GNOME_SetAreaCount(void)
|
|||
GetAreaSize(&ax, &ay);
|
||||
val[0] = ax;
|
||||
val[1] = ay;
|
||||
XChangeProperty(disp, root.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)val, 2);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -657,7 +657,7 @@ GNOME_SetDeskNames(void)
|
|||
}
|
||||
if (XStringListToTextProperty(names, Conf.desks.num, &text))
|
||||
{
|
||||
XSetTextProperty(disp, root.win, &text, atom_set);
|
||||
XSetTextProperty(disp, VRoot.win, &text, atom_set);
|
||||
XFree(text.value);
|
||||
}
|
||||
for (i = 0; i < Conf.desks.num; i++)
|
||||
|
@ -690,7 +690,7 @@ GNOME_SetClientList(void)
|
|||
wl[j++] = lst[i]->client.win;
|
||||
}
|
||||
}
|
||||
XChangeProperty(disp, root.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)wl, j);
|
||||
if (wl)
|
||||
Efree(wl);
|
||||
|
@ -708,11 +708,11 @@ GNOME_SetWMNameVer(void)
|
|||
EDBUG(6, "GNOME_SetWMNameVer");
|
||||
if (!atom_set)
|
||||
atom_set = XInternAtom(disp, XA_WIN_WM_NAME, False);
|
||||
XChangeProperty(disp, root.win, atom_set, XA_STRING, 8, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, atom_set, XA_STRING, 8, PropModeReplace,
|
||||
(unsigned char *)e_wm_name, strlen(e_wm_name));
|
||||
if (!atom_set2)
|
||||
atom_set2 = XInternAtom(disp, XA_WIN_WM_VERSION, False);
|
||||
XChangeProperty(disp, root.win, atom_set2, XA_STRING, 8, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, atom_set2, XA_STRING, 8, PropModeReplace,
|
||||
(unsigned char *)wm_version, strlen(wm_version));
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -772,9 +772,9 @@ GNOME_SetHints(Window win_wm_check)
|
|||
CARD32 val;
|
||||
|
||||
atom_set = XInternAtom(disp, "_WIN_DESKTOP_BUTTON_PROXY", False);
|
||||
Mode.button_proxy_win = ECreateWindow(root.win, -80, -80, 24, 24, 0);
|
||||
Mode.button_proxy_win = ECreateWindow(VRoot.win, -80, -80, 24, 24, 0);
|
||||
val = Mode.button_proxy_win;
|
||||
XChangeProperty(disp, root.win, atom_set, XA_CARDINAL, 32,
|
||||
XChangeProperty(disp, VRoot.win, atom_set, XA_CARDINAL, 32,
|
||||
PropModeReplace, (unsigned char *)&val, 1);
|
||||
XChangeProperty(disp, Mode.button_proxy_win, atom_set, XA_CARDINAL, 32,
|
||||
PropModeReplace, (unsigned char *)&val, 1);
|
||||
|
|
|
@ -36,7 +36,7 @@ GrabActionKey(Action * a)
|
|||
if (a->anymodifier)
|
||||
{
|
||||
mod = AnyModifier;
|
||||
XGrabKey(disp, a->key, mod, root.win, False, GrabModeAsync,
|
||||
XGrabKey(disp, a->key, mod, VRoot.win, False, GrabModeAsync,
|
||||
GrabModeAsync);
|
||||
}
|
||||
else
|
||||
|
@ -45,7 +45,7 @@ GrabActionKey(Action * a)
|
|||
|
||||
/* grab the key even if locks are on or not */
|
||||
for (i = 0; i < 8; i++)
|
||||
XGrabKey(disp, a->key, mod | mask_mod_combos[i], root.win, False,
|
||||
XGrabKey(disp, a->key, mod | mask_mod_combos[i], VRoot.win, False,
|
||||
GrabModeAsync, GrabModeAsync);
|
||||
}
|
||||
EDBUG_RETURN_;
|
||||
|
@ -63,7 +63,7 @@ UnGrabActionKey(Action * a)
|
|||
if (a->anymodifier)
|
||||
{
|
||||
mod = AnyModifier;
|
||||
XUngrabKey(disp, a->key, mod, root.win);
|
||||
XUngrabKey(disp, a->key, mod, VRoot.win);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ UnGrabActionKey(Action * a)
|
|||
|
||||
/* ungrab the key even if locks are on or not */
|
||||
for (i = 0; i < 8; i++)
|
||||
XUngrabKey(disp, a->key, mod | mask_mod_combos[i], root.win);
|
||||
XUngrabKey(disp, a->key, mod | mask_mod_combos[i], VRoot.win);
|
||||
}
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
|
12
src/groups.c
12
src/groups.c
|
@ -245,15 +245,15 @@ RemoveEwinFromGroup(EWin * ewin, Group * g)
|
|||
x = ewin->x;
|
||||
y = ewin->y;
|
||||
if ((ewin->x + ewin->border->border.left + 1) >
|
||||
root.w)
|
||||
x = root.w - ewin->border->border.left - 1;
|
||||
VRoot.w)
|
||||
x = VRoot.w - ewin->border->border.left - 1;
|
||||
else if ((ewin->x + ewin->w -
|
||||
ewin->border->border.right - 1) < 0)
|
||||
x = 0 - ewin->w +
|
||||
ewin->border->border.right + 1;
|
||||
if ((ewin->y + ewin->border->border.top + 1) >
|
||||
root.h)
|
||||
y = root.h - ewin->border->border.top - 1;
|
||||
VRoot.h)
|
||||
y = VRoot.h - ewin->border->border.top - 1;
|
||||
else if ((ewin->y + ewin->h -
|
||||
ewin->border->border.bottom - 1) < 0)
|
||||
y = 0 - ewin->h +
|
||||
|
@ -392,7 +392,7 @@ SaveGroups(void)
|
|||
char s[1024];
|
||||
|
||||
Esnprintf(s, sizeof(s), "%s/...e_session-XXXXXX.groups.%i", EDirUser(),
|
||||
root.scr);
|
||||
VRoot.scr);
|
||||
f = fopen(s, "w");
|
||||
if (f)
|
||||
{
|
||||
|
@ -437,7 +437,7 @@ LoadGroups(void)
|
|||
char s[1024];
|
||||
|
||||
Esnprintf(s, sizeof(s), "%s/...e_session-XXXXXX.groups.%i", EDirUser(),
|
||||
root.scr);
|
||||
VRoot.scr);
|
||||
f = fopen(s, "r");
|
||||
if (f)
|
||||
{
|
||||
|
|
10
src/hints.c
10
src/hints.c
|
@ -36,7 +36,7 @@ HintsInit(void)
|
|||
Window win;
|
||||
|
||||
EDBUG(6, "HintsInit");
|
||||
win = ECreateWindow(root.win, -200, -200, 5, 5, 0);
|
||||
win = ECreateWindow(VRoot.win, -200, -200, 5, 5, 0);
|
||||
ICCCM_Init();
|
||||
#if ENABLE_GNOME
|
||||
GNOME_SetHints(win);
|
||||
|
@ -45,7 +45,7 @@ HintsInit(void)
|
|||
EWMH_Init(win);
|
||||
#endif
|
||||
atom = XInternAtom(disp, "ENLIGHTENMENT_VERSION", False);
|
||||
XChangeProperty(disp, root.win, atom, XA_STRING, 8, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, atom, XA_STRING, 8, PropModeReplace,
|
||||
(unsigned char *)e_wm_version, strlen(e_wm_version));
|
||||
|
||||
Conf.hints.set_xroot_info_on_root_window = 0;
|
||||
|
@ -308,15 +308,15 @@ HintsSetRootInfo(Window win, Pixmap pmap, int color)
|
|||
}
|
||||
if (!alive_win)
|
||||
{
|
||||
alive_win = ECreateWindow(root.win, -100, -100, 1, 1, 0);
|
||||
alive_win = ECreateWindow(VRoot.win, -100, -100, 1, 1, 0);
|
||||
XChangeProperty(disp, alive_win, aaa, XA_WINDOW, 32, PropModeReplace,
|
||||
(unsigned char *)&alive_win, 1);
|
||||
XChangeProperty(disp, root.win, aaa, XA_WINDOW, 32, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, aaa, XA_WINDOW, 32, PropModeReplace,
|
||||
(unsigned char *)&alive_win, 1);
|
||||
}
|
||||
|
||||
if (Conf.hints.set_xroot_info_on_root_window)
|
||||
win = root.win;
|
||||
win = VRoot.win;
|
||||
XChangeProperty(disp, win, a, XA_PIXMAP, 32, PropModeReplace,
|
||||
(unsigned char *)&pmap, 1);
|
||||
XChangeProperty(disp, win, aa, XA_CARDINAL, 32, PropModeReplace,
|
||||
|
|
18
src/icccm.c
18
src/icccm.c
|
@ -460,7 +460,7 @@ ICCCM_Cmap(EWin * ewin)
|
|||
{
|
||||
if (XGetWindowAttributes(disp, wlist[i], &xwa))
|
||||
{
|
||||
if (xwa.colormap != DefaultColormap(disp, root.scr))
|
||||
if (xwa.colormap != DefaultColormap(disp, VRoot.scr))
|
||||
{
|
||||
XInstallColormap(disp, xwa.colormap);
|
||||
Mode.current_cmap = xwa.colormap;
|
||||
|
@ -488,7 +488,7 @@ ICCCM_Focus(EWin * ewin)
|
|||
|
||||
if (!ewin)
|
||||
{
|
||||
XSetInputFocus(disp, root.win, RevertToPointerRoot, CurrentTime);
|
||||
XSetInputFocus(disp, VRoot.win, RevertToPointerRoot, CurrentTime);
|
||||
HintsSetActiveWindow(ewin);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
|
|||
dsk = desks.current;
|
||||
ewin->client.x -= desks.desk[dsk].x;
|
||||
ewin->client.y -= desks.desk[dsk].y;
|
||||
if (ewin->client.x + ewin->client.w >= root.w)
|
||||
if (ewin->client.x + ewin->client.w >= VRoot.w)
|
||||
{
|
||||
ewin->client.x += desks.desk[dsk].x;
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
|
|||
{
|
||||
ewin->client.x += desks.desk[dsk].x;
|
||||
}
|
||||
if (ewin->client.y + ewin->client.h >= root.h)
|
||||
if (ewin->client.y + ewin->client.h >= VRoot.h)
|
||||
{
|
||||
ewin->client.y += desks.desk[dsk].y;
|
||||
}
|
||||
|
@ -1049,7 +1049,7 @@ ICCCM_SetIconSizes()
|
|||
is->max_height = 48;
|
||||
is->width_inc = 1;
|
||||
is->height_inc = 1;
|
||||
XSetIconSizes(disp, root.win, is, 1);
|
||||
XSetIconSizes(disp, VRoot.win, is, 1);
|
||||
XFree(is);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -1098,10 +1098,10 @@ ICCCM_SetMainEInfo(void)
|
|||
cc[(i * 2) + 1] = desks.desk[i].current_area_y;
|
||||
}
|
||||
a = XInternAtom(disp, "ENL_INTERNAL_AREA_DATA", False);
|
||||
XChangeProperty(disp, root.win, a, XA_CARDINAL, 32, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, a, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)cc, ENLIGHTENMENT_CONF_NUM_DESKTOPS * 2);
|
||||
a = XInternAtom(disp, "ENL_INTERNAL_DESK_DATA", False);
|
||||
XChangeProperty(disp, root.win, a, XA_CARDINAL, 32, PropModeReplace,
|
||||
XChangeProperty(disp, VRoot.win, a, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)(&desks.current), 1);
|
||||
}
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ ICCCM_GetMainEInfo(void)
|
|||
|
||||
a = XInternAtom(disp, "ENL_INTERNAL_AREA_DATA", False);
|
||||
puc = NULL;
|
||||
XGetWindowProperty(disp, root.win, a, 0, 10, False, XA_CARDINAL, &a2,
|
||||
XGetWindowProperty(disp, VRoot.win, a, 0, 10, False, XA_CARDINAL, &a2,
|
||||
&dummy, &lnum, &ldummy, &puc);
|
||||
c = (CARD32 *) puc;
|
||||
num = (int)lnum;
|
||||
|
@ -1135,7 +1135,7 @@ ICCCM_GetMainEInfo(void)
|
|||
|
||||
a = XInternAtom(disp, "ENL_INTERNAL_DESK_DATA", False);
|
||||
puc = NULL;
|
||||
XGetWindowProperty(disp, root.win, a, 0, 10, False, XA_CARDINAL, &a2,
|
||||
XGetWindowProperty(disp, VRoot.win, a, 0, 10, False, XA_CARDINAL, &a2,
|
||||
&dummy, &lnum, &ldummy, &puc);
|
||||
c = (CARD32 *) puc;
|
||||
num = (int)lnum;
|
||||
|
|
10
src/iclass.c
10
src/iclass.c
|
@ -434,14 +434,14 @@ ImageStateMakePmapMask(ImageState * is, Drawable win, PmapMask * pmm,
|
|||
Pixmap bg;
|
||||
int xx, yy;
|
||||
|
||||
XTranslateCoordinates(disp, win, root.win, 0, 0, &xx, &yy, &cr);
|
||||
XTranslateCoordinates(disp, win, VRoot.win, 0, 0, &xx, &yy, &cr);
|
||||
/* Eprintf("ImageStateMakePmapMask %#lx %d %d %d %d\n", win, xx, yy, w, h); */
|
||||
if (xx < root.w && yy < root.h && xx + w >= 0 && yy + h >= 0)
|
||||
if (xx < VRoot.w && yy < VRoot.h && xx + w >= 0 && yy + h >= 0)
|
||||
{
|
||||
/* Create the background base image */
|
||||
bg = BackgroundGetPixmap(desks.desk[desks.current].bg);
|
||||
if ((is->transparent & 0x02) != 0 || bg == None)
|
||||
bg = root.win;
|
||||
bg = VRoot.win;
|
||||
imlib_context_set_drawable(bg);
|
||||
ii = imlib_create_image_from_drawable(0, xx, yy, w, h, 1);
|
||||
imlib_context_set_image(ii);
|
||||
|
@ -585,7 +585,7 @@ ImageStateMakePmapMask(ImageState * is, Drawable win, PmapMask * pmm,
|
|||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
tp = ECreatePixmap(disp, win, w, h, root.depth);
|
||||
tp = ECreatePixmap(disp, win, w, h, VRoot.depth);
|
||||
gcv.fill_style = FillTiled;
|
||||
gcv.tile = pmm->pmap;
|
||||
gcv.ts_x_origin = 0;
|
||||
|
@ -855,7 +855,7 @@ IclassApplyCopy(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
if (pmm->pmap)
|
||||
Eprintf("IclassApplyCopy: Hmm... pmm->pmap already set\n");
|
||||
|
||||
pmap = ECreatePixmap(disp, win, w, h, root.depth);
|
||||
pmap = ECreatePixmap(disp, win, w, h, VRoot.depth);
|
||||
pmm->type = 0;
|
||||
pmm->pmap = pmap;
|
||||
pmm->mask = 0;
|
||||
|
|
156
src/iconify.c
156
src/iconify.c
|
@ -47,10 +47,10 @@ IB_Animate(char iconify, EWin * from, EWin * to)
|
|||
gcv.subwindow_mode = IncludeInferiors;
|
||||
gcv.function = GXxor;
|
||||
gcv.fill_style = FillOpaqueStippled;
|
||||
gcv.foreground = WhitePixel(disp, root.scr);
|
||||
gcv.foreground = WhitePixel(disp, VRoot.scr);
|
||||
if (gcv.foreground == 0)
|
||||
gcv.foreground = BlackPixel(disp, root.scr);
|
||||
gc = XCreateGC(disp, root.win,
|
||||
gcv.foreground = BlackPixel(disp, VRoot.scr);
|
||||
gc = XCreateGC(disp, VRoot.win,
|
||||
GCFunction | GCForeground | GCSubwindowMode | GCFillStyle,
|
||||
&gcv);
|
||||
t1 = GetTime();
|
||||
|
@ -87,20 +87,20 @@ IB_Animate(char iconify, EWin * from, EWin * to)
|
|||
x4 = x - w * (1 - .5 * sin(i * 6.2831853072));
|
||||
y4 = y + h * cos(i * 6.2831853072);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1, y1, x2, y2);
|
||||
XDrawLine(disp, root.win, gc, x2, y2, x3, y3);
|
||||
XDrawLine(disp, root.win, gc, x3, y3, x4, y4);
|
||||
XDrawLine(disp, root.win, gc, x4, y4, x1, y1);
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, x2, y2);
|
||||
XDrawLine(disp, VRoot.win, gc, x2, y2, x3, y3);
|
||||
XDrawLine(disp, VRoot.win, gc, x3, y3, x4, y4);
|
||||
XDrawLine(disp, VRoot.win, gc, x4, y4, x1, y1);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1 + 1, y1 + 1, x2 - 1, y2 - 1);
|
||||
XDrawLine(disp, root.win, gc, x2 + 1, y2 + 1, x3 - 1, y3 - 1);
|
||||
XDrawLine(disp, root.win, gc, x3 + 1, y3 + 1, x4 - 1, y4 - 1);
|
||||
XDrawLine(disp, root.win, gc, x4 + 1, y4 + 1, x1 - 1, y1 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x1 + 1, y1 + 1, x2 - 1, y2 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x2 + 1, y2 + 1, x3 - 1, y3 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x3 + 1, y3 + 1, x4 - 1, y4 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x4 + 1, y4 + 1, x1 - 1, y1 - 1);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1 + 2, y1 + 2, x2 - 2, y2 - 2);
|
||||
XDrawLine(disp, root.win, gc, x2 + 2, y2 + 2, x3 - 2, y3 - 2);
|
||||
XDrawLine(disp, root.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2);
|
||||
XDrawLine(disp, root.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x1 + 2, y1 + 2, x2 - 2, y2 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x2 + 2, y2 + 2, x3 - 2, y3 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2);
|
||||
|
||||
XSync(disp, False);
|
||||
t2 = GetTime();
|
||||
|
@ -108,20 +108,20 @@ IB_Animate(char iconify, EWin * from, EWin * to)
|
|||
t1 = t2;
|
||||
spd = t / IB_ANIM_TIME;
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1, y1, x2, y2);
|
||||
XDrawLine(disp, root.win, gc, x2, y2, x3, y3);
|
||||
XDrawLine(disp, root.win, gc, x3, y3, x4, y4);
|
||||
XDrawLine(disp, root.win, gc, x4, y4, x1, y1);
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, x2, y2);
|
||||
XDrawLine(disp, VRoot.win, gc, x2, y2, x3, y3);
|
||||
XDrawLine(disp, VRoot.win, gc, x3, y3, x4, y4);
|
||||
XDrawLine(disp, VRoot.win, gc, x4, y4, x1, y1);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1 + 1, y1 + 1, x2 - 1, y2 - 1);
|
||||
XDrawLine(disp, root.win, gc, x2 + 1, y2 + 1, x3 - 1, y3 - 1);
|
||||
XDrawLine(disp, root.win, gc, x3 + 1, y3 + 1, x4 - 1, y4 - 1);
|
||||
XDrawLine(disp, root.win, gc, x4 + 1, y4 + 1, x1 - 1, y1 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x1 + 1, y1 + 1, x2 - 1, y2 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x2 + 1, y2 + 1, x3 - 1, y3 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x3 + 1, y3 + 1, x4 - 1, y4 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x4 + 1, y4 + 1, x1 - 1, y1 - 1);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1 + 2, y1 + 2, x2 - 2, y2 - 2);
|
||||
XDrawLine(disp, root.win, gc, x2 + 2, y2 + 2, x3 - 2, y3 - 2);
|
||||
XDrawLine(disp, root.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2);
|
||||
XDrawLine(disp, root.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x1 + 2, y1 + 2, x2 - 2, y2 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x2 + 2, y2 + 2, x3 - 2, y3 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -157,20 +157,20 @@ IB_Animate(char iconify, EWin * from, EWin * to)
|
|||
x4 = x - w * (1 - .5 * sin(i * 6.2831853072));
|
||||
y4 = y + h * cos(i * 6.2831853072);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1, y1, x2, y2);
|
||||
XDrawLine(disp, root.win, gc, x2, y2, x3, y3);
|
||||
XDrawLine(disp, root.win, gc, x3, y3, x4, y4);
|
||||
XDrawLine(disp, root.win, gc, x4, y4, x1, y1);
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, x2, y2);
|
||||
XDrawLine(disp, VRoot.win, gc, x2, y2, x3, y3);
|
||||
XDrawLine(disp, VRoot.win, gc, x3, y3, x4, y4);
|
||||
XDrawLine(disp, VRoot.win, gc, x4, y4, x1, y1);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1 + 1, y1 + 1, x2 - 1, y2 - 1);
|
||||
XDrawLine(disp, root.win, gc, x2 + 1, y2 + 1, x3 - 1, y3 - 1);
|
||||
XDrawLine(disp, root.win, gc, x3 + 1, y3 + 1, x4 - 1, y4 - 1);
|
||||
XDrawLine(disp, root.win, gc, x4 + 1, y4 + 1, x1 - 1, y1 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x1 + 1, y1 + 1, x2 - 1, y2 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x2 + 1, y2 + 1, x3 - 1, y3 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x3 + 1, y3 + 1, x4 - 1, y4 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x4 + 1, y4 + 1, x1 - 1, y1 - 1);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1 + 2, y1 + 2, x2 - 2, y2 - 2);
|
||||
XDrawLine(disp, root.win, gc, x2 + 2, y2 + 2, x3 - 2, y3 - 2);
|
||||
XDrawLine(disp, root.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2);
|
||||
XDrawLine(disp, root.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x1 + 2, y1 + 2, x2 - 2, y2 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x2 + 2, y2 + 2, x3 - 2, y3 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2);
|
||||
|
||||
XSync(disp, False);
|
||||
t2 = GetTime();
|
||||
|
@ -178,20 +178,20 @@ IB_Animate(char iconify, EWin * from, EWin * to)
|
|||
t1 = t2;
|
||||
spd = t / IB_ANIM_TIME;
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1, y1, x2, y2);
|
||||
XDrawLine(disp, root.win, gc, x2, y2, x3, y3);
|
||||
XDrawLine(disp, root.win, gc, x3, y3, x4, y4);
|
||||
XDrawLine(disp, root.win, gc, x4, y4, x1, y1);
|
||||
XDrawLine(disp, VRoot.win, gc, x1, y1, x2, y2);
|
||||
XDrawLine(disp, VRoot.win, gc, x2, y2, x3, y3);
|
||||
XDrawLine(disp, VRoot.win, gc, x3, y3, x4, y4);
|
||||
XDrawLine(disp, VRoot.win, gc, x4, y4, x1, y1);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1 + 1, y1 + 1, x2 - 1, y2 - 1);
|
||||
XDrawLine(disp, root.win, gc, x2 + 1, y2 + 1, x3 - 1, y3 - 1);
|
||||
XDrawLine(disp, root.win, gc, x3 + 1, y3 + 1, x4 - 1, y4 - 1);
|
||||
XDrawLine(disp, root.win, gc, x4 + 1, y4 + 1, x1 - 1, y1 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x1 + 1, y1 + 1, x2 - 1, y2 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x2 + 1, y2 + 1, x3 - 1, y3 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x3 + 1, y3 + 1, x4 - 1, y4 - 1);
|
||||
XDrawLine(disp, VRoot.win, gc, x4 + 1, y4 + 1, x1 - 1, y1 - 1);
|
||||
|
||||
XDrawLine(disp, root.win, gc, x1 + 2, y1 + 2, x2 - 2, y2 - 2);
|
||||
XDrawLine(disp, root.win, gc, x2 + 2, y2 + 2, x3 - 2, y3 - 2);
|
||||
XDrawLine(disp, root.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2);
|
||||
XDrawLine(disp, root.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x1 + 2, y1 + 2, x2 - 2, y2 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x2 + 2, y2 + 2, x3 - 2, y3 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2);
|
||||
XDrawLine(disp, VRoot.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2);
|
||||
}
|
||||
}
|
||||
XFreeGC(disp, gc);
|
||||
|
@ -293,13 +293,13 @@ DeIconifyEwin(EWin * ewin)
|
|||
|
||||
dx = ewin->w / 2;
|
||||
dy = ewin->h / 2;
|
||||
x = (ewin->x + dx) % root.w;
|
||||
x = (ewin->x + dx) % VRoot.w;
|
||||
if (x < 0)
|
||||
x += root.w;
|
||||
x += VRoot.w;
|
||||
x -= dx;
|
||||
y = (ewin->y + dy) % root.h;
|
||||
y = (ewin->y + dy) % VRoot.h;
|
||||
if (y < 0)
|
||||
y += root.h;
|
||||
y += VRoot.h;
|
||||
y -= dy;
|
||||
|
||||
dx = x - ewin->x;
|
||||
|
@ -419,7 +419,7 @@ IconboxCreate(char *name)
|
|||
ib->scrollbar_hilited = 0;
|
||||
ib->scrollbar_clicked = 0;
|
||||
ib->scrollbox_clicked = 0;
|
||||
ib->win = ECreateWindow(root.win, 0, 0, 128, 32, 0);
|
||||
ib->win = ECreateWindow(VRoot.win, 0, 0, 128, 32, 0);
|
||||
ib->icon_win = ECreateWindow(ib->win, 0, 0, 128, 26, 0);
|
||||
ib->cover_win = ECreateWindow(ib->win, 0, 0, 128, 26, 0);
|
||||
ib->scroll_win = ECreateWindow(ib->win, 6, 26, 116, 6, 0);
|
||||
|
@ -427,7 +427,7 @@ IconboxCreate(char *name)
|
|||
ib->arrow2_win = ECreateWindow(ib->win, 122, 26, 6, 6, 0);
|
||||
ib->scrollbar_win = ECreateWindow(ib->scroll_win, 122, 26, 6, 6, 0);
|
||||
ib->scrollbarknob_win = ECreateWindow(ib->scrollbar_win, -20, -20, 4, 4, 0);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, 128, 32, root.depth);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, 128, 32, VRoot.depth);
|
||||
XSelectInput(disp, ib->icon_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask | PointerMotionMask);
|
||||
|
@ -625,7 +625,7 @@ IconboxShow(Iconbox * ib)
|
|||
else
|
||||
{
|
||||
MakeWindowSticky(ewin);
|
||||
MoveResizeEwin(ewin, root.w - 160, root.h - h, 160, h);
|
||||
MoveResizeEwin(ewin, VRoot.w - 160, VRoot.h - h, 160, h);
|
||||
}
|
||||
|
||||
ShowEwin(ewin);
|
||||
|
@ -723,7 +723,7 @@ IB_SnapEWin(EWin * ewin)
|
|||
ewin->icon_w = w;
|
||||
ewin->icon_h = h;
|
||||
|
||||
ewin->icon_pmm.pmap = ECreatePixmap(disp, ewin->win, w, h, root.depth);
|
||||
ewin->icon_pmm.pmap = ECreatePixmap(disp, ewin->win, w, h, VRoot.depth);
|
||||
if (ewin->visible)
|
||||
{
|
||||
ScaleRect(ewin->icon_pmm.pmap, ewin->win, 0, 0, 0, 0, ewin->w, ewin->h,
|
||||
|
@ -732,7 +732,7 @@ IB_SnapEWin(EWin * ewin)
|
|||
else
|
||||
{
|
||||
gc = XCreateGC(disp, ewin->icon_pmm.pmap, 0, &gcv);
|
||||
XSetForeground(disp, gc, BlackPixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, ewin->icon_pmm.pmap, gc, 0, 0, w, h);
|
||||
XFreeGC(disp, gc);
|
||||
}
|
||||
|
@ -790,10 +790,10 @@ IB_GetAppIcon(EWin * ewin)
|
|||
ewin->icon_pmm.type = 0;
|
||||
ewin->icon_w = (int)w;
|
||||
ewin->icon_h = (int)h;
|
||||
ewin->icon_pmm.pmap = ECreatePixmap(disp, root.win, w, h, root.depth);
|
||||
ewin->icon_pmm.pmap = ECreatePixmap(disp, VRoot.win, w, h, VRoot.depth);
|
||||
ewin->icon_pmm.mask = 0;
|
||||
if (ewin->client.icon_mask)
|
||||
ewin->icon_pmm.mask = ECreatePixmap(disp, root.win, w, h, 1);
|
||||
ewin->icon_pmm.mask = ECreatePixmap(disp, VRoot.win, w, h, 1);
|
||||
|
||||
if (depth == 1)
|
||||
{
|
||||
|
@ -801,11 +801,11 @@ IB_GetAppIcon(EWin * ewin)
|
|||
XGCValues gcv;
|
||||
|
||||
gc = XCreateGC(disp, ewin->icon_pmm.pmap, 0, &gcv);
|
||||
XSetForeground(disp, gc, WhitePixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, WhitePixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, ewin->icon_pmm.pmap, gc, 0, 0, w, h);
|
||||
XSetClipOrigin(disp, gc, 0, 0);
|
||||
XSetClipMask(disp, gc, ewin->client.icon_pmap);
|
||||
XSetForeground(disp, gc, BlackPixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, ewin->icon_pmm.pmap, gc, 0, 0, w, h);
|
||||
XFreeGC(disp, gc);
|
||||
}
|
||||
|
@ -1195,7 +1195,7 @@ SelectIconboxForEwin(EWin * ewin)
|
|||
dist = (dx * dx) + (dy * dy);
|
||||
if ((!ib[i]->ewin->sticky)
|
||||
&& (ib[i]->ewin->desktop != ewin->desktop))
|
||||
dist += (root.w * root.w) + (root.h * root.h);
|
||||
dist += (VRoot.w * VRoot.w) + (VRoot.h * VRoot.h);
|
||||
if (dist < min_dist)
|
||||
{
|
||||
min_dist = dist;
|
||||
|
@ -2017,19 +2017,19 @@ IconboxRedraw(Iconbox * ib)
|
|||
if (ib->ewin->border)
|
||||
{
|
||||
if ((ib->ewin->border->border.top +
|
||||
ib->ewin->border->border.bottom + add) > root.h)
|
||||
ib->ewin->border->border.bottom + add) > VRoot.h)
|
||||
add =
|
||||
root.h - (ib->ewin->border->border.top +
|
||||
ib->ewin->border->border.bottom);
|
||||
VRoot.h - (ib->ewin->border->border.top +
|
||||
ib->ewin->border->border.bottom);
|
||||
}
|
||||
y += (((ib->ewin->client.h - add) * ib->auto_resize_anchor) >> 10);
|
||||
h = add;
|
||||
if (ib->ewin->border)
|
||||
{
|
||||
if ((ib->ewin->y + ib->ewin->border->border.top +
|
||||
ib->ewin->border->border.bottom + add) > root.h)
|
||||
y = root.h - (ib->ewin->border->border.top +
|
||||
ib->ewin->border->border.bottom + add);
|
||||
ib->ewin->border->border.bottom + add) > VRoot.h)
|
||||
y = VRoot.h - (ib->ewin->border->border.top +
|
||||
ib->ewin->border->border.bottom + add);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2040,19 +2040,19 @@ IconboxRedraw(Iconbox * ib)
|
|||
if (ib->ewin->border)
|
||||
{
|
||||
if ((ib->ewin->border->border.left +
|
||||
ib->ewin->border->border.right + add) > root.w)
|
||||
ib->ewin->border->border.right + add) > VRoot.w)
|
||||
add =
|
||||
root.w - (ib->ewin->border->border.left +
|
||||
ib->ewin->border->border.right);
|
||||
VRoot.w - (ib->ewin->border->border.left +
|
||||
ib->ewin->border->border.right);
|
||||
}
|
||||
x += (((ib->ewin->client.w - add) * ib->auto_resize_anchor) >> 10);
|
||||
w = add;
|
||||
if (ib->ewin->border)
|
||||
{
|
||||
if ((ib->ewin->x + ib->ewin->border->border.left +
|
||||
ib->ewin->border->border.right + add) > root.w)
|
||||
x = root.w - (ib->ewin->border->border.left +
|
||||
ib->ewin->border->border.right + add);
|
||||
ib->ewin->border->border.right + add) > VRoot.w)
|
||||
x = VRoot.w - (ib->ewin->border->border.left +
|
||||
ib->ewin->border->border.right + add);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2065,7 +2065,7 @@ IconboxRedraw(Iconbox * ib)
|
|||
MoveResizeEwin(ib->ewin, x, y, w, h);
|
||||
EResizeWindow(disp, ib->win, w, h);
|
||||
EFreePixmap(disp, ib->pmap);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, w, h, root.depth);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, w, h, VRoot.depth);
|
||||
RememberImportantInfoForEwins(ib->ewin);
|
||||
ib->force_update = 0;
|
||||
}
|
||||
|
|
|
@ -440,7 +440,8 @@ IPC_GeneralInfo(const char *params, Client * c)
|
|||
{
|
||||
if (!strcmp(params, "screen_size"))
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf), "screen_size: %d %d", root.w, root.h);
|
||||
Esnprintf(buf, sizeof(buf), "screen_size: %d %d", VRoot.w,
|
||||
VRoot.h);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -308,7 +308,7 @@ main(int argc, char **argv)
|
|||
ec = FindItem("DEFAULT", 0, LIST_FINDBY_NAME, LIST_TYPE_ECURSOR);
|
||||
if (ec)
|
||||
{
|
||||
ApplyECursor(root.win, ec);
|
||||
ApplyECursor(VRoot.win, ec);
|
||||
ec->ref_count++;
|
||||
ec->inroot = 1;
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ main(int argc, char **argv)
|
|||
Mode.startup = 0;
|
||||
Mode.save_ok = Mode.wm.master;
|
||||
/* ok - paranoia - save current settings to disk */
|
||||
if (root.scr == 0)
|
||||
if (VRoot.scr == 0)
|
||||
autosave();
|
||||
|
||||
/* let's make sure we set this up and go to our desk anyways */
|
||||
|
|
30
src/menus.c
30
src/menus.c
|
@ -284,7 +284,7 @@ MenuShow(Menu * m, char noshow)
|
|||
if ((wx - ((int)w / 2)) < x_origin)
|
||||
wx = x_origin + (int)b->border.left;
|
||||
|
||||
if (Mode.y + (int)mh > (int)root.h)
|
||||
if (Mode.y + (int)mh > (int)VRoot.h)
|
||||
wy = (y_origin + height) - (int)mh - (int)b->border.bottom;
|
||||
else
|
||||
wy = Mode.y - y - ((int)h / 2);
|
||||
|
@ -304,7 +304,7 @@ MenuShow(Menu * m, char noshow)
|
|||
}
|
||||
else if ((Mode.x >= 0) && (Mode.y < 0))
|
||||
{
|
||||
if (((-Mode.y) + (int)mh) > (int)root.h)
|
||||
if (((-Mode.y) + (int)mh) > (int)VRoot.h)
|
||||
Mode.y = -((-Mode.y) - Mode.context_h - mh);
|
||||
if (Conf.menusonscreen)
|
||||
EMoveWindow(disp, m->win, wx, -Mode.y);
|
||||
|
@ -313,7 +313,7 @@ MenuShow(Menu * m, char noshow)
|
|||
}
|
||||
else if ((Mode.x < 0) && (Mode.y >= 0))
|
||||
{
|
||||
if (((-Mode.x) + (int)mw) > (int)root.w)
|
||||
if (((-Mode.x) + (int)mw) > (int)VRoot.w)
|
||||
Mode.x = -((-Mode.x) - Mode.context_w - mw);
|
||||
if (Conf.menusonscreen)
|
||||
EMoveWindow(disp, m->win, -Mode.x, wy);
|
||||
|
@ -322,9 +322,9 @@ MenuShow(Menu * m, char noshow)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (((-Mode.x) + (int)mw) > (int)root.w)
|
||||
if (((-Mode.x) + (int)mw) > (int)VRoot.w)
|
||||
Mode.x = -((-Mode.x) - Mode.context_w - mw);
|
||||
if (((-Mode.y) + (int)mh) > (int)root.h)
|
||||
if (((-Mode.y) + (int)mh) > (int)VRoot.h)
|
||||
Mode.y = -((-Mode.y) - Mode.context_h - mh);
|
||||
EMoveWindow(disp, m->win, -Mode.x, -Mode.y);
|
||||
}
|
||||
|
@ -639,7 +639,7 @@ MenuRealize(Menu * m)
|
|||
EDBUG_RETURN_;
|
||||
|
||||
if (!m->win)
|
||||
m->win = ECreateWindow(root.win, 0, 0, 1, 1, 0);
|
||||
m->win = ECreateWindow(VRoot.win, 0, 0, 1, 1, 0);
|
||||
|
||||
if (m->title)
|
||||
{
|
||||
|
@ -888,7 +888,8 @@ MenuDrawItem(Menu * m, MenuItem * mi, char shape)
|
|||
if (!m->style->use_item_bg)
|
||||
{
|
||||
mi_pmm->type = 0;
|
||||
mi_pmm->pmap = ECreatePixmap(disp, mi->win, w, h, root.depth);
|
||||
mi_pmm->pmap =
|
||||
ECreatePixmap(disp, mi->win, w, h, VRoot.depth);
|
||||
gc = XCreateGC(disp, m->pmm.pmap, 0, &gcv);
|
||||
XCopyArea(disp, m->pmm.pmap, mi_pmm->pmap, gc, x, y, w, h, 0,
|
||||
0);
|
||||
|
@ -1091,7 +1092,7 @@ MenuCreateFromDirectory(const char *name, MenuStyle * ms, const char *dir)
|
|||
imlib_save_image(s2);
|
||||
imlib_free_image_and_decache();
|
||||
|
||||
scr_asp = (root.w << 16) / root.h;
|
||||
scr_asp = (VRoot.w << 16) / VRoot.h;
|
||||
im_asp = (width << 16) / height;
|
||||
if (width == height)
|
||||
{
|
||||
|
@ -1312,7 +1313,7 @@ MenuCreateFromDirectory(const char *name, MenuStyle * ms, const char *dir)
|
|||
imlib_save_image(s2);
|
||||
imlib_free_image_and_decache();
|
||||
|
||||
scr_asp = (root.w << 16) / root.h;
|
||||
scr_asp = (VRoot.w << 16) / VRoot.h;
|
||||
im_asp = (width << 16) / height;
|
||||
if (width == height)
|
||||
{
|
||||
|
@ -2009,7 +2010,8 @@ MenuShowMasker(Menu * m)
|
|||
Window wl[2];
|
||||
|
||||
parent = desks.desk[ewin->desktop].win;
|
||||
Mode.menu_cover_win = ECreateEventWindow(parent, 0, 0, root.w, root.h);
|
||||
Mode.menu_cover_win =
|
||||
ECreateEventWindow(parent, 0, 0, VRoot.w, VRoot.h);
|
||||
Mode.menu_win_covered = ewin->win;
|
||||
wl[0] = Mode.menu_win_covered;
|
||||
wl[1] = Mode.menu_cover_win;
|
||||
|
@ -2593,10 +2595,10 @@ SubmenuShowTimeout(int val, void *dat)
|
|||
int i;
|
||||
int xdist = 0, ydist = 0;
|
||||
|
||||
if (ewin2->x + ewin2->w > root.w)
|
||||
xdist = root.w - (ewin2->x + ewin2->w);
|
||||
if (ewin2->y + ewin2->h > root.h)
|
||||
ydist = root.h - (ewin2->y + ewin2->h);
|
||||
if (ewin2->x + ewin2->w > VRoot.w)
|
||||
xdist = VRoot.w - (ewin2->x + ewin2->w);
|
||||
if (ewin2->y + ewin2->h > VRoot.h)
|
||||
ydist = VRoot.h - (ewin2->y + ewin2->h);
|
||||
if ((xdist != 0) || (ydist != 0))
|
||||
{
|
||||
for (i = 0; i < Mode.cur_menu_depth; i++)
|
||||
|
|
|
@ -152,7 +152,7 @@ EExit(void *code)
|
|||
/* XSetInputFocus(disp, None, RevertToParent, CurrentTime); */
|
||||
/* I think this is a better way to release the grabs: (felix) */
|
||||
XSetInputFocus(disp, PointerRoot, RevertToPointerRoot, CurrentTime);
|
||||
XSelectInput(disp, root.win, 0);
|
||||
XSelectInput(disp, VRoot.win, 0);
|
||||
XCloseDisplay(disp);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ ActionMoveStart(EWin * ewin, const void *params, char constrained, int nogroup)
|
|||
GrabX();
|
||||
}
|
||||
UnGrabTheButtons();
|
||||
GrabConfineThePointer(root.win);
|
||||
GrabConfineThePointer(VRoot.win);
|
||||
SoundPlay("SOUND_MOVE_START");
|
||||
Mode.mode = MODE_MOVE_PENDING;
|
||||
Mode.constrained = constrained;
|
||||
|
@ -274,7 +274,7 @@ ActionResizeStart(EWin * ewin, const void *params, int hv)
|
|||
Mode.queue_up = 0;
|
||||
SoundPlay("SOUND_RESIZE_START");
|
||||
UnGrabTheButtons();
|
||||
GrabConfineThePointer(root.win);
|
||||
GrabConfineThePointer(VRoot.win);
|
||||
switch (hv)
|
||||
{
|
||||
case MODE_RESIZE:
|
||||
|
@ -465,7 +465,7 @@ ActionMoveHandleMotion(void)
|
|||
else
|
||||
ndy = min_dy;
|
||||
screen_snap_dist =
|
||||
Mode.constrained ? (root.w + root.h) : Conf.snap.screen_snap_dist;
|
||||
Mode.constrained ? (VRoot.w + VRoot.h) : Conf.snap.screen_snap_dist;
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
/* jump out of snap horizontally */
|
||||
|
@ -475,13 +475,13 @@ ActionMoveHandleMotion(void)
|
|||
(!(IN_RANGE
|
||||
(gwins[i]->reqx, gwins[i]->x,
|
||||
screen_snap_dist))))
|
||||
|| ((gwins[i]->x == (root.w - gwins[i]->w))
|
||||
|| ((gwins[i]->x == (VRoot.w - gwins[i]->w))
|
||||
&&
|
||||
(!(IN_RANGE
|
||||
(gwins[i]->reqx, gwins[i]->x,
|
||||
screen_snap_dist))))
|
||||
|| ((gwins[i]->x != 0)
|
||||
&& (gwins[i]->x != (root.w - gwins[i]->w)
|
||||
&& (gwins[i]->x != (VRoot.w - gwins[i]->w)
|
||||
&&
|
||||
(!(IN_RANGE
|
||||
(gwins[i]->reqx, gwins[i]->x,
|
||||
|
@ -497,13 +497,13 @@ ActionMoveHandleMotion(void)
|
|||
(!(IN_RANGE
|
||||
(gwins[i]->reqy, gwins[i]->y,
|
||||
screen_snap_dist))))
|
||||
|| ((gwins[i]->y == (root.h - gwins[i]->h))
|
||||
|| ((gwins[i]->y == (VRoot.h - gwins[i]->h))
|
||||
&&
|
||||
(!(IN_RANGE
|
||||
(gwins[i]->reqy, gwins[i]->y,
|
||||
screen_snap_dist))))
|
||||
|| ((gwins[i]->y != 0)
|
||||
&& (gwins[i]->y != (root.h - gwins[i]->h)
|
||||
&& (gwins[i]->y != (VRoot.h - gwins[i]->h)
|
||||
&&
|
||||
(!(IN_RANGE
|
||||
(gwins[i]->reqy, gwins[i]->y,
|
||||
|
|
|
@ -183,8 +183,8 @@ MWM_SetInfo()
|
|||
EDBUG(6, "MWM_SetInfo");
|
||||
a1 = XInternAtom(disp, "_MOTIF_WM_INFO", False);
|
||||
mwminfo.flags = 2;
|
||||
mwminfo.win = root.win;
|
||||
XChangeProperty(disp, root.win, a1, a1, 32, PropModeReplace,
|
||||
mwminfo.win = VRoot.win;
|
||||
XChangeProperty(disp, VRoot.win, a1, a1, 32, PropModeReplace,
|
||||
(unsigned char *)&mwminfo, 2);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
|
126
src/pager.c
126
src/pager.c
|
@ -96,9 +96,9 @@ PagerUpdateTimeout(int val, void *data)
|
|||
yy = cy * hh;
|
||||
phase = p->update_phase;
|
||||
y = ((phase & 0xfffffff8) + offsets[phase % 8]) % hh;
|
||||
y2 = (y * root.h) / hh;
|
||||
y2 = (y * VRoot.h) / hh;
|
||||
|
||||
ScaleLine(p->pmap, root.win, xx, yy + y, root.w, ww, y2, (root.h / hh));
|
||||
ScaleLine(p->pmap, VRoot.win, xx, yy + y, VRoot.w, ww, y2, (VRoot.h / hh));
|
||||
XClearArea(disp, p->win, xx, yy + y, ww, 1, False);
|
||||
|
||||
p->update_phase++;
|
||||
|
@ -186,18 +186,18 @@ PagerCreate(void)
|
|||
GetAreaSize(&ax, &ay);
|
||||
p = Emalloc(sizeof(Pager));
|
||||
p->name = NULL;
|
||||
attr.colormap = root.cmap;
|
||||
attr.colormap = VRoot.cmap;
|
||||
attr.border_pixel = 0;
|
||||
attr.background_pixel = 0;
|
||||
attr.save_under = False;
|
||||
p->w = ((48 * root.w) / root.h) * ax;
|
||||
p->w = ((48 * VRoot.w) / VRoot.h) * ax;
|
||||
p->h = 48 * ay;
|
||||
p->dw = ((48 * root.w) / root.h);
|
||||
p->dw = ((48 * VRoot.w) / VRoot.h);
|
||||
p->dh = 48;
|
||||
p->win = ECreateWindow(root.win, 0, 0, p->w, p->h, 0);
|
||||
p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, root.depth);
|
||||
p->win = ECreateWindow(VRoot.win, 0, 0, p->w, p->h, 0);
|
||||
p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, VRoot.depth);
|
||||
ESetWindowBackgroundPixmap(disp, p->win, p->pmap);
|
||||
p->hi_win = ECreateWindow(root.win, 0, 0, 3, 3, 0);
|
||||
p->hi_win = ECreateWindow(VRoot.win, 0, 0, 3, 3, 0);
|
||||
p->hi_visible = 0;
|
||||
p->hi_ewin = NULL;
|
||||
XSelectInput(disp, p->hi_win,
|
||||
|
@ -245,7 +245,7 @@ PagerEwinMoveResize(EWin * ewin, int resize)
|
|||
p->h = h;
|
||||
p->dw = w / ax;
|
||||
p->dh = h / ay;
|
||||
p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, root.depth);
|
||||
p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, VRoot.depth);
|
||||
if (p->visible)
|
||||
PagerRedraw(p, 1);
|
||||
ESetWindowBackgroundPixmap(disp, p->win, p->pmap);
|
||||
|
@ -254,7 +254,7 @@ PagerEwinMoveResize(EWin * ewin, int resize)
|
|||
{
|
||||
double aspect;
|
||||
|
||||
aspect = ((double)root.w) / ((double)root.h);
|
||||
aspect = ((double)VRoot.w) / ((double)VRoot.h);
|
||||
p->ewin->client.w_inc = ax * 4;
|
||||
p->ewin->client.h_inc = ay * 8;
|
||||
p->ewin->client.aspect_min = aspect * ((double)ax / (double)ay);
|
||||
|
@ -348,7 +348,7 @@ PagerShow(Pager * p)
|
|||
XSelectInput(disp, p->win, ewin->client.event_mask);
|
||||
#endif
|
||||
|
||||
aspect = ((double)root.w) / ((double)root.h);
|
||||
aspect = ((double)VRoot.w) / ((double)VRoot.h);
|
||||
GetAreaSize(&ax, &ay);
|
||||
ewin->client.aspect_min = aspect * ((double)ax / (double)ay);
|
||||
ewin->client.aspect_max = aspect * ((double)ax / (double)ay);
|
||||
|
@ -375,8 +375,8 @@ PagerShow(Pager * p)
|
|||
else
|
||||
{
|
||||
/* no snapshots ? first time ? make a row on the bottom left up */
|
||||
MoveResizeEwin(ewin, 0, root.h - (Conf.desks.num -
|
||||
p->desktop) * ewin->h, w, h);
|
||||
MoveResizeEwin(ewin, 0, VRoot.h - (Conf.desks.num -
|
||||
p->desktop) * ewin->h, w, h);
|
||||
}
|
||||
PagerRedraw(p, 1);
|
||||
|
||||
|
@ -512,8 +512,8 @@ PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
|||
cx = desks.desk[p->desktop].current_area_x;
|
||||
cy = desks.desk[p->desktop].current_area_y;
|
||||
|
||||
w = ((ewin->w) * (p->w / ax)) / root.w;
|
||||
h = ((ewin->h) * (p->h / ay)) / root.h;
|
||||
w = ((ewin->w) * (p->w / ax)) / VRoot.w;
|
||||
h = ((ewin->h) * (p->h / ay)) / VRoot.h;
|
||||
|
||||
if (w < 1)
|
||||
w = 1;
|
||||
|
@ -540,7 +540,7 @@ PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
|||
{
|
||||
ewin->mini_pmm.type = 0;
|
||||
ewin->mini_pmm.pmap =
|
||||
ECreatePixmap(disp, p->win, w, h, root.depth);
|
||||
ECreatePixmap(disp, p->win, w, h, VRoot.depth);
|
||||
ScaleRect(ewin->mini_pmm.pmap, ewin->win, 0, 0, 0, 0, ewin->w,
|
||||
ewin->h, w, h);
|
||||
}
|
||||
|
@ -568,10 +568,10 @@ PagerEwinUpdateFromPager(Pager * p, EWin * ewin)
|
|||
GetAreaSize(&ax, &ay);
|
||||
cx = desks.desk[p->desktop].current_area_x;
|
||||
cy = desks.desk[p->desktop].current_area_y;
|
||||
x = ((ewin->x + (cx * root.w)) * (p->w / ax)) / root.w;
|
||||
y = ((ewin->y + (cy * root.h)) * (p->h / ay)) / root.h;
|
||||
w = ((ewin->w) * (p->w / ax)) / root.w;
|
||||
h = ((ewin->h) * (p->h / ay)) / root.h;
|
||||
x = ((ewin->x + (cx * VRoot.w)) * (p->w / ax)) / VRoot.w;
|
||||
y = ((ewin->y + (cy * VRoot.h)) * (p->h / ay)) / VRoot.h;
|
||||
w = ((ewin->w) * (p->w / ax)) / VRoot.w;
|
||||
h = ((ewin->h) * (p->h / ay)) / VRoot.h;
|
||||
if (!gc)
|
||||
gc = XCreateGC(disp, p->pmap, 0, &gcv);
|
||||
|
||||
|
@ -583,7 +583,7 @@ PagerEwinUpdateFromPager(Pager * p, EWin * ewin)
|
|||
ewin->mini_w = w;
|
||||
ewin->mini_h = h;
|
||||
ewin->mini_pmm.type = 0;
|
||||
ewin->mini_pmm.pmap = ECreatePixmap(disp, p->win, w, h, root.depth);
|
||||
ewin->mini_pmm.pmap = ECreatePixmap(disp, p->win, w, h, VRoot.depth);
|
||||
}
|
||||
XCopyArea(disp, p->pmap, ewin->mini_pmm.pmap, gc, x, y, w, h, 0, 0);
|
||||
|
||||
|
@ -689,7 +689,7 @@ PagerRedraw(Pager * p, char newbg)
|
|||
p->bgpmap.type = 0;
|
||||
p->bgpmap.pmap =
|
||||
ECreatePixmap(disp, p->win, p->w / ax, p->h / ay,
|
||||
root.depth);
|
||||
VRoot.depth);
|
||||
p->bgpmap.mask = None;
|
||||
BackgroundApply(desks.desk[p->desktop].bg,
|
||||
p->bgpmap.pmap, 0);
|
||||
|
@ -709,12 +709,12 @@ PagerRedraw(Pager * p, char newbg)
|
|||
p->bgpmap.type = 0;
|
||||
p->bgpmap.pmap =
|
||||
ECreatePixmap(disp, p->win, p->w / ax, p->h / ay,
|
||||
root.depth);
|
||||
VRoot.depth);
|
||||
p->bgpmap.mask = None;
|
||||
XSetForeground(disp, gc, BlackPixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
|
||||
XDrawRectangle(disp, p->bgpmap.pmap, gc, 0, 0, p->dw,
|
||||
p->dh);
|
||||
XSetForeground(disp, gc, WhitePixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, WhitePixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, p->bgpmap.pmap, gc, 1, 1, p->dw - 2,
|
||||
p->dh - 2);
|
||||
}
|
||||
|
@ -737,10 +737,10 @@ PagerRedraw(Pager * p, char newbg)
|
|||
ewin = lst[i];
|
||||
if (!ewin->iconified && ewin->visible)
|
||||
{
|
||||
wx = ((ewin->x + (cx * root.w)) * (p->w / ax)) / root.w;
|
||||
wy = ((ewin->y + (cy * root.h)) * (p->h / ay)) / root.h;
|
||||
ww = ((ewin->w) * (p->w / ax)) / root.w;
|
||||
wh = ((ewin->h) * (p->h / ay)) / root.h;
|
||||
wx = ((ewin->x + (cx * VRoot.w)) * (p->w / ax)) / VRoot.w;
|
||||
wy = ((ewin->y + (cy * VRoot.h)) * (p->h / ay)) / VRoot.h;
|
||||
ww = ((ewin->w) * (p->w / ax)) / VRoot.w;
|
||||
wh = ((ewin->h) * (p->h / ay)) / VRoot.h;
|
||||
PagerEwinUpdateMini(p, ewin);
|
||||
if (ewin->mini_pmm.pmap)
|
||||
{
|
||||
|
@ -756,10 +756,10 @@ PagerRedraw(Pager * p, char newbg)
|
|||
}
|
||||
else
|
||||
{
|
||||
XSetForeground(disp, gc, BlackPixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
|
||||
XDrawRectangle(disp, p->pmap, gc, wx - 1, wy - 1, ww + 1,
|
||||
wh + 1);
|
||||
XSetForeground(disp, gc, WhitePixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, WhitePixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, p->pmap, gc, wx, wy, ww, wh);
|
||||
}
|
||||
}
|
||||
|
@ -826,7 +826,7 @@ PagerForceUpdate(Pager * p)
|
|||
xx = cx * ww;
|
||||
yy = cy * hh;
|
||||
|
||||
ScaleRect(p->pmap, root.win, 0, 0, xx, yy, root.w, root.h, ww, hh);
|
||||
ScaleRect(p->pmap, VRoot.win, 0, 0, xx, yy, VRoot.w, VRoot.h, ww, hh);
|
||||
XClearWindow(disp, p->win);
|
||||
|
||||
lst = EwinListGetForDesktop(p->desktop, &num);
|
||||
|
@ -855,7 +855,7 @@ PagerReArea(void)
|
|||
{
|
||||
double aspect;
|
||||
|
||||
aspect = ((double)root.w) / ((double)root.h);
|
||||
aspect = ((double)VRoot.w) / ((double)VRoot.h);
|
||||
pl[i]->ewin->client.w_inc = ax * 4;
|
||||
pl[i]->ewin->client.h_inc = ay * 8;
|
||||
pl[i]->ewin->client.aspect_min =
|
||||
|
@ -892,8 +892,8 @@ PagerEwinOutsideAreaUpdate(EWin * ewin)
|
|||
return;
|
||||
}
|
||||
|
||||
if ((ewin->x < 0) || (ewin->y < 0) || ((ewin->x + ewin->w) > root.w)
|
||||
|| ((ewin->y + ewin->h) > root.h))
|
||||
if ((ewin->x < 0) || (ewin->y < 0) || ((ewin->x + ewin->w) > VRoot.w)
|
||||
|| ((ewin->y + ewin->h) > VRoot.h))
|
||||
RedrawPagersForDesktop(ewin->desktop, 3);
|
||||
ForceUpdatePagersForDesktop(ewin->desktop);
|
||||
}
|
||||
|
@ -919,10 +919,10 @@ EwinInPagerAt(Pager * p, int x, int y)
|
|||
ewin = lst[i];
|
||||
if ((ewin->visible) && (!ewin->iconified))
|
||||
{
|
||||
wx = ((ewin->x + (cx * root.w)) * (p->w / ax)) / root.w;
|
||||
wy = ((ewin->y + (cy * root.h)) * (p->h / ay)) / root.h;
|
||||
ww = ((ewin->w) * (p->w / ax)) / root.w;
|
||||
wh = ((ewin->h) * (p->h / ay)) / root.h;
|
||||
wx = ((ewin->x + (cx * VRoot.w)) * (p->w / ax)) / VRoot.w;
|
||||
wy = ((ewin->y + (cy * VRoot.h)) * (p->h / ay)) / VRoot.h;
|
||||
ww = ((ewin->w) * (p->w / ax)) / VRoot.w;
|
||||
wh = ((ewin->h) * (p->h / ay)) / VRoot.h;
|
||||
if ((x >= wx) && (y >= wy) && (x < (wx + ww)) && (y < (wy + wh)))
|
||||
return ewin;
|
||||
}
|
||||
|
@ -1282,7 +1282,7 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
XGCValues gcv;
|
||||
int xx, yy, ww, hh, i;
|
||||
|
||||
pmap = ECreatePixmap(disp, p->hi_win, w * 2, h * 2, root.depth);
|
||||
pmap = ECreatePixmap(disp, p->hi_win, w * 2, h * 2, VRoot.depth);
|
||||
ESetWindowBackgroundPixmap(disp, p->hi_win, pmap);
|
||||
if (!gc)
|
||||
gc = XCreateGC(disp, pmap, 0, &gcv);
|
||||
|
@ -1294,9 +1294,9 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
hh = (i * h) / w;
|
||||
xx = x + ((w - ww) / 2);
|
||||
yy = y + ((h - hh) / 2);
|
||||
XSetForeground(disp, gc, BlackPixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, pmap, gc, 0, 0, ww, hh);
|
||||
XSetForeground(disp, gc, WhitePixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, WhitePixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, pmap, gc, 1, 1, ww - 2, hh - 2);
|
||||
EMoveResizeWindow(disp, p->hi_win, xx, yy, ww, hh);
|
||||
XClearWindow(disp, p->hi_win);
|
||||
|
@ -1322,9 +1322,9 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
hh = i;
|
||||
xx = x + ((w - ww) / 2);
|
||||
yy = y + ((h - hh) / 2);
|
||||
XSetForeground(disp, gc, BlackPixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, pmap, gc, 0, 0, ww, hh);
|
||||
XSetForeground(disp, gc, WhitePixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, WhitePixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, pmap, gc, 1, 1, ww - 2, hh - 2);
|
||||
EMoveResizeWindow(disp, p->hi_win, xx, yy, ww, hh);
|
||||
XClearWindow(disp, p->hi_win);
|
||||
|
@ -1397,11 +1397,11 @@ PagerHandleMotion(Pager * p, Window win, int x, int y, int in)
|
|||
GetAreaSize(&ax, &ay);
|
||||
cx = desks.desk[p->desktop].current_area_x;
|
||||
cy = desks.desk[p->desktop].current_area_y;
|
||||
wx = ((ewin->x + (cx * root.w)) * (p->w / ax)) / root.w;
|
||||
wy = ((ewin->y + (cy * root.h)) * (p->h / ay)) / root.h;
|
||||
ww = ((ewin->w) * (p->w / ax)) / root.w;
|
||||
wh = ((ewin->h) * (p->h / ay)) / root.h;
|
||||
XTranslateCoordinates(disp, p->win, root.win, 0, 0, &px, &py, &cw);
|
||||
wx = ((ewin->x + (cx * VRoot.w)) * (p->w / ax)) / VRoot.w;
|
||||
wy = ((ewin->y + (cy * VRoot.h)) * (p->h / ay)) / VRoot.h;
|
||||
ww = ((ewin->w) * (p->w / ax)) / VRoot.w;
|
||||
wh = ((ewin->h) * (p->h / ay)) / VRoot.h;
|
||||
XTranslateCoordinates(disp, p->win, VRoot.win, 0, 0, &px, &py, &cw);
|
||||
PagerShowHi(p, ewin, px + wx, py + wy, ww, wh);
|
||||
PagerShowTt(ewin);
|
||||
}
|
||||
|
@ -1672,11 +1672,12 @@ PagersEventMotion(XEvent * ev)
|
|||
x += dx;
|
||||
y += dy;
|
||||
EMoveWindow(disp, p->hi_win, x, y);
|
||||
XTranslateCoordinates(disp, p->win, root.win, 0, 0, &px, &py, &dw);
|
||||
XTranslateCoordinates(disp, p->win, VRoot.win, 0, 0, &px, &py,
|
||||
&dw);
|
||||
x -= px + (cx * (p->w / ax));
|
||||
y -= py + (cy * (p->h / ay));
|
||||
MoveEwin(p->hi_ewin, (x * root.w * ax) / p->w,
|
||||
(y * root.h * ay) / p->h);
|
||||
MoveEwin(p->hi_ewin, (x * VRoot.w * ax) / p->w,
|
||||
(y * VRoot.h * ay) / p->h);
|
||||
}
|
||||
|
||||
gwins =
|
||||
|
@ -1688,8 +1689,8 @@ PagersEventMotion(XEvent * ev)
|
|||
&& (!gwins[i]->fixedpos))
|
||||
{
|
||||
GetWinXY(gwins[i]->win, &x, &y);
|
||||
x += (dx * root.w * ax) / p->w;
|
||||
y += (dy * root.h * ay) / p->h;
|
||||
x += (dx * VRoot.w * ax) / p->w;
|
||||
y += (dy * VRoot.h * ay) / p->h;
|
||||
MoveEwin(gwins[i], x, y);
|
||||
}
|
||||
}
|
||||
|
@ -1758,11 +1759,12 @@ PagersEventMouseDown(XEvent * ev)
|
|||
GetAreaSize(&ax, &ay);
|
||||
cx = desks.desk[p->desktop].current_area_x;
|
||||
cy = desks.desk[p->desktop].current_area_y;
|
||||
wx = ((ewin->x + (cx * root.w)) * (p->w / ax)) / root.w;
|
||||
wy = ((ewin->y + (cy * root.h)) * (p->h / ay)) / root.h;
|
||||
ww = ((ewin->w) * (p->w / ax)) / root.w;
|
||||
wh = ((ewin->h) * (p->h / ay)) / root.h;
|
||||
XTranslateCoordinates(disp, p->win, root.win, 0, 0, &px, &py, &dw);
|
||||
wx = ((ewin->x + (cx * VRoot.w)) * (p->w / ax)) / VRoot.w;
|
||||
wy = ((ewin->y + (cy * VRoot.h)) * (p->h / ay)) / VRoot.h;
|
||||
ww = ((ewin->w) * (p->w / ax)) / VRoot.w;
|
||||
wh = ((ewin->h) * (p->h / ay)) / VRoot.h;
|
||||
XTranslateCoordinates(disp, p->win, VRoot.win, 0, 0, &px, &py,
|
||||
&dw);
|
||||
EMoveResizeWindow(disp, p->hi_win, px + wx, py + wy, ww, wh);
|
||||
ESetWindowBackgroundPixmap(disp, p->hi_win, ewin->mini_pmm.pmap);
|
||||
EMapRaised(disp, p->hi_win);
|
||||
|
@ -1851,12 +1853,12 @@ PagersEventMouseUp(XEvent * ev)
|
|||
GetAreaSize(&ax, &ay);
|
||||
GetWinXY(p->hi_win, &x, &y);
|
||||
GetWinWH(p->hi_win, &w, &h);
|
||||
XTranslateCoordinates(disp, pp->win, root.win, 0, 0, &px,
|
||||
XTranslateCoordinates(disp, pp->win, VRoot.win, 0, 0, &px,
|
||||
&py, &dw);
|
||||
wx = ((x - px) -
|
||||
(cx * (pp->w / ax))) * (root.w / (pp->w / ax));
|
||||
(cx * (pp->w / ax))) * (VRoot.w / (pp->w / ax));
|
||||
wy = ((y - py) -
|
||||
(cy * (pp->h / ay))) * (root.h / (pp->h / ay));
|
||||
(cy * (pp->h / ay))) * (VRoot.h / (pp->h / ay));
|
||||
if (((x + w) <= px) || ((y + h) <= py)
|
||||
|| (x >= (px + pp->w)) || (y >= (py + pp->h)))
|
||||
{
|
||||
|
|
|
@ -38,15 +38,15 @@ CreateProgressbar(char *name, int width, int height)
|
|||
plist = Erealloc(plist, pnum * sizeof(Progressbar *));
|
||||
plist[pnum - 1] = p;
|
||||
p->name = Estrdup(name);
|
||||
p->x = (root.w - width) / 2;
|
||||
p->x = (VRoot.w - width) / 2;
|
||||
p->y = 32 + (pnum * height * 2);
|
||||
p->w = width;
|
||||
p->h = height;
|
||||
p->win = ECreateWindow(root.win, p->x, p->y, p->w - (p->h * 5), p->h, 1);
|
||||
p->win = ECreateWindow(VRoot.win, p->x, p->y, p->w - (p->h * 5), p->h, 1);
|
||||
p->n_win =
|
||||
ECreateWindow(root.win, p->x + p->w - (p->h * 5), p->y, (p->h * 5),
|
||||
ECreateWindow(VRoot.win, p->x + p->w - (p->h * 5), p->y, (p->h * 5),
|
||||
p->h, 1);
|
||||
p->p_win = ECreateWindow(root.win, p->x, p->y + p->h, 1, p->h, 1);
|
||||
p->p_win = ECreateWindow(VRoot.win, p->x, p->y + p->h, 1, p->h, 1);
|
||||
/* FIXME: need to use other image and textclasses */
|
||||
|
||||
p->ic = FindItem("PROGRESS_BAR", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS);
|
||||
|
|
|
@ -49,8 +49,8 @@ ScreenGetGeometry(int xi, int yi, int *px, int *py, int *pw, int *ph)
|
|||
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = root.w;
|
||||
h = root.h;
|
||||
w = VRoot.w;
|
||||
h = VRoot.h;
|
||||
|
||||
#ifdef HAS_XINERAMA
|
||||
if (xinerama_active)
|
||||
|
@ -96,7 +96,8 @@ GetPointerScreenGeometry(int *px, int *py, int *pw, int *ph)
|
|||
int d;
|
||||
unsigned int ud;
|
||||
|
||||
XQueryPointer(disp, root.win, &rt, &ch, &pointer_x, &pointer_y, &d, &d, &ud);
|
||||
XQueryPointer(disp, VRoot.win, &rt, &ch, &pointer_x, &pointer_y, &d, &d,
|
||||
&ud);
|
||||
|
||||
return ScreenGetGeometry(pointer_x, pointer_y, px, py, pw, ph);
|
||||
}
|
||||
|
|
|
@ -231,8 +231,8 @@ SaveWindowStates(void)
|
|||
y = 0;
|
||||
if (!ewin->sticky)
|
||||
{
|
||||
x = desks.desk[ewin->desktop].current_area_x * root.w;
|
||||
y = desks.desk[ewin->desktop].current_area_y * root.h;
|
||||
x = desks.desk[ewin->desktop].current_area_x * VRoot.w;
|
||||
y = desks.desk[ewin->desktop].current_area_y * VRoot.h;
|
||||
}
|
||||
fprintf(f, "[CLIENT] %i %i %i %i %i %i %i %i %i\n",
|
||||
ewin->x + x, ewin->y + y, ewin->client.w,
|
||||
|
@ -252,7 +252,7 @@ SaveWindowStates(void)
|
|||
}
|
||||
fclose(f);
|
||||
|
||||
Esnprintf(ss, sizeof(ss), "%s.clients.%i", GetSMFile(), root.scr);
|
||||
Esnprintf(ss, sizeof(ss), "%s.clients.%i", GetSMFile(), VRoot.scr);
|
||||
if (EventDebug(EDBUG_TYPE_SESSION))
|
||||
Eprintf("SaveWindowStates: %s\n", ss);
|
||||
E_mv(s, ss);
|
||||
|
@ -270,7 +270,7 @@ LoadWindowStates(void)
|
|||
FILE *f;
|
||||
char s[4096], s1[4096];
|
||||
|
||||
Esnprintf(s, sizeof(s), "%s.clients.%i", GetSMFile(), root.scr);
|
||||
Esnprintf(s, sizeof(s), "%s.clients.%i", GetSMFile(), VRoot.scr);
|
||||
f = fopen(s, "r");
|
||||
if (f)
|
||||
{
|
||||
|
@ -408,9 +408,9 @@ MatchEwinToSM(EWin * ewin)
|
|||
if (!((ewin->client.already_placed) && (ewin->session_id)))
|
||||
{
|
||||
ewin->client.x = matches[i].x -
|
||||
(desks.desk[ewin->desktop].current_area_x * root.w);
|
||||
(desks.desk[ewin->desktop].current_area_x * VRoot.w);
|
||||
ewin->client.y = matches[i].y -
|
||||
(desks.desk[ewin->desktop].current_area_y * root.h);
|
||||
(desks.desk[ewin->desktop].current_area_y * VRoot.h);
|
||||
ewin->client.w = matches[i].w;
|
||||
ewin->client.h = matches[i].h;
|
||||
EMoveResizeWindow(disp, ewin->client.win, ewin->client.x,
|
||||
|
|
|
@ -1073,7 +1073,7 @@ CB_DesktopDisplayRedraw(int val, void *data)
|
|||
{
|
||||
Pixmap pmap;
|
||||
|
||||
pmap = ECreatePixmap(disp, wins[i], 64, 48, root.depth);
|
||||
pmap = ECreatePixmap(disp, wins[i], 64, 48, VRoot.depth);
|
||||
ESetWindowBackgroundPixmap(disp, wins[i], pmap);
|
||||
BackgroundApply(desks.desk[i].bg, pmap, 0);
|
||||
EFreePixmap(disp, pmap);
|
||||
|
@ -2482,7 +2482,7 @@ CB_ConfigureBG(int val, void *data)
|
|||
|
||||
Esnprintf(s, sizeof(s), "%s/cached/bgsel/%s", EDirUserCache(),
|
||||
tmp_bg->name);
|
||||
p2 = ECreatePixmap(disp, root.win, 64, 48, root.depth);
|
||||
p2 = ECreatePixmap(disp, VRoot.win, 64, 48, VRoot.depth);
|
||||
BackgroundApply(tmp_bg, p2, 0);
|
||||
imlib_context_set_drawable(p2);
|
||||
im = imlib_create_image_from_drawable(0, 0, 0, 64, 48, 0);
|
||||
|
@ -2532,7 +2532,7 @@ CB_DesktopMiniDisplayRedraw(int val, void *data)
|
|||
tmp_bg->top.yjust, tmp_bg->top.xperc,
|
||||
tmp_bg->top.yperc);
|
||||
|
||||
pmap = ECreatePixmap(disp, win, w, h, root.depth);
|
||||
pmap = ECreatePixmap(disp, win, w, h, VRoot.depth);
|
||||
ESetWindowBackgroundPixmap(disp, win, pmap);
|
||||
BackgroundApply(bg, pmap, 0);
|
||||
XClearWindow(disp, win);
|
||||
|
@ -2747,9 +2747,9 @@ BG_RedrawView(char nuke_old)
|
|||
if (!bglist)
|
||||
goto done;
|
||||
|
||||
pmap = ECreatePixmap(disp, win, w, h, root.depth);
|
||||
pmap = ECreatePixmap(disp, win, w, h, VRoot.depth);
|
||||
gc = XCreateGC(disp, pmap, 0, &gcv);
|
||||
XSetForeground(disp, gc, BlackPixel(disp, root.scr));
|
||||
XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, pmap, gc, 0, 0, w, h);
|
||||
ESetWindowBackgroundPixmap(disp, win, pmap);
|
||||
x = -(tmp_bg_sel_sliderval * (64 + 8) / 4);
|
||||
|
@ -2807,7 +2807,7 @@ BG_RedrawView(char nuke_old)
|
|||
{
|
||||
Esnprintf(s, sizeof(s), "%s/cached/bgsel/%s",
|
||||
EDirUserCache(), bglist[i]->name);
|
||||
p2 = ECreatePixmap(disp, pmap, 64, 48, root.depth);
|
||||
p2 = ECreatePixmap(disp, pmap, 64, 48, VRoot.depth);
|
||||
BackgroundApply(bglist[i], p2, 0);
|
||||
XCopyArea(disp, p2, pmap, gc, 0, 0, 64, 48, x + 4, 4);
|
||||
imlib_context_set_drawable(p2);
|
||||
|
|
60
src/setup.c
60
src/setup.c
|
@ -45,7 +45,7 @@ MapUnmap(int start)
|
|||
switch (start)
|
||||
{
|
||||
case 0:
|
||||
XQueryTree(disp, root.win, &rt, &par, &wlist, &num);
|
||||
XQueryTree(disp, VRoot.win, &rt, &par, &wlist, &num);
|
||||
if (wlist)
|
||||
{
|
||||
for (i = 0; i < (int)num; i++)
|
||||
|
@ -140,10 +140,10 @@ SetupX(void)
|
|||
EExit((void *)1);
|
||||
}
|
||||
|
||||
root.scr = DefaultScreen(disp);
|
||||
VRoot.scr = DefaultScreen(disp);
|
||||
Mode.display.screens = ScreenCount(disp);
|
||||
|
||||
Mode.wm.master_screen = root.scr;
|
||||
Mode.wm.master_screen = VRoot.scr;
|
||||
|
||||
/* Start up on multiple heads, if appropriate */
|
||||
if ((Mode.display.screens > 1) && (!Mode.wm.single))
|
||||
|
@ -160,7 +160,7 @@ SetupX(void)
|
|||
{
|
||||
pid_t pid;
|
||||
|
||||
if (i == root.scr)
|
||||
if (i == VRoot.scr)
|
||||
continue;
|
||||
|
||||
pid = fork();
|
||||
|
@ -176,7 +176,7 @@ SetupX(void)
|
|||
{
|
||||
/* We are a slave */
|
||||
Mode.wm.master = 0;
|
||||
root.scr = i;
|
||||
VRoot.scr = i;
|
||||
#ifdef SIGSTOP
|
||||
kill(getpid(), SIGSTOP);
|
||||
#endif
|
||||
|
@ -205,13 +205,13 @@ SetupX(void)
|
|||
XSetIOErrorHandler((XIOErrorHandler) HandleXIOError);
|
||||
|
||||
/* Root defaults */
|
||||
root.scr = DefaultScreen(disp);
|
||||
root.win = DefaultRootWindow(disp);
|
||||
root.vis = DefaultVisual(disp, root.scr);
|
||||
root.depth = DefaultDepth(disp, root.scr);
|
||||
root.cmap = DefaultColormap(disp, root.scr);
|
||||
root.w = DisplayWidth(disp, root.scr);
|
||||
root.h = DisplayHeight(disp, root.scr);
|
||||
VRoot.scr = DefaultScreen(disp);
|
||||
VRoot.win = DefaultRootWindow(disp);
|
||||
VRoot.vis = DefaultVisual(disp, VRoot.scr);
|
||||
VRoot.depth = DefaultDepth(disp, VRoot.scr);
|
||||
VRoot.cmap = DefaultColormap(disp, VRoot.scr);
|
||||
VRoot.w = DisplayWidth(disp, VRoot.scr);
|
||||
VRoot.h = DisplayHeight(disp, VRoot.scr);
|
||||
|
||||
/* initialise imlib */
|
||||
#if USE_IMLIB2
|
||||
|
@ -222,8 +222,8 @@ SetupX(void)
|
|||
imlib_context_set_dither(1);
|
||||
|
||||
imlib_context_set_display(disp);
|
||||
imlib_context_set_visual(root.vis);
|
||||
imlib_context_set_colormap(root.cmap);
|
||||
imlib_context_set_visual(VRoot.vis);
|
||||
imlib_context_set_colormap(VRoot.cmap);
|
||||
imlib_context_set_dither_mask(0);
|
||||
#else
|
||||
pImlib_Context = Imlib_init(disp);
|
||||
|
@ -249,17 +249,17 @@ SetupX(void)
|
|||
EExit((void *)1);
|
||||
}
|
||||
#endif
|
||||
root.win = pImlib_Context->x.root;
|
||||
root.vis = Imlib_get_visual(pImlib_Context);
|
||||
root.depth = pImlib_Context->x.depth;
|
||||
root.cmap = Imlib_get_colormap(pImlib_Context);
|
||||
VRoot.win = pImlib_Context->x.root;
|
||||
VRoot.vis = Imlib_get_visual(pImlib_Context);
|
||||
VRoot.depth = pImlib_Context->x.depth;
|
||||
VRoot.cmap = Imlib_get_colormap(pImlib_Context);
|
||||
/* warn, if necessary about visual problems */
|
||||
if (DefaultVisual(disp, root.scr) != root.vis)
|
||||
if (DefaultVisual(disp, VRoot.scr) != VRoot.vis)
|
||||
{
|
||||
ImlibInitParams p;
|
||||
|
||||
p.flags = PARAMS_VISUALID;
|
||||
p.visualid = XVisualIDFromVisual(DefaultVisual(disp, root.scr));
|
||||
p.visualid = XVisualIDFromVisual(DefaultVisual(disp, VRoot.scr));
|
||||
prImlib_Context = Imlib_init_with_params(disp, &p);
|
||||
}
|
||||
else
|
||||
|
@ -279,7 +279,7 @@ SetupX(void)
|
|||
|
||||
/* select all the root window events to start managing */
|
||||
Mode.xselect = 1;
|
||||
XSelectInput(disp, root.win,
|
||||
XSelectInput(disp, VRoot.win,
|
||||
ButtonPressMask | ButtonReleaseMask | EnterWindowMask |
|
||||
LeaveWindowMask | ButtonMotionMask | PropertyChangeMask |
|
||||
SubstructureRedirectMask | KeyPressMask | KeyReleaseMask |
|
||||
|
@ -595,7 +595,7 @@ MakeExtInitWin(void)
|
|||
sleep(1);
|
||||
|
||||
puc = NULL;
|
||||
XGetWindowProperty(disp, root.win, a, 0, 0x7fffffff, True,
|
||||
XGetWindowProperty(disp, VRoot.win, a, 0, 0x7fffffff, True,
|
||||
XA_CARDINAL, &aa, &format_ret, &num_ret,
|
||||
&bytes_after, &puc);
|
||||
XSync(disp, False);
|
||||
|
@ -640,25 +640,25 @@ MakeExtInitWin(void)
|
|||
IMLIB1_SET_CONTEXT(0);
|
||||
attr.backing_store = NotUseful;
|
||||
attr.override_redirect = True;
|
||||
attr.colormap = root.cmap;
|
||||
attr.colormap = VRoot.cmap;
|
||||
attr.border_pixel = 0;
|
||||
attr.background_pixel = 0;
|
||||
attr.save_under = True;
|
||||
win = XCreateWindow(d2, root.win, 0, 0, root.w, root.h, 0, root.depth,
|
||||
InputOutput, root.vis,
|
||||
win = XCreateWindow(d2, VRoot.win, 0, 0, VRoot.w, VRoot.h, 0, VRoot.depth,
|
||||
InputOutput, VRoot.vis,
|
||||
CWOverrideRedirect | CWSaveUnder | CWBackingStore |
|
||||
CWColormap | CWBackPixel | CWBorderPixel, &attr);
|
||||
pmap = ECreatePixmap(d2, win, root.w, root.h, root.depth);
|
||||
pmap = ECreatePixmap(d2, win, VRoot.w, VRoot.h, VRoot.depth);
|
||||
gcv.subwindow_mode = IncludeInferiors;
|
||||
gc = XCreateGC(d2, win, GCSubwindowMode, &gcv);
|
||||
XCopyArea(d2, root.win, pmap, gc, 0, 0, root.w, root.h, 0, 0);
|
||||
XCopyArea(d2, VRoot.win, pmap, gc, 0, 0, VRoot.w, VRoot.h, 0, 0);
|
||||
ESetWindowBackgroundPixmap(d2, win, pmap);
|
||||
EMapRaised(d2, win);
|
||||
EFreePixmap(d2, pmap);
|
||||
XFreeGC(d2, gc);
|
||||
val = win;
|
||||
a = XInternAtom(d2, "ENLIGHTENMENT_RESTART_SCREEN", False);
|
||||
XChangeProperty(d2, root.win, a, XA_CARDINAL, 32, PropModeReplace,
|
||||
XChangeProperty(d2, VRoot.win, a, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&val, 1);
|
||||
XSelectInput(d2, win, StructureNotifyMask);
|
||||
XUngrabServer(d2);
|
||||
|
@ -697,8 +697,8 @@ MakeExtInitWin(void)
|
|||
Cursor cs = 0;
|
||||
XColor cl;
|
||||
|
||||
w2 = XCreateWindow(d2, win, 0, 0, 32, 32, 0, root.depth, InputOutput,
|
||||
root.vis,
|
||||
w2 = XCreateWindow(d2, win, 0, 0, 32, 32, 0, VRoot.depth, InputOutput,
|
||||
VRoot.vis,
|
||||
CWOverrideRedirect | CWBackingStore | CWColormap |
|
||||
CWBackPixel | CWBorderPixel, &attr);
|
||||
pmap = ECreatePixmap(d2, w2, 16, 16, 1);
|
||||
|
|
|
@ -76,13 +76,13 @@ MaxSizeHV(EWin * ewin, const char *resize_type, int direction)
|
|||
if (direction & MAX_HOR)
|
||||
{
|
||||
x = 0;
|
||||
w = root.w - ewin->border->border.left -
|
||||
w = VRoot.w - ewin->border->border.left -
|
||||
ewin->border->border.right;
|
||||
}
|
||||
if (direction & MAX_VER)
|
||||
{
|
||||
y = 0;
|
||||
h = root.h - ewin->border->border.top -
|
||||
h = VRoot.h - ewin->border->border.top -
|
||||
ewin->border->border.bottom;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -95,7 +95,7 @@ SlideoutCreate(char *name, char dir)
|
|||
s->button = NULL;
|
||||
s->w = 0;
|
||||
s->h = 0;
|
||||
s->win = ECreateWindow(root.win, -10, -10, 1, 1, 1);
|
||||
s->win = ECreateWindow(VRoot.win, -10, -10, 1, 1, 1);
|
||||
s->from_win = 0;
|
||||
s->ref_count = 0;
|
||||
|
||||
|
@ -119,7 +119,7 @@ SlideoutShow(Slideout * s, EWin * ewin, Window win)
|
|||
|
||||
SlideoutCalcSize(s);
|
||||
EGetGeometry(disp, win, &dw, &di, &di, &w, &h, &d, &d);
|
||||
XTranslateCoordinates(disp, win, root.win, 0, 0, &x, &y, &dw);
|
||||
XTranslateCoordinates(disp, win, VRoot.win, 0, 0, &x, &y, &dw);
|
||||
|
||||
xx = 0;
|
||||
yy = 0;
|
||||
|
@ -128,7 +128,7 @@ SlideoutShow(Slideout * s, EWin * ewin, Window win)
|
|||
case 2:
|
||||
xx = x + ((w - s->w) >> 1);
|
||||
yy = y - s->h;
|
||||
if ((yy < 0) && (s->h < root.h))
|
||||
if ((yy < 0) && (s->h < VRoot.h))
|
||||
{
|
||||
pdir = s->direction;
|
||||
s->direction = 1;
|
||||
|
@ -140,7 +140,7 @@ SlideoutShow(Slideout * s, EWin * ewin, Window win)
|
|||
case 3:
|
||||
xx = x + ((w - s->w) >> 1);
|
||||
yy = y + h;
|
||||
if (((yy + s->h) > root.h) && (s->h < root.h))
|
||||
if (((yy + s->h) > VRoot.h) && (s->h < VRoot.h))
|
||||
{
|
||||
pdir = s->direction;
|
||||
s->direction = 0;
|
||||
|
@ -152,7 +152,7 @@ SlideoutShow(Slideout * s, EWin * ewin, Window win)
|
|||
case 0:
|
||||
xx = x - s->w;
|
||||
yy = y + ((h - s->h) >> 1);
|
||||
if ((xx < 0) && (s->w < root.w))
|
||||
if ((xx < 0) && (s->w < VRoot.w))
|
||||
{
|
||||
pdir = s->direction;
|
||||
s->direction = 1;
|
||||
|
@ -164,7 +164,7 @@ SlideoutShow(Slideout * s, EWin * ewin, Window win)
|
|||
case 1:
|
||||
xx = x + w;
|
||||
yy = y + ((h - s->h) >> 1);
|
||||
if (((xx + s->w) > root.w) && (s->w < root.w))
|
||||
if (((xx + s->w) > VRoot.w) && (s->w < VRoot.w))
|
||||
{
|
||||
pdir = s->direction;
|
||||
s->direction = 0;
|
||||
|
@ -179,7 +179,7 @@ SlideoutShow(Slideout * s, EWin * ewin, Window win)
|
|||
|
||||
/* If the slideout is associated with an ewin,
|
||||
* put it on the same virtual desktop. */
|
||||
dw = root.win;
|
||||
dw = VRoot.win;
|
||||
if (ewin && EwinWinpartIndex(ewin, win) >= 0 &&
|
||||
!ewin->floating /* && !ewin->sticky */ )
|
||||
{
|
||||
|
|
41
src/snaps.c
41
src/snaps.c
|
@ -895,7 +895,7 @@ Real_SaveSnapInfo(int dumval __UNUSED__, void *dumdat __UNUSED__)
|
|||
if (sn->use_desktop)
|
||||
fprintf(f, "DESKTOP: %i\n", sn->desktop);
|
||||
if (sn->use_xy)
|
||||
fprintf(f, "RES: %i %i\n", root.w, root.h);
|
||||
fprintf(f, "RES: %i %i\n", VRoot.w, VRoot.h);
|
||||
if (sn->use_wh)
|
||||
fprintf(f, "WH: %i %i\n", sn->w, sn->h);
|
||||
if (sn->use_xy)
|
||||
|
@ -932,7 +932,8 @@ Real_SaveSnapInfo(int dumval __UNUSED__, void *dumdat __UNUSED__)
|
|||
|
||||
fclose(f);
|
||||
|
||||
Esnprintf(buf, sizeof(buf), "%s.snapshots.%i", GetGenericSMFile(), root.scr);
|
||||
Esnprintf(buf, sizeof(buf), "%s.snapshots.%i", GetGenericSMFile(),
|
||||
VRoot.scr);
|
||||
if (EventDebug(EDBUG_TYPE_SESSION))
|
||||
Eprintf("Real_SaveSnapInfo: %s\n", buf);
|
||||
E_mv(s, buf);
|
||||
|
@ -971,16 +972,16 @@ LoadSnapInfo(void)
|
|||
FILE *f;
|
||||
int res_w, res_h;
|
||||
|
||||
Esnprintf(buf, sizeof(buf), "%s.snapshots.%i", GetSMFile(), root.scr);
|
||||
Esnprintf(buf, sizeof(buf), "%s.snapshots.%i", GetSMFile(), VRoot.scr);
|
||||
if (!exists(buf))
|
||||
Esnprintf(buf, sizeof(buf), "%s.snapshots.%i", GetGenericSMFile(),
|
||||
root.scr);
|
||||
VRoot.scr);
|
||||
f = fopen(buf, "r");
|
||||
if (!f)
|
||||
return;
|
||||
|
||||
res_w = root.w;
|
||||
res_h = root.h;
|
||||
res_w = VRoot.w;
|
||||
res_h = VRoot.h;
|
||||
while (fgets(buf, sizeof(buf), f))
|
||||
{
|
||||
/* nuke \n */
|
||||
|
@ -988,8 +989,8 @@ LoadSnapInfo(void)
|
|||
word(buf, 1, s);
|
||||
if (!strcmp(s, "NEW:"))
|
||||
{
|
||||
res_w = root.w;
|
||||
res_h = root.h;
|
||||
res_w = VRoot.w;
|
||||
res_h = VRoot.h;
|
||||
sn = NewSnapshot(atword(buf, 2));
|
||||
}
|
||||
else if (sn)
|
||||
|
@ -1034,7 +1035,7 @@ LoadSnapInfo(void)
|
|||
word(buf, 3, s);
|
||||
sn->y = atoi(s);
|
||||
/* we changed reses since we last used this snapshot file */
|
||||
if (res_w != root.w)
|
||||
if (res_w != VRoot.w)
|
||||
{
|
||||
if (sn->use_wh)
|
||||
{
|
||||
|
@ -1042,15 +1043,15 @@ LoadSnapInfo(void)
|
|||
sn->x = 0;
|
||||
else
|
||||
sn->x =
|
||||
(sn->x * (root.w - sn->w)) / (res_w - sn->w);
|
||||
(sn->x * (VRoot.w - sn->w)) / (res_w - sn->w);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sn->x >= root.w)
|
||||
sn->x = root.w - 32;
|
||||
if (sn->x >= VRoot.w)
|
||||
sn->x = VRoot.w - 32;
|
||||
}
|
||||
}
|
||||
if (res_h != root.h)
|
||||
if (res_h != VRoot.h)
|
||||
{
|
||||
if (sn->use_wh)
|
||||
{
|
||||
|
@ -1058,12 +1059,12 @@ LoadSnapInfo(void)
|
|||
sn->y = 0;
|
||||
else
|
||||
sn->y =
|
||||
(sn->y * (root.h - sn->h)) / (res_h - sn->h);
|
||||
(sn->y * (VRoot.h - sn->h)) / (res_h - sn->h);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sn->y >= root.h)
|
||||
sn->y = root.h - 32;
|
||||
if (sn->y >= VRoot.h)
|
||||
sn->y = VRoot.h - 32;
|
||||
}
|
||||
}
|
||||
word(buf, 4, s);
|
||||
|
@ -1163,19 +1164,19 @@ MatchEwinToSnapInfo(EWin * ewin)
|
|||
{
|
||||
ewin->client.x +=
|
||||
((sn->area_x - desks.desk[ewin->desktop].current_area_x) *
|
||||
root.w);
|
||||
VRoot.w);
|
||||
ewin->client.y +=
|
||||
((sn->area_y - desks.desk[ewin->desktop].current_area_y) *
|
||||
root.h);
|
||||
VRoot.h);
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.x +=
|
||||
((sn->area_x - desks.desk[desks.current].current_area_x) *
|
||||
root.w);
|
||||
VRoot.w);
|
||||
ewin->client.y +=
|
||||
((sn->area_y - desks.desk[desks.current].current_area_y) *
|
||||
root.h);
|
||||
VRoot.h);
|
||||
}
|
||||
}
|
||||
ewin->x = ewin->client.x;
|
||||
|
|
|
@ -189,32 +189,38 @@ CreateStartupDisplay(char start)
|
|||
|
||||
if (bg_sideways)
|
||||
{
|
||||
w1 = ECreateWindow(root.win, (root.w / 2), 0, root.w, root.h, 1);
|
||||
w2 = ECreateWindow(root.win, -(root.w / 2), 0, root.w, root.h, 1);
|
||||
win1 = ECreateWindow(w1, -(root.w / 2), 0, root.w, root.h, 0);
|
||||
win2 = ECreateWindow(w2, (root.w / 2), 0, root.w, root.h, 0);
|
||||
w1 =
|
||||
ECreateWindow(VRoot.win, (VRoot.w / 2), 0, VRoot.w, VRoot.h, 1);
|
||||
w2 =
|
||||
ECreateWindow(VRoot.win, -(VRoot.w / 2), 0, VRoot.w, VRoot.h,
|
||||
1);
|
||||
win1 = ECreateWindow(w1, -(VRoot.w / 2), 0, VRoot.w, VRoot.h, 0);
|
||||
win2 = ECreateWindow(w2, (VRoot.w / 2), 0, VRoot.w, VRoot.h, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
w1 = ECreateWindow(root.win, 0, -(root.h / 2), root.w, root.h, 1);
|
||||
w2 = ECreateWindow(root.win, 0, (root.h / 2), root.w, root.h, 1);
|
||||
win1 = ECreateWindow(w1, 0, (root.h / 2), root.w, root.h, 0);
|
||||
win2 = ECreateWindow(w2, 0, -(root.h / 2), root.w, root.h, 0);
|
||||
w1 =
|
||||
ECreateWindow(VRoot.win, 0, -(VRoot.h / 2), VRoot.w, VRoot.h,
|
||||
1);
|
||||
w2 =
|
||||
ECreateWindow(VRoot.win, 0, (VRoot.h / 2), VRoot.w, VRoot.h, 1);
|
||||
win1 = ECreateWindow(w1, 0, (VRoot.h / 2), VRoot.w, VRoot.h, 0);
|
||||
win2 = ECreateWindow(w2, 0, -(VRoot.h / 2), VRoot.w, VRoot.h, 0);
|
||||
}
|
||||
|
||||
EMapWindow(disp, win1);
|
||||
EMapWindow(disp, win2);
|
||||
|
||||
b1 = ECreateWindow(w1, 0, root.h - Conf.desks.dragbar_width, root.w,
|
||||
b1 = ECreateWindow(w1, 0, VRoot.h - Conf.desks.dragbar_width, VRoot.w,
|
||||
Conf.desks.dragbar_width, 0);
|
||||
b2 = ECreateWindow(w2, 0, 0, root.w, Conf.desks.dragbar_width, 0);
|
||||
b2 = ECreateWindow(w2, 0, 0, VRoot.w, Conf.desks.dragbar_width, 0);
|
||||
EMapRaised(disp, b1);
|
||||
EMapRaised(disp, b2);
|
||||
|
||||
pq = Mode.queue_up;
|
||||
Mode.queue_up = 0;
|
||||
IclassApply(ic, b1, root.w, Conf.desks.dragbar_width, 0, 0, 0, 0);
|
||||
IclassApply(ic, b2, root.w, Conf.desks.dragbar_width, 0, 0, 0, 0);
|
||||
IclassApply(ic, b1, VRoot.w, Conf.desks.dragbar_width, 0, 0, 0, 0);
|
||||
IclassApply(ic, b2, VRoot.w, Conf.desks.dragbar_width, 0, 0, 0, 0);
|
||||
Mode.queue_up = pq;
|
||||
BackgroundApply(bg, win1, 1);
|
||||
BackgroundApply(bg, win2, 1);
|
||||
|
@ -246,7 +252,7 @@ CreateStartupDisplay(char start)
|
|||
{
|
||||
if (bg_sideways)
|
||||
{ /* so we can have two different slide methods */
|
||||
ty = (root.w / 2);
|
||||
ty = (VRoot.w / 2);
|
||||
xOffset = ((fy * (1024 - k)) + (ty * k)) >> 10;
|
||||
x = ty;
|
||||
yOffset = 0;
|
||||
|
@ -254,7 +260,7 @@ CreateStartupDisplay(char start)
|
|||
}
|
||||
else
|
||||
{
|
||||
ty = (root.h / 2);
|
||||
ty = (VRoot.h / 2);
|
||||
xOffset = 0;
|
||||
x = 0;
|
||||
yOffset = ((fy * (1024 - k)) + (ty * k)) >> 10;
|
||||
|
|
|
@ -60,13 +60,13 @@ MakeWindowSticky(EWin * ewin)
|
|||
/* Avoid "losing" windows made sticky while not in the current viewport */
|
||||
dx = ewin->w / 2;
|
||||
dy = ewin->h / 2;
|
||||
x = (ewin->x + dx) % root.w;
|
||||
x = (ewin->x + dx) % VRoot.w;
|
||||
if (x < 0)
|
||||
x += root.w;
|
||||
x += VRoot.w;
|
||||
x -= dx;
|
||||
y = (ewin->y + dy) % root.h;
|
||||
y = (ewin->y + dy) % VRoot.h;
|
||||
if (y < 0)
|
||||
y += root.h;
|
||||
y += VRoot.h;
|
||||
y -= dy;
|
||||
|
||||
if (x != ewin->x || y != ewin->y)
|
||||
|
|
20
src/text.c
20
src/text.c
|
@ -420,7 +420,7 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
|
||||
if (ts->style.orientation != FONT_TO_RIGHT)
|
||||
drawable =
|
||||
ECreatePixmap(disp, root.win, wid + 2, ascent + descent + 2,
|
||||
ECreatePixmap(disp, VRoot.win, wid + 2, ascent + descent + 2,
|
||||
GetWinDepth(win));
|
||||
else
|
||||
drawable = win;
|
||||
|
@ -443,25 +443,25 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
XSetForeground(disp, gc, ts->bg_col.pixel);
|
||||
EFont_draw_string(disp, drawable, gc, offset_x + 1,
|
||||
offset_y + 1, lines[i], ts->efont,
|
||||
root.vis, root.cmap);
|
||||
VRoot.vis, VRoot.cmap);
|
||||
}
|
||||
else if (ts->effect == 2)
|
||||
{
|
||||
EAllocColor(&ts->bg_col);
|
||||
XSetForeground(disp, gc, ts->bg_col.pixel);
|
||||
EFont_draw_string(disp, drawable, gc, offset_x - 1, offset_y,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
EFont_draw_string(disp, drawable, gc, offset_x + 1, offset_y,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
EFont_draw_string(disp, drawable, gc, offset_x, offset_y - 1,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
EFont_draw_string(disp, drawable, gc, offset_x, offset_y + 1,
|
||||
lines[i], ts->efont, root.vis, root.cmap);
|
||||
lines[i], ts->efont, VRoot.vis, VRoot.cmap);
|
||||
}
|
||||
EAllocColor(&ts->fg_col);
|
||||
XSetForeground(disp, gc, ts->fg_col.pixel);
|
||||
EFont_draw_string(disp, drawable, gc, offset_x, offset_y, lines[i],
|
||||
ts->efont, root.vis, root.cmap);
|
||||
ts->efont, VRoot.vis, VRoot.cmap);
|
||||
|
||||
TextDrawRotBack(win, drawable, xx - 1, yy - 1 - ascent, wid + 2,
|
||||
ascent + descent + 2, ts);
|
||||
|
@ -562,7 +562,7 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
|
||||
if (ts->style.orientation != FONT_TO_RIGHT)
|
||||
drawable =
|
||||
ECreatePixmap(disp, root.win, ret2.width + 2,
|
||||
ECreatePixmap(disp, VRoot.win, ret2.width + 2,
|
||||
ret2.height + 2, GetWinDepth(win));
|
||||
else
|
||||
drawable = win;
|
||||
|
@ -658,7 +658,7 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
|
||||
if (ts->style.orientation != FONT_TO_RIGHT)
|
||||
drawable =
|
||||
ECreatePixmap(disp, root.win, wid + 2, ascent + descent + 2,
|
||||
ECreatePixmap(disp, VRoot.win, wid + 2, ascent + descent + 2,
|
||||
GetWinDepth(win));
|
||||
else
|
||||
drawable = win;
|
||||
|
@ -755,7 +755,7 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
|
||||
if (ts->style.orientation != FONT_TO_RIGHT)
|
||||
drawable =
|
||||
ECreatePixmap(disp, root.win, wid + 2, ascent + descent + 2,
|
||||
ECreatePixmap(disp, VRoot.win, wid + 2, ascent + descent + 2,
|
||||
GetWinDepth(win));
|
||||
else
|
||||
drawable = win;
|
||||
|
|
|
@ -53,7 +53,7 @@ CreateToolTip(const char *name, ImageClass * ic0, ImageClass * ic1,
|
|||
tooltippic->ref_count++;
|
||||
|
||||
tt->dist = dist;
|
||||
tt->win = ECreateWindow(root.win, -10, -100, 1, 1, 1);
|
||||
tt->win = ECreateWindow(VRoot.win, -10, -100, 1, 1, 1);
|
||||
tt->iwin = ECreateWindow(tt->win, -10, -100, 1, 1, 1);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
|
@ -65,7 +65,7 @@ CreateToolTip(const char *name, ImageClass * ic0, ImageClass * ic1,
|
|||
{
|
||||
int wh = (i + 1) * 8;
|
||||
|
||||
win = ECreateWindow(root.win, -10, -100, wh, wh, 1);
|
||||
win = ECreateWindow(VRoot.win, -10, -100, wh, wh, 1);
|
||||
tt->s_iclass[i]->ref_count++;
|
||||
}
|
||||
tt->s_win[i] = win;
|
||||
|
@ -277,8 +277,8 @@ ShowToolTip(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
else
|
||||
EUnmapWindow(disp, tt->iwin);
|
||||
|
||||
dx = x - root.w / 2;
|
||||
dy = y - root.h / 2;
|
||||
dx = x - VRoot.w / 2;
|
||||
dy = y - VRoot.h / 2;
|
||||
|
||||
if ((dy == 0) && (dx == 0))
|
||||
dy = -1;
|
||||
|
@ -303,23 +303,23 @@ ShowToolTip(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
ady = ady / dy;
|
||||
|
||||
yy = y - ((ady * 10 * dist) / 100);
|
||||
xx = x - (dist * 10 * dx) / (100 * root.w / 2);
|
||||
xx = x - (dist * 10 * dx) / (100 * VRoot.w / 2);
|
||||
EMoveWindow(disp, tt->s_win[0], xx - 4, yy - 4);
|
||||
|
||||
yy = y - ((ady * 30 * dist) / 100);
|
||||
xx = x - (dist * 30 * dx) / (100 * root.w / 2);
|
||||
xx = x - (dist * 30 * dx) / (100 * VRoot.w / 2);
|
||||
EMoveWindow(disp, tt->s_win[1], xx - 8, yy - 8);
|
||||
|
||||
yy = y - ((ady * 50 * dist) / 100);
|
||||
xx = x - (dist * 50 * dx) / (100 * root.w / 2);
|
||||
xx = x - (dist * 50 * dx) / (100 * VRoot.w / 2);
|
||||
EMoveWindow(disp, tt->s_win[2], xx - 12, yy - 12);
|
||||
|
||||
yy = y - ((ady * 80 * dist) / 100);
|
||||
xx = x - (dist * 80 * dx) / (100 * root.w / 2);
|
||||
xx = x - (dist * 80 * dx) / (100 * VRoot.w / 2);
|
||||
EMoveWindow(disp, tt->s_win[3], xx - 16, yy - 16);
|
||||
|
||||
yy = y - ((ady * 100 * dist) / 100);
|
||||
xx = x - (dist * 100 * dx) / (100 * root.w / 2);
|
||||
xx = x - (dist * 100 * dx) / (100 * VRoot.w / 2);
|
||||
if (ady < 0)
|
||||
{
|
||||
hh = 0;
|
||||
|
@ -328,7 +328,7 @@ ShowToolTip(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
{
|
||||
hh = h;
|
||||
}
|
||||
ww = (w / 2) + ((dx * w) / (root.w / 2));
|
||||
ww = (w / 2) + ((dx * w) / (VRoot.w / 2));
|
||||
}
|
||||
else
|
||||
/* +-------+ */
|
||||
|
@ -348,19 +348,19 @@ ShowToolTip(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
dist = tt->dist;
|
||||
adx = adx / dx;
|
||||
xx = x - ((adx * 10 * dist) / 100);
|
||||
yy = y - (dist * 10 * dy) / (100 * root.h / 2);
|
||||
yy = y - (dist * 10 * dy) / (100 * VRoot.h / 2);
|
||||
EMoveWindow(disp, tt->s_win[0], xx - 4, yy - 4);
|
||||
xx = x - ((adx * 30 * dist) / 100);
|
||||
yy = y - (dist * 30 * dy) / (100 * root.h / 2);
|
||||
yy = y - (dist * 30 * dy) / (100 * VRoot.h / 2);
|
||||
EMoveWindow(disp, tt->s_win[1], xx - 8, yy - 8);
|
||||
xx = x - ((adx * 50 * dist) / 100);
|
||||
yy = y - (dist * 50 * dy) / (100 * root.h / 2);
|
||||
yy = y - (dist * 50 * dy) / (100 * VRoot.h / 2);
|
||||
EMoveWindow(disp, tt->s_win[2], xx - 12, yy - 12);
|
||||
xx = x - ((adx * 80 * dist) / 100);
|
||||
yy = y - (dist * 80 * dy) / (100 * root.h / 2);
|
||||
yy = y - (dist * 80 * dy) / (100 * VRoot.h / 2);
|
||||
EMoveWindow(disp, tt->s_win[3], xx - 16, yy - 16);
|
||||
xx = x - ((adx * 100 * dist) / 100);
|
||||
yy = y - (dist * 100 * dy) / (100 * root.h / 2);
|
||||
yy = y - (dist * 100 * dy) / (100 * VRoot.h / 2);
|
||||
if (adx < 0)
|
||||
{
|
||||
ww = 0;
|
||||
|
@ -369,7 +369,7 @@ ShowToolTip(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
{
|
||||
ww = w;
|
||||
}
|
||||
hh = (h / 2) + ((dy * h) / (root.h / 2));
|
||||
hh = (h / 2) + ((dy * h) / (VRoot.h / 2));
|
||||
}
|
||||
|
||||
EMoveResizeWindow(disp, tt->win, xx - ww, yy - hh, w, h);
|
||||
|
|
|
@ -190,7 +190,7 @@ WarpFocusShowTitle(EWin * ewin)
|
|||
return;
|
||||
|
||||
if (!warpFocusTitleWindow)
|
||||
warpFocusTitleWindow = ECreateWindow(root.win, 0, 0, 1, 1, 1);
|
||||
warpFocusTitleWindow = ECreateWindow(VRoot.win, 0, 0, 1, 1, 1);
|
||||
|
||||
pq = Mode.queue_up;
|
||||
Mode.queue_up = 0;
|
||||
|
|
26
src/x.c
26
src/x.c
|
@ -117,7 +117,7 @@ SetXID(Window win, Window parent, int x, int y, int w, int h, int depth)
|
|||
xid->y = y;
|
||||
xid->w = w;
|
||||
xid->h = h;
|
||||
xid->depth = root.depth;
|
||||
xid->depth = VRoot.depth;
|
||||
AddXID(xid);
|
||||
return;
|
||||
depth = 0;
|
||||
|
@ -148,7 +148,7 @@ ECreateWindow(Window parent, int x, int y, int w, int h, int saveunder)
|
|||
EDBUG(6, "ECreateWindow");
|
||||
attr.backing_store = NotUseful;
|
||||
attr.override_redirect = True;
|
||||
attr.colormap = root.cmap;
|
||||
attr.colormap = VRoot.cmap;
|
||||
attr.border_pixel = 0;
|
||||
/* attr.background_pixel = 0; */
|
||||
attr.background_pixmap = None;
|
||||
|
@ -159,11 +159,11 @@ ECreateWindow(Window parent, int x, int y, int w, int h, int saveunder)
|
|||
else
|
||||
attr.save_under = False;
|
||||
win =
|
||||
XCreateWindow(disp, parent, x, y, w, h, 0, root.depth, InputOutput,
|
||||
root.vis,
|
||||
XCreateWindow(disp, parent, x, y, w, h, 0, VRoot.depth, InputOutput,
|
||||
VRoot.vis,
|
||||
CWOverrideRedirect | CWSaveUnder | CWBackingStore |
|
||||
CWColormap | CWBackPixmap | CWBorderPixel, &attr);
|
||||
SetXID(win, parent, x, y, w, h, root.depth);
|
||||
SetXID(win, parent, x, y, w, h, VRoot.depth);
|
||||
|
||||
EDBUG_RETURN(win);
|
||||
}
|
||||
|
@ -562,7 +562,7 @@ EGetGeometry(Display * d, Window win, Window * root_return, int *x, int *y,
|
|||
if (depth)
|
||||
*depth = xid->depth;
|
||||
if (root_return)
|
||||
*root_return = root.win;
|
||||
*root_return = VRoot.win;
|
||||
ok = 1;
|
||||
}
|
||||
else
|
||||
|
@ -664,10 +664,10 @@ ECreateEventWindow(Window parent, int x, int y, int w, int h)
|
|||
EDBUG(6, "ECreateEventWindow");
|
||||
attr.override_redirect = False;
|
||||
win =
|
||||
XCreateWindow(disp, parent, x, y, w, h, 0, 0, InputOnly, root.vis,
|
||||
XCreateWindow(disp, parent, x, y, w, h, 0, 0, InputOnly, VRoot.vis,
|
||||
CWOverrideRedirect, &attr);
|
||||
#if 0 /* Not yet */
|
||||
SetXID(win, parent, x, y, w, h, root.depth);
|
||||
SetXID(win, parent, x, y, w, h, VRoot.depth);
|
||||
#endif
|
||||
|
||||
EDBUG_RETURN(win);
|
||||
|
@ -687,7 +687,7 @@ ECreateFocusWindow(Window parent, int x, int y, int w, int h)
|
|||
|
||||
attr.backing_store = NotUseful;
|
||||
attr.override_redirect = True;
|
||||
attr.colormap = root.cmap;
|
||||
attr.colormap = VRoot.cmap;
|
||||
attr.border_pixel = 0;
|
||||
attr.background_pixel = 0;
|
||||
attr.save_under = False;
|
||||
|
@ -868,10 +868,10 @@ WindowAtXY(int x, int y)
|
|||
|
||||
EDBUG(7, "WindowAtXY");
|
||||
GrabX();
|
||||
if (!XQueryTree(disp, root.win, &root_win, &parent_win, &list, &num))
|
||||
if (!XQueryTree(disp, VRoot.win, &root_win, &parent_win, &list, &num))
|
||||
{
|
||||
UngrabX();
|
||||
EDBUG_RETURN(root.win);
|
||||
EDBUG_RETURN(VRoot.win);
|
||||
}
|
||||
if (list)
|
||||
{
|
||||
|
@ -895,7 +895,7 @@ WindowAtXY(int x, int y)
|
|||
XFree(list);
|
||||
}
|
||||
UngrabX();
|
||||
EDBUG_RETURN(root.win);
|
||||
EDBUG_RETURN(VRoot.win);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -905,7 +905,7 @@ PointerAt(int *x, int *y)
|
|||
int dd;
|
||||
unsigned int mm;
|
||||
|
||||
XQueryPointer(disp, root.win, &dw, &dw, &dd, &dd, x, y, &mm);
|
||||
XQueryPointer(disp, VRoot.win, &dw, &dw, &dd, &dd, x, y, &mm);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
26
src/zoom.c
26
src/zoom.c
|
@ -40,7 +40,7 @@ static char zoom_can = 0;
|
|||
static void
|
||||
FillStdVidModes(void)
|
||||
{
|
||||
XF86VidModeGetAllModeLines(disp, root.scr, &std_vid_modes_num,
|
||||
XF86VidModeGetAllModeLines(disp, VRoot.scr, &std_vid_modes_num,
|
||||
&std_vid_modes);
|
||||
}
|
||||
|
||||
|
@ -95,28 +95,28 @@ SwitchRes(char inout, int x, int y, int w, int h)
|
|||
XF86VidModeModeLine curmode;
|
||||
int dotclock;
|
||||
|
||||
if (!XF86VidModeGetModeLine(disp, root.scr, &dotclock, &curmode))
|
||||
if (!XF86VidModeGetModeLine(disp, VRoot.scr, &dotclock, &curmode))
|
||||
return mode;
|
||||
XF86VidModeGetViewPort(disp, root.scr, &vp_x, &vp_y);
|
||||
XF86VidModeGetViewPort(disp, VRoot.scr, &vp_x, &vp_y);
|
||||
|
||||
mode = FindMode(w, h);
|
||||
if (mode)
|
||||
{
|
||||
XF86VidModeLockModeSwitch(disp, root.scr, 0);
|
||||
XF86VidModeLockModeSwitch(disp, VRoot.scr, 0);
|
||||
std_vid_mode_cur = GetModeIndex(dotclock, &curmode);
|
||||
XF86VidModeSwitchToMode(disp, root.scr, mode);
|
||||
XF86VidModeSetViewPort(disp, root.scr, x, y);
|
||||
XF86VidModeLockModeSwitch(disp, root.scr, 1);
|
||||
XF86VidModeSwitchToMode(disp, VRoot.scr, mode);
|
||||
XF86VidModeSetViewPort(disp, VRoot.scr, x, y);
|
||||
XF86VidModeLockModeSwitch(disp, VRoot.scr, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mode = std_vid_modes[std_vid_mode_cur];
|
||||
XF86VidModeLockModeSwitch(disp, root.scr, 0);
|
||||
XF86VidModeSwitchToMode(disp, root.scr, mode);
|
||||
XF86VidModeSetViewPort(disp, root.scr, vp_x, vp_y);
|
||||
XF86VidModeLockModeSwitch(disp, VRoot.scr, 0);
|
||||
XF86VidModeSwitchToMode(disp, VRoot.scr, mode);
|
||||
XF86VidModeSetViewPort(disp, VRoot.scr, vp_x, vp_y);
|
||||
#if 0 /* No, don't lock or we can't switch resolution */
|
||||
XF86VidModeLockModeSwitch(disp, root.scr, 1);
|
||||
XF86VidModeLockModeSwitch(disp, VRoot.scr, 1);
|
||||
#endif
|
||||
}
|
||||
return mode;
|
||||
|
@ -182,9 +182,9 @@ ZoomMask(int x, int y, int w, int h)
|
|||
if (x < 0 || y < 0 || w <= 0 || h <= 0)
|
||||
return 0;
|
||||
|
||||
win = ECreateWindow(root.win, x, y, w, h, 0);
|
||||
win = ECreateWindow(VRoot.win, x, y, w, h, 0);
|
||||
XSetWindowBackgroundPixmap(disp, win, None);
|
||||
XSetWindowBackground(disp, win, BlackPixel(disp, root.scr));
|
||||
XSetWindowBackground(disp, win, BlackPixel(disp, VRoot.scr));
|
||||
XRaiseWindow(disp, win);
|
||||
XMapWindow(disp, win);
|
||||
|
||||
|
|
Loading…
Reference in New Issue