parent
e894108562
commit
b49d17688c
71
src/E.h
71
src/E.h
|
@ -2225,44 +2225,49 @@ void EventCallbacksProcess(XEvent * ev);
|
|||
|
||||
Window ECreateWindow(Window parent, int x, int y, int w, int h,
|
||||
int saveunder);
|
||||
void EWindowSync(Window win);
|
||||
void EMoveWindow(Display * d, Window win, int x, int y);
|
||||
void EResizeWindow(Display * d, Window win, int w, int h);
|
||||
void EMoveResizeWindow(Display * d, Window win, int x, int y,
|
||||
int w, int h);
|
||||
void EDestroyWindow(Display * d, Window win);
|
||||
void EMapWindow(Display * d, Window win);
|
||||
void EUnmapWindow(Display * d, Window win);
|
||||
void EShapeCombineMask(Display * d, Window win, int dest, int x,
|
||||
int y, Pixmap pmap, int op);
|
||||
void EShapeCombineMaskTiled(Display * d, Window win, int dest,
|
||||
int x, int y, Pixmap pmap, int op,
|
||||
int w, int h);
|
||||
void EShapeCombineRectangles(Display * d, Window win, int dest,
|
||||
int x, int y, XRectangle * rect,
|
||||
int n_rects, int op, int ordering);
|
||||
void EShapeCombineShape(Display * d, Window win, int dest, int x,
|
||||
int y, Window src_win, int src_kind,
|
||||
int op);
|
||||
XRectangle *EShapeGetRectangles(Display * d, Window win, int dest,
|
||||
int *rn, int *ord);
|
||||
void EReparentWindow(Display * d, Window win, Window parent,
|
||||
int x, int y);
|
||||
void EMapRaised(Display * d, Window win);
|
||||
int EGetGeometry(Display * d, Window win, Window * root_return,
|
||||
int *x, int *y, unsigned int *w,
|
||||
unsigned int *h, unsigned int *bw,
|
||||
unsigned int *depth);
|
||||
void EConfigureWindow(Display * d, Window win, unsigned int mask,
|
||||
XWindowChanges * wc);
|
||||
void ESetWindowBackgroundPixmap(Display * d, Window win,
|
||||
Pixmap pmap);
|
||||
void ESetWindowBackground(Display * d, Window win, int col);
|
||||
Window ECreateEventWindow(Window parent, int x, int y, int w,
|
||||
int h);
|
||||
Window ECreateFocusWindow(Window parent, int x, int y, int w,
|
||||
int h);
|
||||
void EWindowSync(Window win);
|
||||
|
||||
void EMoveWindow(Window win, int x, int y);
|
||||
void EResizeWindow(Window win, int w, int h);
|
||||
void EMoveResizeWindow(Window win, int x, int y, int w, int h);
|
||||
void EDestroyWindow(Window win);
|
||||
void EMapWindow(Window win);
|
||||
void EMapRaised(Window win);
|
||||
void EUnmapWindow(Window win);
|
||||
void EShapeCombineMask(Window win, int dest, int x, int y,
|
||||
Pixmap pmap, int op);
|
||||
void EShapeCombineMaskTiled(Window win, int dest, int x, int y,
|
||||
Pixmap pmap, int op, int w, int h);
|
||||
void EShapeCombineRectangles(Window win, int dest, int x, int y,
|
||||
XRectangle * rect, int n_rects,
|
||||
int op, int ordering);
|
||||
void EShapeCombineShape(Window win, int dest, int x, int y,
|
||||
Window src_win, int src_kind, int op);
|
||||
XRectangle *EShapeGetRectangles(Window win, int dest, int *rn,
|
||||
int *ord);
|
||||
void EReparentWindow(Window win, Window parent, int x, int y);
|
||||
int EGetGeometry(Window win, Window * root_return,
|
||||
int *x, int *y, unsigned int *w,
|
||||
unsigned int *h, unsigned int *bw,
|
||||
unsigned int *depth);
|
||||
void EConfigureWindow(Window win, unsigned int mask,
|
||||
XWindowChanges * wc);
|
||||
void ESetWindowBackgroundPixmap(Window win, Pixmap pmap);
|
||||
void ESetWindowBackground(Window win, int col);
|
||||
Pixmap EWindowGetShapePixmap(Window win);
|
||||
|
||||
#define ESelectInput(win, mask) XSelectInput(disp, win, mask)
|
||||
#define EGetWindowAttributes(win, attr) XGetWindowAttributes(disp, win, attr)
|
||||
#define EChangeWindowAttributes(win, mask, attr) XChangeWindowAttributes(disp, win, mask, attr)
|
||||
#define ERaiseWindow(win) XRaiseWindow(disp, win)
|
||||
#define ELowerWindow(win) XLowerWindow(disp, win)
|
||||
#define EClearWindow(win) XClearWindow(disp, win)
|
||||
#define EClearArea(win, x, y, w, h, exp) XClearArea(disp, win, x, y, w, h, exp)
|
||||
|
||||
void ESetColor(XColor * pxc, int r, int g, int b);
|
||||
void EGetColor(const XColor * pxc, int *pr, int *pg, int *pb);
|
||||
void GetWinXY(Window win, int *x, int *y);
|
||||
|
|
|
@ -245,21 +245,21 @@ ShowAlert(char *text)
|
|||
b1 = XCreateWindow(dd, win, -100, -100, 1, 1, 0,
|
||||
DefaultDepth(dd, DefaultScreen(dd)), InputOutput,
|
||||
DefaultVisual(dd, DefaultScreen(dd)), mask, &att);
|
||||
EMapWindow(dd, b1);
|
||||
XMapWindow(dd, b1);
|
||||
}
|
||||
if (sscanf(str2, "%s", line) > 0)
|
||||
{
|
||||
b2 = XCreateWindow(dd, win, -100, -100, 1, 1, 0,
|
||||
DefaultDepth(dd, DefaultScreen(dd)), InputOutput,
|
||||
DefaultVisual(dd, DefaultScreen(dd)), mask, &att);
|
||||
EMapWindow(dd, b2);
|
||||
XMapWindow(dd, b2);
|
||||
}
|
||||
if (sscanf(str3, "%s", line) > 0)
|
||||
{
|
||||
b3 = XCreateWindow(dd, win, -100, -100, 1, 1, 0,
|
||||
DefaultDepth(dd, DefaultScreen(dd)), InputOutput,
|
||||
DefaultVisual(dd, DefaultScreen(dd)), mask, &att);
|
||||
EMapWindow(dd, b3);
|
||||
XMapWindow(dd, b3);
|
||||
}
|
||||
|
||||
gc = XCreateGC(dd, win, 0, &gcv);
|
||||
|
|
|
@ -186,7 +186,7 @@ SlideWindowsBy(Window * win, int num, int dx, int dy, int speed)
|
|||
{
|
||||
x = ((xy[i].x * (1024 - k)) + ((xy[i].x + dx) * k)) >> 10;
|
||||
y = ((xy[i].y * (1024 - k)) + ((xy[i].y + dy) * k)) >> 10;
|
||||
EMoveWindow(disp, win[i], x, y);
|
||||
EMoveWindow(win[i], x, y);
|
||||
}
|
||||
ecore_x_sync();
|
||||
|
||||
|
@ -194,7 +194,7 @@ SlideWindowsBy(Window * win, int num, int dx, int dy, int speed)
|
|||
}
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
EMoveWindow(disp, win[i], xy[i].x + dx, xy[i].y + dy);
|
||||
EMoveWindow(win[i], xy[i].x + dx, xy[i].y + dy);
|
||||
|
||||
if (xy)
|
||||
Efree(xy);
|
||||
|
|
|
@ -633,10 +633,10 @@ BackgroundApply(Background * bg, Window win, int setbg)
|
|||
BackgroundPixmapFree(bg);
|
||||
bg->pmap = dpmap;
|
||||
if (dpmap)
|
||||
XSetWindowBackgroundPixmap(disp, win, dpmap);
|
||||
ESetWindowBackgroundPixmap(win, dpmap);
|
||||
else
|
||||
XSetWindowBackground(disp, win, bg->bg_solid.pixel);
|
||||
XClearWindow(disp, win);
|
||||
ESetWindowBackground(win, bg->bg_solid.pixel);
|
||||
EClearWindow(win);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1234,8 +1234,8 @@ BackgroundsAccounting(void)
|
|||
win = DeskGetWin(j);
|
||||
if (!Conf.hints.set_xroot_info_on_root_window)
|
||||
HintsSetRootInfo(win, 0, 0);
|
||||
XSetWindowBackground(disp, win, 0);
|
||||
XClearWindow(disp, win);
|
||||
ESetWindowBackground(win, 0);
|
||||
EClearWindow(win);
|
||||
}
|
||||
|
||||
BackgroundPixmapFree(lst[i]);
|
||||
|
@ -1391,9 +1391,9 @@ CB_DesktopMiniDisplayRedraw(Dialog * d __UNUSED__, int val __UNUSED__,
|
|||
tmp_bg->top.yperc);
|
||||
|
||||
pmap = ecore_x_pixmap_new(win, w, h, VRoot.depth);
|
||||
ESetWindowBackgroundPixmap(disp, win, pmap);
|
||||
ESetWindowBackgroundPixmap(win, pmap);
|
||||
BackgroundApply(bg, pmap, 0);
|
||||
XClearWindow(disp, win);
|
||||
EClearWindow(win);
|
||||
ecore_x_pixmap_del(pmap);
|
||||
|
||||
BackgroundDestroy(bg);
|
||||
|
@ -1585,7 +1585,7 @@ BG_RedrawView(char nuke_old)
|
|||
|
||||
XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
|
||||
XFillRectangle(disp, pmap, gc, 0, 0, w, h);
|
||||
ESetWindowBackgroundPixmap(disp, win, pmap);
|
||||
ESetWindowBackgroundPixmap(win, pmap);
|
||||
|
||||
x = -(tmp_bg_sel_sliderval * (64 + 8) / 4);
|
||||
if (x < (w - ((64 + 8) * num)))
|
||||
|
@ -1678,7 +1678,7 @@ BG_RedrawView(char nuke_old)
|
|||
ecore_x_pixmap_del(pmap);
|
||||
Efree(bglist);
|
||||
|
||||
XClearWindow(disp, win);
|
||||
EClearWindow(win);
|
||||
|
||||
done:
|
||||
return;
|
||||
|
|
|
@ -66,12 +66,12 @@ BorderWinpartRealise(EWin * ewin, int i)
|
|||
{
|
||||
if ((ewb->w < 0) || (ewb->h < 0))
|
||||
{
|
||||
EUnmapWindow(disp, ewb->win);
|
||||
EUnmapWindow(ewb->win);
|
||||
}
|
||||
else
|
||||
{
|
||||
EMapWindow(disp, ewb->win);
|
||||
EMoveResizeWindow(disp, ewb->win, ewb->x, ewb->y, ewb->w, ewb->h);
|
||||
EMapWindow(ewb->win);
|
||||
EMoveResizeWindow(ewb->win, ewb->x, ewb->y, ewb->w, ewb->h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -450,7 +450,7 @@ HonorIclass(char *s, int id)
|
|||
{
|
||||
ewin->bits[a->ewin_bit].win = id;
|
||||
BorderWinpartRealise(ewin, a->ewin_bit);
|
||||
EMapWindow(disp, id);
|
||||
EMapWindow(id);
|
||||
ewin->shapedone = 0;
|
||||
if (!ewin->shapedone)
|
||||
{
|
||||
|
@ -530,7 +530,7 @@ EwinBorderDetach(EWin * ewin)
|
|||
EventCallbackUnregister(ewin->bits[i].win, 0,
|
||||
BorderWinpartHandleEvents, &ewin->bits[i]);
|
||||
if (ewin->bits[i].win)
|
||||
EDestroyWindow(disp, ewin->bits[i].win);
|
||||
EDestroyWindow(ewin->bits[i].win);
|
||||
}
|
||||
if (ewin->bits)
|
||||
Efree(ewin->bits);
|
||||
|
@ -596,7 +596,7 @@ EwinBorderSetTo(EWin * ewin, const Border * b)
|
|||
ewin->bits[i].win =
|
||||
ECreateWindow(EoGetWin(ewin), -10, -10, 1, 1, 0);
|
||||
ECursorApply(b->part[i].ec, ewin->bits[i].win);
|
||||
EMapWindow(disp, ewin->bits[i].win);
|
||||
EMapWindow(ewin->bits[i].win);
|
||||
EventCallbackRegister(ewin->bits[i].win, 0,
|
||||
BorderWinpartHandleEvents, &ewin->bits[i]);
|
||||
/*
|
||||
|
@ -614,11 +614,9 @@ EwinBorderSetTo(EWin * ewin, const Border * b)
|
|||
* OwnerGrabButtonMask
|
||||
*/
|
||||
if (b->part[i].flags & FLAG_TITLE)
|
||||
XSelectInput(disp, ewin->bits[i].win,
|
||||
EWIN_BORDER_TITLE_EVENT_MASK);
|
||||
ESelectInput(ewin->bits[i].win, EWIN_BORDER_TITLE_EVENT_MASK);
|
||||
else
|
||||
XSelectInput(disp, ewin->bits[i].win,
|
||||
EWIN_BORDER_PART_EVENT_MASK);
|
||||
ESelectInput(ewin->bits[i].win, EWIN_BORDER_PART_EVENT_MASK);
|
||||
ewin->bits[i].x = -10;
|
||||
ewin->bits[i].y = -10;
|
||||
ewin->bits[i].w = -10;
|
||||
|
@ -656,7 +654,7 @@ EwinBorderSetTo(EWin * ewin, const Border * b)
|
|||
}
|
||||
|
||||
if (!ewin->shaded)
|
||||
EMoveWindow(disp, ewin->win_container, b->border.left, b->border.top);
|
||||
EMoveWindow(ewin->win_container, b->border.left, b->border.top);
|
||||
|
||||
EwinBorderCalcSizes(ewin);
|
||||
EwinPropagateShapes(ewin);
|
||||
|
@ -930,11 +928,10 @@ EwinBorderEventsConfigure(EWin * ewin, int mode)
|
|||
for (i = 0; i < ewin->border->num_winparts; i++)
|
||||
{
|
||||
if (ewin->border->part[i].flags & FLAG_TITLE)
|
||||
XSelectInput(disp, ewin->bits[i].win,
|
||||
ESelectInput(ewin->bits[i].win,
|
||||
EWIN_BORDER_TITLE_EVENT_MASK & emask);
|
||||
else
|
||||
XSelectInput(disp, ewin->bits[i].win,
|
||||
EWIN_BORDER_PART_EVENT_MASK & emask);
|
||||
ESelectInput(ewin->bits[i].win, EWIN_BORDER_PART_EVENT_MASK & emask);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ ButtonCreate(const char *name, int id, ImageClass * iclass,
|
|||
b->ref_count = 0;
|
||||
|
||||
EoSetWin(b, ECreateWindow(DeskGetWin(desk), -100, -100, 50, 50, 0));
|
||||
XSelectInput(disp, EoGetWin(b), BUTTON_EVENT_MASK);
|
||||
ESelectInput(EoGetWin(b), BUTTON_EVENT_MASK);
|
||||
EventCallbackRegister(EoGetWin(b), 0, ButtonHandleEvents, b);
|
||||
|
||||
EobjInit(&b->o, EOBJ_TYPE_BUTTON, -1, -1, -1, -1);
|
||||
|
@ -177,7 +177,7 @@ ButtonDestroy(Button * b)
|
|||
Efree(b->name);
|
||||
|
||||
if (EoGetWin(b))
|
||||
EDestroyWindow(disp, EoGetWin(b));
|
||||
EDestroyWindow(EoGetWin(b));
|
||||
|
||||
if (b->iclass)
|
||||
b->iclass->ref_count--;
|
||||
|
@ -268,18 +268,18 @@ ButtonShow(Button * b)
|
|||
resize = 1;
|
||||
|
||||
if ((move) && (resize))
|
||||
EMoveResizeWindow(disp, EoGetWin(b), EoGetX(b), EoGetY(b), EoGetW(b),
|
||||
EMoveResizeWindow(EoGetWin(b), EoGetX(b), EoGetY(b), EoGetW(b),
|
||||
EoGetH(b));
|
||||
else if (move)
|
||||
EMoveWindow(disp, EoGetWin(b), EoGetX(b), EoGetY(b));
|
||||
EMoveWindow(EoGetWin(b), EoGetX(b), EoGetY(b));
|
||||
else if (resize)
|
||||
EResizeWindow(disp, EoGetWin(b), EoGetW(b), EoGetH(b));
|
||||
EResizeWindow(EoGetWin(b), EoGetW(b), EoGetH(b));
|
||||
if (EoIsSticky(b))
|
||||
XRaiseWindow(disp, EoGetWin(b));
|
||||
ERaiseWindow(EoGetWin(b));
|
||||
|
||||
ButtonDraw(b);
|
||||
b->visible = 1;
|
||||
EMapWindow(disp, EoGetWin(b));
|
||||
EMapWindow(EoGetWin(b));
|
||||
b->cx = EoGetX(b);
|
||||
b->cy = EoGetY(b);
|
||||
b->cw = EoGetW(b);
|
||||
|
@ -300,14 +300,13 @@ ButtonMoveToDesktop(Button * b, int desk)
|
|||
EoSetDesk(b, desk);
|
||||
|
||||
if (desk != pdesk)
|
||||
EReparentWindow(disp, EoGetWin(b), DeskGetWin(desk), EoGetX(b),
|
||||
EoGetY(b));
|
||||
EReparentWindow(EoGetWin(b), DeskGetWin(desk), EoGetX(b), EoGetY(b));
|
||||
}
|
||||
|
||||
void
|
||||
ButtonHide(Button * b)
|
||||
{
|
||||
EUnmapWindow(disp, EoGetWin(b));
|
||||
EUnmapWindow(EoGetWin(b));
|
||||
b->visible = 0;
|
||||
}
|
||||
|
||||
|
@ -391,14 +390,14 @@ ButtonMoveToCoord(Button * b, int x, int y)
|
|||
if ((EoGetW(b) != b->cw) || (EoGetH(b) != b->ch))
|
||||
resize = 1;
|
||||
if ((move) && (resize))
|
||||
EMoveResizeWindow(disp, EoGetWin(b), EoGetX(b), EoGetY(b), EoGetW(b),
|
||||
EMoveResizeWindow(EoGetWin(b), EoGetX(b), EoGetY(b), EoGetW(b),
|
||||
EoGetH(b));
|
||||
else if (move)
|
||||
EMoveWindow(disp, EoGetWin(b), EoGetX(b), EoGetY(b));
|
||||
EMoveWindow(EoGetWin(b), EoGetX(b), EoGetY(b));
|
||||
else if (resize)
|
||||
EResizeWindow(disp, EoGetWin(b), EoGetW(b), EoGetH(b));
|
||||
EResizeWindow(EoGetWin(b), EoGetW(b), EoGetH(b));
|
||||
if (EoIsSticky(b))
|
||||
XRaiseWindow(disp, EoGetWin(b));
|
||||
ERaiseWindow(EoGetWin(b));
|
||||
b->cx = EoGetX(b);
|
||||
b->cy = EoGetY(b);
|
||||
b->cw = EoGetW(b);
|
||||
|
@ -550,19 +549,19 @@ ButtonEmbedWindow(Button * b, Window WindowToEmbed)
|
|||
|
||||
unsigned int w, h;
|
||||
|
||||
EReparentWindow(disp, WindowToEmbed, EoGetWin(b), 0, 0);
|
||||
EReparentWindow(WindowToEmbed, EoGetWin(b), 0, 0);
|
||||
b->inside_win = WindowToEmbed;
|
||||
GetWinWH(WindowToEmbed, &w, &h);
|
||||
EMoveWindow(disp, b->inside_win, (EoGetW(b) - w) >> 1, (EoGetH(b) - h) >> 1);
|
||||
EMoveWindow(b->inside_win, (EoGetW(b) - w) >> 1, (EoGetH(b) - h) >> 1);
|
||||
b->event_win = ECreateEventWindow(EoGetWin(b), 0, 0, w, h);
|
||||
EventCallbackRegister(b->event_win, 0, ButtonHandleEvents, b);
|
||||
|
||||
XSelectInput(disp, b->event_win,
|
||||
ESelectInput(b->event_win,
|
||||
ButtonPressMask | ButtonReleaseMask | EnterWindowMask |
|
||||
LeaveWindowMask | ButtonMotionMask);
|
||||
|
||||
EMoveWindow(disp, b->event_win, (EoGetW(b) - w) >> 1, (EoGetH(b) - h) >> 1);
|
||||
EMapRaised(disp, b->event_win);
|
||||
EMoveWindow(b->event_win, (EoGetW(b) - w) >> 1, (EoGetH(b) - h) >> 1);
|
||||
EMapRaised(b->event_win);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -86,11 +86,11 @@ CoordsShow(EWin * ewin)
|
|||
if (!c_win)
|
||||
c_win = ECreateWindow(VRoot.win, 0, 0, 1, 1, 2);
|
||||
|
||||
EMoveResizeWindow(disp, c_win, cx, cy, cw, ch);
|
||||
XRaiseWindow(disp, c_win);
|
||||
EMoveResizeWindow(c_win, cx, cy, cw, ch);
|
||||
ERaiseWindow(c_win);
|
||||
|
||||
if (!coords_visible)
|
||||
EMapWindow(disp, c_win);
|
||||
EMapWindow(c_win);
|
||||
coords_visible = 1;
|
||||
|
||||
pq = Mode.queue_up;
|
||||
|
@ -105,6 +105,6 @@ void
|
|||
CoordsHide(void)
|
||||
{
|
||||
if (c_win)
|
||||
EUnmapWindow(disp, c_win);
|
||||
EUnmapWindow(c_win);
|
||||
coords_visible = 0;
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@ DeskEventsConfigure(Desk * d, int mode)
|
|||
}
|
||||
else
|
||||
{
|
||||
XGetWindowAttributes(disp, EoGetWin(d), &xwa);
|
||||
EGetWindowAttributes(EoGetWin(d), &xwa);
|
||||
d->event_mask = xwa.your_event_mask | EDESK_EVENT_MASK;
|
||||
event_mask =
|
||||
PropertyChangeMask | SubstructureRedirectMask |
|
||||
|
@ -353,7 +353,7 @@ DeskEventsConfigure(Desk * d, int mode)
|
|||
event_mask |= SubstructureNotifyMask;
|
||||
#endif
|
||||
}
|
||||
XSelectInput(disp, EoGetWin(d), event_mask);
|
||||
ESelectInput(EoGetWin(d), event_mask);
|
||||
}
|
||||
|
||||
static Desk *
|
||||
|
@ -453,7 +453,7 @@ DeskDestroy(int desk)
|
|||
if (desk > 0)
|
||||
EobjListStackDel(&d->o);
|
||||
|
||||
EDestroyWindow(disp, EoGetWin(d));
|
||||
EDestroyWindow(EoGetWin(d));
|
||||
|
||||
Efree(d);
|
||||
desks.desk[desk] = NULL;
|
||||
|
@ -468,9 +468,9 @@ DeskResize(int desk, int w, int h)
|
|||
|
||||
if (desk > 0)
|
||||
{
|
||||
EResizeWindow(disp, EoGetWin(d), w, h);
|
||||
EResizeWindow(EoGetWin(d), w, h);
|
||||
if (!d->viewable)
|
||||
EMoveWindow(disp, EoGetWin(d), VRoot.w, 0);
|
||||
EMoveWindow(EoGetWin(d), VRoot.w, 0);
|
||||
}
|
||||
BackgroundPixmapFree(d->bg);
|
||||
RefreshDesktop(desk);
|
||||
|
@ -812,12 +812,12 @@ SlideWindowTo(Window win, int fx, int fy, int tx, int ty, int speed)
|
|||
{
|
||||
x = ((fx * (1024 - k)) + (tx * k)) >> 10;
|
||||
y = ((fy * (1024 - k)) + (ty * k)) >> 10;
|
||||
EMoveWindow(disp, win, x, y);
|
||||
EMoveWindow(win, x, y);
|
||||
ecore_x_sync();
|
||||
|
||||
k = ETimedLoopNext();
|
||||
}
|
||||
EMoveWindow(disp, win, tx, ty);
|
||||
EMoveWindow(win, tx, ty);
|
||||
|
||||
ecore_x_ungrab();
|
||||
}
|
||||
|
@ -929,8 +929,8 @@ MoveStickyWindowsToCurrentDesk(void)
|
|||
|
||||
EoSetDesk(ewin, desk);
|
||||
ewin->parent = EoGetWin(d);
|
||||
EReparentWindow(disp, EoGetWin(ewin), ewin->parent, VRoot.w, VRoot.h);
|
||||
EMoveWindow(disp, EoGetWin(ewin), EoGetX(ewin), EoGetY(ewin));
|
||||
EReparentWindow(EoGetWin(ewin), ewin->parent, VRoot.w, VRoot.h);
|
||||
EMoveWindow(EoGetWin(ewin), EoGetX(ewin), EoGetY(ewin));
|
||||
HintsSetWindowArea(ewin);
|
||||
HintsSetWindowDesktop(ewin);
|
||||
}
|
||||
|
@ -1136,7 +1136,7 @@ MoveDesktop(int desk, int x, int y)
|
|||
}
|
||||
}
|
||||
|
||||
EMoveWindow(disp, EoGetWin(d), x, y);
|
||||
EMoveWindow(EoGetWin(d), x, y);
|
||||
|
||||
if (d->tag)
|
||||
ButtonMoveRelative(d->tag, dx, dy);
|
||||
|
@ -1163,7 +1163,7 @@ UncoverDesktop(int desk)
|
|||
d->viewable = 1;
|
||||
RefreshDesktop(desk);
|
||||
if (desk != 0)
|
||||
EMapWindow(disp, EoGetWin(d));
|
||||
EMapWindow(EoGetWin(d));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1204,7 +1204,7 @@ RaiseDesktop(int desk)
|
|||
if (Mode.mode == MODE_NONE)
|
||||
HandleDrawQueue();
|
||||
HintsSetCurrentDesktop();
|
||||
EMapWindow(disp, EoGetWin(d));
|
||||
EMapWindow(EoGetWin(d));
|
||||
ecore_x_sync();
|
||||
}
|
||||
|
||||
|
@ -1246,7 +1246,7 @@ HideDesktop(int desk)
|
|||
if (d->viewable)
|
||||
BackgroundTouch(d->bg);
|
||||
d->viewable = 0;
|
||||
EMoveWindow(disp, EoGetWin(d), VRoot.w, 0);
|
||||
EMoveWindow(EoGetWin(d), VRoot.w, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1272,7 +1272,7 @@ ShowDesktop(int desk)
|
|||
else
|
||||
{
|
||||
StackDesktops();
|
||||
EMapWindow(disp, EoGetWin(d));
|
||||
EMapWindow(EoGetWin(d));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1721,7 +1721,7 @@ CB_DesktopDisplayRedraw(Dialog * d __UNUSED__, int val, void *data)
|
|||
wins[i] = ECreateWindow(win, 0, 0, 64, 48, 0);
|
||||
XSetWindowBorderWidth(disp, wins[i], 1);
|
||||
pmap = ecore_x_pixmap_new(wins[i], 64, 48, VRoot.depth);
|
||||
ESetWindowBackgroundPixmap(disp, wins[i], pmap);
|
||||
ESetWindowBackgroundPixmap(wins[i], pmap);
|
||||
|
||||
bg = DeskGetBackground(i);
|
||||
if (bg)
|
||||
|
@ -1745,16 +1745,16 @@ CB_DesktopDisplayRedraw(Dialog * d __UNUSED__, int val, void *data)
|
|||
num = tmp_desktops - 1;
|
||||
if (num < 1)
|
||||
num = 1;
|
||||
XRaiseWindow(disp, wins[i]);
|
||||
EMoveWindow(disp, wins[i], (i * (w - 64 - 2)) / num,
|
||||
ERaiseWindow(wins[i]);
|
||||
EMoveWindow(wins[i], (i * (w - 64 - 2)) / num,
|
||||
(i * (h - 48 - 2)) / num);
|
||||
EMapWindow(disp, wins[i]);
|
||||
EMapWindow(wins[i]);
|
||||
}
|
||||
|
||||
for (i = tmp_desktops; i < Conf.desks.num; i++)
|
||||
{
|
||||
EUnmapWindow(disp, wins[i]);
|
||||
EDestroyWindow(disp, wins[i]);
|
||||
EUnmapWindow(wins[i]);
|
||||
EDestroyWindow(wins[i]);
|
||||
wins[i] = None;
|
||||
}
|
||||
|
||||
|
@ -1996,16 +1996,16 @@ CB_AreaDisplayRedraw(Dialog * d __UNUSED__, int val, void *data)
|
|||
{
|
||||
ImageclassApplyCopy(ic, awin, 18, 14, 0, 0, STATE_NORMAL, &pmm, 0,
|
||||
ST_UNKNWN);
|
||||
ESetWindowBackgroundPixmap(disp, awin, pmm.pmap);
|
||||
ESetWindowBackgroundPixmap(awin, pmm.pmap);
|
||||
FreePmapMask(&pmm);
|
||||
}
|
||||
XClearWindow(disp, awin);
|
||||
EClearWindow(awin);
|
||||
called = 1;
|
||||
}
|
||||
EMoveResizeWindow(disp, awin, ((w / 2) - (9 * tmp_area_x)),
|
||||
EMoveResizeWindow(awin, ((w / 2) - (9 * tmp_area_x)),
|
||||
((h / 2) - (7 * (9 - tmp_area_y))), 18 * tmp_area_x,
|
||||
14 * (9 - tmp_area_y));
|
||||
EMapWindow(disp, awin);
|
||||
EMapWindow(awin);
|
||||
|
||||
if ((tmp_area_x > 1) || ((9 - tmp_area_y) > 1))
|
||||
Esnprintf(s, sizeof(s), _("%i x %i\nScreens in size"), tmp_area_x,
|
||||
|
|
102
src/dialog.c
102
src/dialog.c
|
@ -287,7 +287,7 @@ DialogDestroy(Dialog * d)
|
|||
if (d->keybindings)
|
||||
Efree(d->keybindings);
|
||||
|
||||
EDestroyWindow(disp, d->win);
|
||||
EDestroyWindow(d->win);
|
||||
|
||||
Efree(d);
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ DialogAddButton(Dialog * d, const char *text, DialogCallbackFunc * func,
|
|||
db->func = func;
|
||||
db->win = ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
EventCallbackRegister(db->win, 0, DButtonHandleEvents, db);
|
||||
EMapWindow(disp, db->win);
|
||||
EMapWindow(db->win);
|
||||
db->x = -1;
|
||||
db->y = -1;
|
||||
db->w = -1;
|
||||
|
@ -373,7 +373,7 @@ DialogAddButton(Dialog * d, const char *text, DialogCallbackFunc * func,
|
|||
TextSize(db->tclass, 0, 0, STATE_NORMAL, text, &w, &h, 17);
|
||||
db->w = w + db->iclass->padding.left + db->iclass->padding.right;
|
||||
db->h = h + db->iclass->padding.top + db->iclass->padding.bottom;
|
||||
XSelectInput(disp, db->win,
|
||||
ESelectInput(db->win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask | ExposureMask);
|
||||
}
|
||||
|
@ -549,12 +549,12 @@ ShowDialog(Dialog * d)
|
|||
|
||||
d->button[i]->w = mw;
|
||||
d->button[i]->h = mh;
|
||||
EMoveResizeWindow(disp, d->button[i]->win, d->button[i]->x,
|
||||
EMoveResizeWindow(d->button[i]->win, d->button[i]->x,
|
||||
d->button[i]->y, d->button[i]->w, d->button[i]->h);
|
||||
}
|
||||
d->w = w;
|
||||
d->h = h;
|
||||
EResizeWindow(disp, d->win, w, h);
|
||||
EResizeWindow(d->win, w, h);
|
||||
|
||||
pq = Mode.queue_up;
|
||||
Mode.queue_up = 0;
|
||||
|
@ -564,7 +564,7 @@ ShowDialog(Dialog * d)
|
|||
if (ewin)
|
||||
{
|
||||
ewin->client.event_mask |= KeyPressMask | ExposureMask;
|
||||
XSelectInput(disp, d->win, ewin->client.event_mask);
|
||||
ESelectInput(d->win, ewin->client.event_mask);
|
||||
|
||||
if (ewin->client.already_placed)
|
||||
{
|
||||
|
@ -597,7 +597,7 @@ DialogClose(Dialog * d)
|
|||
if (d->exit_func)
|
||||
d->exit_func(d, d->exit_val, NULL);
|
||||
|
||||
EUnmapWindow(disp, d->win);
|
||||
EUnmapWindow(d->win);
|
||||
}
|
||||
|
||||
DItem *
|
||||
|
@ -914,21 +914,21 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
if (di->item.slider.numeric)
|
||||
{
|
||||
di->win = ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
EMapWindow(disp, di->win);
|
||||
XSelectInput(disp, di->win,
|
||||
EMapWindow(di->win);
|
||||
ESelectInput(di->win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask
|
||||
| ButtonReleaseMask);
|
||||
}
|
||||
di->item.slider.base_win = ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
EMapWindow(disp, di->item.slider.base_win);
|
||||
EMapWindow(di->item.slider.base_win);
|
||||
di->item.slider.knob_win = ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
EMapWindow(disp, di->item.slider.knob_win);
|
||||
XSelectInput(disp, di->item.slider.base_win,
|
||||
EMapWindow(di->item.slider.knob_win);
|
||||
ESelectInput(di->item.slider.base_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask);
|
||||
EventCallbackRegister(di->item.slider.base_win, 0, DialogHandleEvents,
|
||||
d);
|
||||
XSelectInput(disp, di->item.slider.knob_win,
|
||||
ESelectInput(di->item.slider.knob_win,
|
||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask);
|
||||
EventCallbackRegister(di->item.slider.knob_win, 0, DialogHandleEvents,
|
||||
d);
|
||||
|
@ -1021,7 +1021,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
imlib_free_image();
|
||||
di->item.slider.border_win =
|
||||
ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
EMapWindow(disp, di->item.slider.border_win);
|
||||
EMapWindow(di->item.slider.border_win);
|
||||
}
|
||||
}
|
||||
di->item.slider.ic_border->ref_count++;
|
||||
|
@ -1049,8 +1049,8 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
iw += di->iclass->padding.left + di->iclass->padding.right;
|
||||
ih += di->iclass->padding.top + di->iclass->padding.bottom;
|
||||
di->win = ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
EMapWindow(disp, di->win);
|
||||
XSelectInput(disp, di->win,
|
||||
EMapWindow(di->win);
|
||||
ESelectInput(di->win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask | ExposureMask);
|
||||
di->w = iw;
|
||||
|
@ -1062,11 +1062,11 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
iw += di->iclass->padding.left + di->iclass->padding.right;
|
||||
ih += di->iclass->padding.top + di->iclass->padding.bottom;
|
||||
di->win = ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
EMapWindow(disp, di->win);
|
||||
XSelectInput(disp, di->win, ExposureMask);
|
||||
EMapWindow(di->win);
|
||||
ESelectInput(di->win, ExposureMask);
|
||||
di->item.area.area_win = ECreateWindow(di->win, -20, -20, 2, 2, 0);
|
||||
EMapWindow(disp, di->item.area.area_win);
|
||||
XSelectInput(disp, di->item.area.area_win,
|
||||
EMapWindow(di->item.area.area_win);
|
||||
ESelectInput(di->item.area.area_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask | ExposureMask | PointerMotionMask);
|
||||
EventCallbackRegister(di->item.area.area_win, 0, DialogHandleEvents, d);
|
||||
|
@ -1095,9 +1095,9 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
di->item.check_button.check_win =
|
||||
ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
di->win = ECreateEventWindow(d->win, -20, -20, 2, 2);
|
||||
EMapWindow(disp, di->item.check_button.check_win);
|
||||
EMapWindow(disp, di->win);
|
||||
XSelectInput(disp, di->win,
|
||||
EMapWindow(di->item.check_button.check_win);
|
||||
EMapWindow(di->win);
|
||||
ESelectInput(di->win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask | ExposureMask);
|
||||
di->w = iw;
|
||||
|
@ -1122,12 +1122,11 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
iw = imlib_image_get_width();
|
||||
ih = imlib_image_get_height();
|
||||
di->win = ECreateWindow(d->win, 0, 0, iw, ih, 0);
|
||||
EMapWindow(disp, di->win);
|
||||
EMapWindow(di->win);
|
||||
register_win_callback = 0;
|
||||
imlib_render_pixmaps_for_whole_image(&pmap, &mask);
|
||||
ESetWindowBackgroundPixmap(disp, di->win, pmap);
|
||||
EShapeCombineMask(disp, di->win, ShapeBounding, 0,
|
||||
0, mask, ShapeSet);
|
||||
ESetWindowBackgroundPixmap(di->win, pmap);
|
||||
EShapeCombineMask(di->win, ShapeBounding, 0, 0, mask, ShapeSet);
|
||||
imlib_free_pixmap_and_mask(pmap);
|
||||
imlib_free_image();
|
||||
}
|
||||
|
@ -1139,7 +1138,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
iw = di->iclass->padding.left + di->iclass->padding.right;
|
||||
ih = di->iclass->padding.top + di->iclass->padding.bottom;
|
||||
di->win = ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
EMapWindow(disp, di->win);
|
||||
EMapWindow(di->win);
|
||||
register_win_callback = 0;
|
||||
di->w = iw;
|
||||
di->h = ih;
|
||||
|
@ -1166,9 +1165,9 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
di->item.radio_button.radio_win =
|
||||
ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
di->win = ECreateEventWindow(d->win, -20, -20, 2, 2);
|
||||
EMapWindow(disp, di->item.radio_button.radio_win);
|
||||
EMapWindow(disp, di->win);
|
||||
XSelectInput(disp, di->win,
|
||||
EMapWindow(di->item.radio_button.radio_win);
|
||||
EMapWindow(di->win);
|
||||
ESelectInput(di->win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask | ExposureMask);
|
||||
di->w = iw;
|
||||
|
@ -1300,11 +1299,10 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
- (dii->padding.top + dii->padding.bottom) -
|
||||
dii->h) * dii->align_v) >> 10);
|
||||
if (dii->win)
|
||||
EMoveResizeWindow(disp, dii->win, dii->x, dii->y,
|
||||
EMoveResizeWindow(dii->win, dii->x, dii->y,
|
||||
dii->w, dii->h);
|
||||
if (dii->type == DITEM_CHECKBUTTON)
|
||||
EMoveResizeWindow(disp,
|
||||
dii->item.check_button.
|
||||
EMoveResizeWindow(dii->item.check_button.
|
||||
check_win, dii->x,
|
||||
dii->y +
|
||||
((dii->h -
|
||||
|
@ -1315,8 +1313,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
dii->item.check_button.
|
||||
check_orig_h);
|
||||
if (dii->type == DITEM_RADIOBUTTON)
|
||||
EMoveResizeWindow(disp,
|
||||
dii->item.radio_button.
|
||||
EMoveResizeWindow(dii->item.radio_button.
|
||||
radio_win, dii->x,
|
||||
dii->y +
|
||||
((dii->h -
|
||||
|
@ -1334,8 +1331,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
dii->item.area.h =
|
||||
dii->h - (dii->iclass->padding.top +
|
||||
dii->iclass->padding.bottom);
|
||||
EMoveResizeWindow(disp,
|
||||
dii->item.area.area_win,
|
||||
EMoveResizeWindow(dii->item.area.area_win,
|
||||
dii->iclass->padding.left,
|
||||
dii->iclass->padding.top,
|
||||
dii->item.area.w,
|
||||
|
@ -1356,8 +1352,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
dii->item.slider.knob_h =
|
||||
dii->item.slider.knob_orig_h;
|
||||
if (dii->item.slider.base_win)
|
||||
EMoveResizeWindow(disp,
|
||||
dii->item.slider.base_win,
|
||||
EMoveResizeWindow(dii->item.slider.base_win,
|
||||
dii->x +
|
||||
dii->item.slider.base_x,
|
||||
dii->y +
|
||||
|
@ -1365,8 +1360,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
dii->item.slider.base_w,
|
||||
dii->item.slider.base_h);
|
||||
if (dii->item.slider.border_win)
|
||||
EMoveResizeWindow(disp,
|
||||
dii->item.slider.
|
||||
EMoveResizeWindow(dii->item.slider.
|
||||
border_win,
|
||||
dii->x +
|
||||
dii->item.slider.border_x,
|
||||
|
@ -1375,7 +1369,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
dii->item.slider.border_w,
|
||||
dii->item.slider.border_h);
|
||||
if (dii->win)
|
||||
EMoveResizeWindow(disp, dii->win,
|
||||
EMoveResizeWindow(dii->win,
|
||||
dii->x +
|
||||
dii->item.slider.
|
||||
numeric_x,
|
||||
|
@ -1432,37 +1426,37 @@ MoveTableBy(Dialog * d, DItem * di, int dx, int dy)
|
|||
if (dii->type == DITEM_TABLE)
|
||||
MoveTableBy(d, dii, dx, dy);
|
||||
if (dii->win)
|
||||
EMoveWindow(disp, dii->win, dii->x, dii->y);
|
||||
EMoveWindow(dii->win, dii->x, dii->y);
|
||||
if (dii->type == DITEM_CHECKBUTTON)
|
||||
EMoveWindow(disp, dii->item.check_button.check_win, dii->x,
|
||||
EMoveWindow(dii->item.check_button.check_win, dii->x,
|
||||
dii->y +
|
||||
((dii->h - dii->item.check_button.check_orig_h) / 2));
|
||||
if (dii->type == DITEM_RADIOBUTTON)
|
||||
EMoveWindow(disp, dii->item.radio_button.radio_win, dii->x,
|
||||
EMoveWindow(dii->item.radio_button.radio_win, dii->x,
|
||||
dii->y +
|
||||
((dii->h - dii->item.radio_button.radio_orig_h) / 2));
|
||||
if (dii->type == DITEM_SLIDER)
|
||||
{
|
||||
if (dii->item.slider.base_win)
|
||||
EMoveResizeWindow(disp, dii->item.slider.base_win,
|
||||
EMoveResizeWindow(dii->item.slider.base_win,
|
||||
dii->x + dii->item.slider.base_x,
|
||||
dii->y + dii->item.slider.base_y,
|
||||
dii->item.slider.base_w,
|
||||
dii->item.slider.base_h);
|
||||
if (dii->item.slider.knob_win)
|
||||
EMoveResizeWindow(disp, dii->item.slider.knob_win,
|
||||
EMoveResizeWindow(dii->item.slider.knob_win,
|
||||
dii->x + dii->item.slider.knob_x,
|
||||
dii->y + dii->item.slider.knob_y,
|
||||
dii->item.slider.knob_w,
|
||||
dii->item.slider.knob_h);
|
||||
if (dii->item.slider.border_win)
|
||||
EMoveResizeWindow(disp, dii->item.slider.border_win,
|
||||
EMoveResizeWindow(dii->item.slider.border_win,
|
||||
dii->x + dii->item.slider.border_x,
|
||||
dii->y + dii->item.slider.border_y,
|
||||
dii->item.slider.border_w,
|
||||
dii->item.slider.border_h);
|
||||
if (dii->win)
|
||||
EMoveResizeWindow(disp, dii->win,
|
||||
EMoveResizeWindow(dii->win,
|
||||
dii->x + dii->item.slider.numeric_x,
|
||||
dii->y + dii->item.slider.numeric_y,
|
||||
dii->item.slider.numeric_w,
|
||||
|
@ -1540,7 +1534,7 @@ DialogDrawItems(Dialog * d, DItem * di, int x, int y, int w, int h)
|
|||
((di->item.slider.base_w - di->item.slider.knob_w) / 2);
|
||||
}
|
||||
if (di->item.slider.knob_win)
|
||||
EMoveResizeWindow(disp, di->item.slider.knob_win,
|
||||
EMoveResizeWindow(di->item.slider.knob_win,
|
||||
di->x + di->item.slider.knob_x,
|
||||
di->y + di->item.slider.knob_y,
|
||||
di->item.slider.knob_w,
|
||||
|
@ -1604,7 +1598,7 @@ DialogDrawItems(Dialog * d, DItem * di, int x, int y, int w, int h)
|
|||
di->item.check_button.check_orig_w,
|
||||
di->item.check_button.check_orig_h, 0, 0, state,
|
||||
0, ST_WIDGET);
|
||||
XClearArea(disp, d->win, di->x, di->y, di->w, di->h, False);
|
||||
EClearArea(d->win, di->x, di->y, di->w, di->h, False);
|
||||
TextDraw(di->tclass, d->win, 0, 0, STATE_NORMAL,
|
||||
di->item.check_button.text,
|
||||
di->x + di->item.check_button.check_orig_w +
|
||||
|
@ -1614,7 +1608,7 @@ DialogDrawItems(Dialog * d, DItem * di, int x, int y, int w, int h)
|
|||
di->tclass->justification);
|
||||
break;
|
||||
case DITEM_TEXT:
|
||||
XClearArea(disp, d->win, di->x, di->y, di->w, di->h, False);
|
||||
EClearArea(d->win, di->x, di->y, di->w, di->h, False);
|
||||
TextDraw(di->tclass, d->win, 0, 0, STATE_NORMAL,
|
||||
di->item.text.text, di->x, di->y, di->w, 99999, 17,
|
||||
di->tclass->justification);
|
||||
|
@ -1647,7 +1641,7 @@ DialogDrawItems(Dialog * d, DItem * di, int x, int y, int w, int h)
|
|||
di->item.radio_button.radio_orig_w,
|
||||
di->item.radio_button.radio_orig_w, 0, 0, state,
|
||||
0, ST_WIDGET);
|
||||
XClearArea(disp, d->win, di->x, di->y, di->w, di->h, False);
|
||||
EClearArea(d->win, di->x, di->y, di->w, di->h, False);
|
||||
TextDraw(di->tclass, d->win, 0, 0, STATE_NORMAL,
|
||||
di->item.radio_button.text,
|
||||
di->x + di->item.radio_button.radio_orig_w +
|
||||
|
|
22
src/draw.c
22
src/draw.c
|
@ -409,8 +409,7 @@ EBlendRemoveShape(EWin * ewin, Pixmap pmap, int x, int y)
|
|||
h = EoGetH(ewin);
|
||||
if (!rl)
|
||||
{
|
||||
rl =
|
||||
EShapeGetRectangles(disp, EoGetWin(ewin), ShapeBounding, &rn, &ord);
|
||||
rl = EShapeGetRectangles(EoGetWin(ewin), ShapeBounding, &rn, &ord);
|
||||
if (rn < 1)
|
||||
return;
|
||||
else if (rn == 1)
|
||||
|
@ -474,8 +473,7 @@ EBlendPixImg(EWin * ewin, PixImg * s1, PixImg * s2, PixImg * dst, int x, int y,
|
|||
}
|
||||
if (!rl)
|
||||
{
|
||||
rl =
|
||||
EShapeGetRectangles(disp, EoGetWin(ewin), ShapeBounding, &rn, &ord);
|
||||
rl = EShapeGetRectangles(EoGetWin(ewin), ShapeBounding, &rn, &ord);
|
||||
if (rl)
|
||||
XSetClipRectangles(disp, gc, x, y, rl, rn, ord);
|
||||
if (!rl)
|
||||
|
@ -1812,7 +1810,7 @@ PropagateShapes(Window win)
|
|||
AddItem(dq, "DRAW", dq->win, LIST_TYPE_DRAW);
|
||||
return;
|
||||
}
|
||||
EGetGeometry(disp, win, &rt, &x, &y, &w, &h, &d, &d);
|
||||
EGetGeometry(win, &rt, &x, &y, &w, &h, &d, &d);
|
||||
if ((w <= 0) || (h <= 0))
|
||||
return;
|
||||
|
||||
|
@ -1833,8 +1831,7 @@ PropagateShapes(Window win)
|
|||
if ((att.class == InputOutput) && (att.map_state != IsUnmapped))
|
||||
{
|
||||
rl = NULL;
|
||||
rl = EShapeGetRectangles(disp, list[i], ShapeBounding, &rn,
|
||||
&ord);
|
||||
rl = EShapeGetRectangles(list[i], ShapeBounding, &rn, &ord);
|
||||
if (rl)
|
||||
{
|
||||
num_rects += rn;
|
||||
|
@ -1870,28 +1867,27 @@ PropagateShapes(Window win)
|
|||
/* set the rects as the shape mask */
|
||||
if (rects)
|
||||
{
|
||||
EShapeCombineRectangles(disp, win, ShapeBounding, 0, 0, rects,
|
||||
EShapeCombineRectangles(win, ShapeBounding, 0, 0, rects,
|
||||
num_rects, ShapeSet, Unsorted);
|
||||
Efree(rects);
|
||||
rl = NULL;
|
||||
rl = EShapeGetRectangles(disp, win, ShapeBounding, &rn, &ord);
|
||||
rl = EShapeGetRectangles(win, ShapeBounding, &rn, &ord);
|
||||
if (rl)
|
||||
{
|
||||
if (rn < 1)
|
||||
EShapeCombineMask(disp, win, ShapeBounding, 0, 0, None,
|
||||
EShapeCombineMask(win, ShapeBounding, 0, 0, None,
|
||||
ShapeSet);
|
||||
else if (rn == 1)
|
||||
{
|
||||
if ((rl[0].x == 0) && (rl[0].y == 0)
|
||||
&& (rl[0].width == ww) && (rl[0].height == hh))
|
||||
EShapeCombineMask(disp, win, ShapeBounding, 0, 0,
|
||||
EShapeCombineMask(win, ShapeBounding, 0, 0,
|
||||
None, ShapeSet);
|
||||
}
|
||||
Efree(rl);
|
||||
}
|
||||
else
|
||||
EShapeCombineMask(disp, win, ShapeBounding, 0, 0, None,
|
||||
ShapeSet);
|
||||
EShapeCombineMask(win, ShapeBounding, 0, 0, None, ShapeSet);
|
||||
}
|
||||
XFree(list);
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ ECompMgrMoveResizeFix(EObj * eo, int x, int y, int w, int h)
|
|||
|
||||
if (!c || !Conf_compmgr.resize_fix_enable)
|
||||
{
|
||||
EMoveResizeWindow(disp, eo->win, x, y, w, h);
|
||||
EMoveResizeWindow(eo->win, x, y, w, h);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@ ECompMgrMoveResizeFix(EObj * eo, int x, int y, int w, int h)
|
|||
GetWinWH(eo->win, &wo, &ho);
|
||||
if (wo <= 0 || ho <= 0 || (wo == w && ho == h))
|
||||
{
|
||||
EMoveResizeWindow(disp, eo->win, x, y, w, h);
|
||||
EMoveResizeWindow(eo->win, x, y, w, h);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ ECompMgrMoveResizeFix(EObj * eo, int x, int y, int w, int h)
|
|||
0, 0, 0, 0, 0, 0, wo, ho);
|
||||
|
||||
/* Resize (+move) */
|
||||
EMoveResizeWindow(disp, eo->win, x, y, w, h);
|
||||
EMoveResizeWindow(eo->win, x, y, w, h);
|
||||
|
||||
/* Paste old contents back in */
|
||||
if (w < wo)
|
||||
|
|
|
@ -28,7 +28,7 @@ void ECompMgrMoveResizeFix(EObj * eo, int x, int y, int w,
|
|||
#define ECompMgrActive() 0 /* FIXME - Remove */
|
||||
|
||||
#define ECompMgrWinDel(eo, gone, do_fade)
|
||||
#define ExMoveResizeWindow(eo, x, y, w, h) EMoveResizeWindow(disp, (eo)->win, x, y, w, h)
|
||||
#define ExMoveResizeWindow(eo, x, y, w, h) EMoveResizeWindow((eo)->win, x, y, w, h)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
32
src/edge.c
32
src/edge.c
|
@ -189,10 +189,10 @@ EdgeWindowsShow(void)
|
|||
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);
|
||||
XSelectInput(disp, w2, EnterWindowMask | LeaveWindowMask);
|
||||
XSelectInput(disp, w3, EnterWindowMask | LeaveWindowMask);
|
||||
XSelectInput(disp, w4, EnterWindowMask | LeaveWindowMask);
|
||||
ESelectInput(w1, EnterWindowMask | LeaveWindowMask);
|
||||
ESelectInput(w2, EnterWindowMask | LeaveWindowMask);
|
||||
ESelectInput(w3, EnterWindowMask | LeaveWindowMask);
|
||||
ESelectInput(w4, EnterWindowMask | LeaveWindowMask);
|
||||
EventCallbackRegister(w1, 0, EdgeHandleEvents, (void *)0);
|
||||
EventCallbackRegister(w2, 0, EdgeHandleEvents, (void *)1);
|
||||
EventCallbackRegister(w3, 0, EdgeHandleEvents, (void *)2);
|
||||
|
@ -202,21 +202,21 @@ EdgeWindowsShow(void)
|
|||
GetAreaSize(&ax, &ay);
|
||||
|
||||
if (cx == 0 && !Conf.desks.areas_wraparound)
|
||||
EUnmapWindow(disp, w1);
|
||||
EUnmapWindow(w1);
|
||||
else
|
||||
EMapRaised(disp, w1);
|
||||
EMapRaised(w1);
|
||||
if (cx == (ax - 1) && !Conf.desks.areas_wraparound)
|
||||
EUnmapWindow(disp, w2);
|
||||
EUnmapWindow(w2);
|
||||
else
|
||||
EMapRaised(disp, w2);
|
||||
EMapRaised(w2);
|
||||
if (cy == 0 && !Conf.desks.areas_wraparound)
|
||||
EUnmapWindow(disp, w3);
|
||||
EUnmapWindow(w3);
|
||||
else
|
||||
EMapRaised(disp, w3);
|
||||
EMapRaised(w3);
|
||||
if (cy == (ay - 1) && !Conf.desks.areas_wraparound)
|
||||
EUnmapWindow(disp, w4);
|
||||
EUnmapWindow(w4);
|
||||
else
|
||||
EMapRaised(disp, w4);
|
||||
EMapRaised(w4);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -224,9 +224,9 @@ EdgeWindowsHide(void)
|
|||
{
|
||||
if (w1)
|
||||
{
|
||||
EUnmapWindow(disp, w1);
|
||||
EUnmapWindow(disp, w2);
|
||||
EUnmapWindow(disp, w3);
|
||||
EUnmapWindow(disp, w4);
|
||||
EUnmapWindow(w1);
|
||||
EUnmapWindow(w2);
|
||||
EUnmapWindow(w3);
|
||||
EUnmapWindow(w4);
|
||||
}
|
||||
}
|
||||
|
|
115
src/ewin-ops.c
115
src/ewin-ops.c
|
@ -45,7 +45,7 @@ SlideEwinTo(EWin * ewin, int fx, int fy, int tx, int ty, int speed)
|
|||
tmpx = x;
|
||||
tmpy = y;
|
||||
if (Conf.slidemode == 0)
|
||||
EMoveWindow(disp, EoGetWin(ewin), tmpx, tmpy);
|
||||
EMoveWindow(EoGetWin(ewin), tmpx, tmpy);
|
||||
else
|
||||
DrawEwinShape(ewin, Conf.slidemode, tmpx, tmpy,
|
||||
ewin->client.w, ewin->client.h, firstlast);
|
||||
|
@ -100,7 +100,7 @@ SlideEwinsTo(EWin ** ewin, int *fx, int *fy, int *tx, int *ty, int num_wins,
|
|||
tmpw = ewin[i]->client.w;
|
||||
tmph = ewin[i]->client.h;
|
||||
if (ewin[i]->type == EWIN_TYPE_MENU)
|
||||
EMoveWindow(disp, EoGetWin(ewin[i]), tmpx, tmpy);
|
||||
EMoveWindow(EoGetWin(ewin[i]), tmpx, tmpy);
|
||||
else
|
||||
DrawEwinShape(ewin[i], 0, tmpx, tmpy, tmpw, tmph, firstlast);
|
||||
if (firstlast == 0)
|
||||
|
@ -262,17 +262,16 @@ doMoveResizeEwin(EWin * ewin, int x, int y, int w, int h, int flags)
|
|||
|
||||
if (ewin->shaded == 0)
|
||||
{
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
ewin->client.w, ewin->client.h);
|
||||
}
|
||||
else
|
||||
{
|
||||
EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1);
|
||||
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
|
||||
}
|
||||
|
||||
EMoveResizeWindow(disp, ewin->client.win, 0, 0,
|
||||
ewin->client.w, ewin->client.h);
|
||||
EMoveResizeWindow(ewin->client.win, 0, 0, ewin->client.w, ewin->client.h);
|
||||
|
||||
EwinBorderCalcSizes(ewin);
|
||||
|
||||
|
@ -527,13 +526,13 @@ EwinInstantShade(EWin * ewin, int force)
|
|||
default:
|
||||
case 0:
|
||||
att.win_gravity = EastGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
EoSetW(ewin, b);
|
||||
break;
|
||||
case 1:
|
||||
att.win_gravity = WestGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
d = EoGetX(ewin) + EoGetW(ewin) - b;
|
||||
EoSetW(ewin, b);
|
||||
|
@ -542,14 +541,14 @@ EwinInstantShade(EWin * ewin, int force)
|
|||
break;
|
||||
case 2:
|
||||
att.win_gravity = SouthGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
b = d;
|
||||
EoSetH(ewin, b);
|
||||
break;
|
||||
case 3:
|
||||
att.win_gravity = SouthGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
b = d;
|
||||
d = EoGetY(ewin) + EoGetH(ewin) - b;
|
||||
|
@ -562,7 +561,7 @@ EwinInstantShade(EWin * ewin, int force)
|
|||
ewin->shaded = 2;
|
||||
ExMoveResizeWindow(&ewin->o, EoGetX(ewin), EoGetY(ewin),
|
||||
EoGetW(ewin), EoGetH(ewin));
|
||||
EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1);
|
||||
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
|
||||
EwinBorderCalcSizes(ewin);
|
||||
ecore_x_sync();
|
||||
|
||||
|
@ -591,14 +590,14 @@ EwinInstantUnShade(EWin * ewin)
|
|||
default:
|
||||
case 0:
|
||||
att.win_gravity = EastGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
b = ewin->client.w + ewin->border->border.left +
|
||||
ewin->border->border.right;
|
||||
EoSetW(ewin, b);
|
||||
break;
|
||||
case 1:
|
||||
att.win_gravity = WestGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
b = ewin->client.w + ewin->border->border.left +
|
||||
ewin->border->border.right;
|
||||
d = EoGetX(ewin) + EoGetW(ewin) - (ewin->border->border.right +
|
||||
|
@ -609,14 +608,14 @@ EwinInstantUnShade(EWin * ewin)
|
|||
break;
|
||||
case 2:
|
||||
att.win_gravity = SouthGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
b = ewin->client.h + ewin->border->border.top +
|
||||
ewin->border->border.bottom;
|
||||
EoSetH(ewin, b);
|
||||
break;
|
||||
case 3:
|
||||
att.win_gravity = SouthGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
b = ewin->client.h + ewin->border->border.top +
|
||||
ewin->border->border.bottom;
|
||||
d = EoGetY(ewin) + EoGetH(ewin) - (ewin->border->border.bottom +
|
||||
|
@ -670,7 +669,7 @@ EwinShade(EWin * ewin)
|
|||
default:
|
||||
case 0:
|
||||
att.win_gravity = EastGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
a = EoGetW(ewin);
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
|
@ -687,14 +686,14 @@ EwinShade(EWin * ewin)
|
|||
if (ww < 1)
|
||||
ww = 1;
|
||||
hh = ewin->client.h;
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ww, hh);
|
||||
ExMoveResizeWindow(&ewin->o, EoGetX(ewin), EoGetY(ewin),
|
||||
EoGetW(ewin), EoGetH(ewin));
|
||||
EwinBorderCalcSizes(ewin);
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container,
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, -(ewin->client.w - ww),
|
||||
0, ewin->client.win, ShapeBounding,
|
||||
ShapeSet);
|
||||
|
@ -707,7 +706,7 @@ EwinShade(EWin * ewin)
|
|||
break;
|
||||
case 1:
|
||||
att.win_gravity = WestGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
a = EoGetW(ewin);
|
||||
c = EoGetX(ewin);
|
||||
|
@ -728,14 +727,14 @@ EwinShade(EWin * ewin)
|
|||
if (ww < 1)
|
||||
ww = 1;
|
||||
hh = ewin->client.h;
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ww, hh);
|
||||
ExMoveResizeWindow(&ewin->o, EoGetX(ewin), EoGetY(ewin),
|
||||
EoGetW(ewin), EoGetH(ewin));
|
||||
EwinBorderCalcSizes(ewin);
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container,
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0, 0, ewin->client.win,
|
||||
ShapeBounding, ShapeSet);
|
||||
EwinPropagateShapes(ewin);
|
||||
|
@ -748,7 +747,7 @@ EwinShade(EWin * ewin)
|
|||
break;
|
||||
case 2:
|
||||
att.win_gravity = SouthGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
a = EoGetH(ewin);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
b = d;
|
||||
|
@ -766,14 +765,14 @@ EwinShade(EWin * ewin)
|
|||
if (hh < 1)
|
||||
hh = 1;
|
||||
ww = ewin->client.w;
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ww, hh);
|
||||
ExMoveResizeWindow(&ewin->o, EoGetX(ewin), EoGetY(ewin),
|
||||
EoGetW(ewin), EoGetH(ewin));
|
||||
EwinBorderCalcSizes(ewin);
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container,
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0,
|
||||
-(ewin->client.h - hh),
|
||||
ewin->client.win, ShapeBounding,
|
||||
|
@ -787,7 +786,7 @@ EwinShade(EWin * ewin)
|
|||
break;
|
||||
case 3:
|
||||
att.win_gravity = SouthGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
a = EoGetH(ewin);
|
||||
b = d;
|
||||
|
@ -809,14 +808,14 @@ EwinShade(EWin * ewin)
|
|||
if (hh < 1)
|
||||
hh = 1;
|
||||
ww = ewin->client.w;
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ww, hh);
|
||||
ExMoveResizeWindow(&ewin->o, EoGetX(ewin), EoGetY(ewin),
|
||||
EoGetW(ewin), EoGetH(ewin));
|
||||
EwinBorderCalcSizes(ewin);
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container,
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0, 0, ewin->client.win,
|
||||
ShapeBounding, ShapeSet);
|
||||
EwinPropagateShapes(ewin);
|
||||
|
@ -829,7 +828,7 @@ EwinShade(EWin * ewin)
|
|||
}
|
||||
|
||||
ewin->shaded = 2;
|
||||
EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1);
|
||||
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
|
||||
EwinBorderCalcSizes(ewin);
|
||||
MoveEwin(ewin, EoGetX(ewin), EoGetY(ewin));
|
||||
ecore_x_sync();
|
||||
|
@ -840,7 +839,7 @@ EwinShade(EWin * ewin)
|
|||
#endif
|
||||
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container, ShapeBounding, 0, 0,
|
||||
EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
|
||||
ewin->client.win, ShapeBounding, ShapeSet);
|
||||
EwinPropagateShapes(ewin);
|
||||
|
||||
|
@ -877,19 +876,19 @@ EwinUnShade(EWin * ewin)
|
|||
default:
|
||||
case 0:
|
||||
att.win_gravity = EastGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
a = ewin->border->border.left + ewin->border->border.right;
|
||||
b = ewin->client.w + a;
|
||||
a++;
|
||||
ewin->shaded = 0;
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
1, ewin->client.h);
|
||||
EWindowSync(ewin->client.win); /* Gravity - recache */
|
||||
EMoveResizeWindow(disp, ewin->client.win, -ewin->client.w, 0,
|
||||
EMoveResizeWindow(ewin->client.win, -ewin->client.w, 0,
|
||||
ewin->client.w, ewin->client.h);
|
||||
EMapWindow(disp, ewin->client.win);
|
||||
EMapWindow(disp, ewin->win_container);
|
||||
EMapWindow(ewin->client.win);
|
||||
EMapWindow(ewin->win_container);
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
{
|
||||
ETimedLoopInit(0, 1024, speed);
|
||||
|
@ -897,7 +896,7 @@ EwinUnShade(EWin * ewin)
|
|||
{
|
||||
i = ((a * (1024 - k)) + (b * k)) >> 10;
|
||||
EoSetW(ewin, i);
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top,
|
||||
EoGetW(ewin) - ewin->border->border.left -
|
||||
|
@ -906,7 +905,7 @@ EwinUnShade(EWin * ewin)
|
|||
EoGetW(ewin), EoGetH(ewin));
|
||||
EwinBorderCalcSizes(ewin);
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container,
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding,
|
||||
-(ewin->client.w -
|
||||
(EoGetW(ewin) -
|
||||
|
@ -923,21 +922,21 @@ EwinUnShade(EWin * ewin)
|
|||
break;
|
||||
case 1:
|
||||
att.win_gravity = WestGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
a = ewin->border->border.left + ewin->border->border.right;
|
||||
b = ewin->client.w + a;
|
||||
c = EoGetX(ewin);
|
||||
d = EoGetX(ewin) + EoGetW(ewin) - (ewin->client.w + a);
|
||||
a++;
|
||||
ewin->shaded = 0;
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
1, ewin->client.h);
|
||||
EWindowSync(ewin->client.win); /* Gravity - recache */
|
||||
EMoveResizeWindow(disp, ewin->client.win, 0, 0, ewin->client.w,
|
||||
EMoveResizeWindow(ewin->client.win, 0, 0, ewin->client.w,
|
||||
ewin->client.h);
|
||||
EMapWindow(disp, ewin->client.win);
|
||||
EMapWindow(disp, ewin->win_container);
|
||||
EMapWindow(ewin->client.win);
|
||||
EMapWindow(ewin->win_container);
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
{
|
||||
ETimedLoopInit(0, 1024, speed);
|
||||
|
@ -947,7 +946,7 @@ EwinUnShade(EWin * ewin)
|
|||
j = ((c * (1024 - k)) + (d * k)) >> 10;
|
||||
EoSetW(ewin, i);
|
||||
EoSetX(ewin, j);
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top,
|
||||
EoGetW(ewin) - ewin->border->border.left -
|
||||
|
@ -956,7 +955,7 @@ EwinUnShade(EWin * ewin)
|
|||
EoGetW(ewin), EoGetH(ewin));
|
||||
EwinBorderCalcSizes(ewin);
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container,
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0, 0, ewin->client.win,
|
||||
ShapeBounding, ShapeSet);
|
||||
EwinPropagateShapes(ewin);
|
||||
|
@ -969,19 +968,19 @@ EwinUnShade(EWin * ewin)
|
|||
break;
|
||||
case 2:
|
||||
att.win_gravity = SouthGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
a = ewin->border->border.top + ewin->border->border.bottom;
|
||||
b = ewin->client.h + a;
|
||||
a++;
|
||||
ewin->shaded = 0;
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
ewin->client.w, 1);
|
||||
EWindowSync(ewin->client.win); /* Gravity - recache */
|
||||
EMoveResizeWindow(disp, ewin->client.win, 0, -ewin->client.h,
|
||||
EMoveResizeWindow(ewin->client.win, 0, -ewin->client.h,
|
||||
ewin->client.w, ewin->client.h);
|
||||
EMapWindow(disp, ewin->client.win);
|
||||
EMapWindow(disp, ewin->win_container);
|
||||
EMapWindow(ewin->client.win);
|
||||
EMapWindow(ewin->win_container);
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
{
|
||||
ETimedLoopInit(0, 1024, speed);
|
||||
|
@ -989,7 +988,7 @@ EwinUnShade(EWin * ewin)
|
|||
{
|
||||
i = ((a * (1024 - k)) + (b * k)) >> 10;
|
||||
EoSetH(ewin, i);
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ewin->client.w,
|
||||
EoGetH(ewin) - ewin->border->border.top -
|
||||
|
@ -998,7 +997,7 @@ EwinUnShade(EWin * ewin)
|
|||
EoGetW(ewin), EoGetH(ewin));
|
||||
EwinBorderCalcSizes(ewin);
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container,
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0,
|
||||
-(ewin->client.h -
|
||||
(EoGetH(ewin) -
|
||||
|
@ -1015,21 +1014,21 @@ EwinUnShade(EWin * ewin)
|
|||
break;
|
||||
case 3:
|
||||
att.win_gravity = SouthGravity;
|
||||
XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
a = ewin->border->border.top + ewin->border->border.bottom;
|
||||
b = ewin->client.h + a;
|
||||
c = EoGetY(ewin);
|
||||
d = EoGetY(ewin) + EoGetH(ewin) - (ewin->client.h + a);
|
||||
a++;
|
||||
ewin->shaded = 0;
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
ewin->client.w, 1);
|
||||
EWindowSync(ewin->client.win); /* Gravity - recache */
|
||||
EMoveResizeWindow(disp, ewin->client.win, 0, 0, ewin->client.w,
|
||||
EMoveResizeWindow(ewin->client.win, 0, 0, ewin->client.w,
|
||||
ewin->client.h);
|
||||
EMapWindow(disp, ewin->client.win);
|
||||
EMapWindow(disp, ewin->win_container);
|
||||
EMapWindow(ewin->client.win);
|
||||
EMapWindow(ewin->win_container);
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
{
|
||||
ETimedLoopInit(0, 1024, speed);
|
||||
|
@ -1039,7 +1038,7 @@ EwinUnShade(EWin * ewin)
|
|||
j = ((c * (1024 - k)) + (d * k)) >> 10;
|
||||
EoSetH(ewin, i);
|
||||
EoSetY(ewin, j);
|
||||
EMoveResizeWindow(disp, ewin->win_container,
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ewin->client.w,
|
||||
EoGetH(ewin) - ewin->border->border.top -
|
||||
|
@ -1048,7 +1047,7 @@ EwinUnShade(EWin * ewin)
|
|||
EoGetW(ewin), EoGetH(ewin));
|
||||
EwinBorderCalcSizes(ewin);
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container,
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0, 0, ewin->client.win,
|
||||
ShapeBounding, ShapeSet);
|
||||
EwinPropagateShapes(ewin);
|
||||
|
@ -1071,7 +1070,7 @@ EwinUnShade(EWin * ewin)
|
|||
#endif
|
||||
|
||||
if (ewin->client.shaped)
|
||||
EShapeCombineShape(disp, ewin->win_container, ShapeBounding, 0, 0,
|
||||
EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
|
||||
ewin->client.win, ShapeBounding, ShapeSet);
|
||||
EwinPropagateShapes(ewin);
|
||||
|
||||
|
|
54
src/ewins.c
54
src/ewins.c
|
@ -51,8 +51,8 @@ EwinEventsConfigure(EWin * ewin, int mode)
|
|||
|
||||
emask = (mode) ? ~((long)0) : ~(EnterWindowMask | LeaveWindowMask);
|
||||
|
||||
XSelectInput(disp, EoGetWin(ewin), EWIN_TOP_EVENT_MASK & emask);
|
||||
XSelectInput(disp, ewin->client.win, ewin->client.event_mask & emask);
|
||||
ESelectInput(EoGetWin(ewin), EWIN_TOP_EVENT_MASK & emask);
|
||||
ESelectInput(ewin->client.win, ewin->client.event_mask & emask);
|
||||
EwinBorderEventsConfigure(ewin, mode);
|
||||
}
|
||||
|
||||
|
@ -108,14 +108,13 @@ EwinCreate(Window win, int type)
|
|||
|
||||
att.event_mask = EWIN_CONTAINER_EVENT_MASK;
|
||||
att.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask;
|
||||
XChangeWindowAttributes(disp, ewin->win_container,
|
||||
EChangeWindowAttributes(ewin->win_container,
|
||||
CWEventMask | CWDontPropagate, &att);
|
||||
EMapWindow(disp, ewin->win_container);
|
||||
EMapWindow(ewin->win_container);
|
||||
|
||||
att.event_mask = EWIN_TOP_EVENT_MASK;
|
||||
att.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask;
|
||||
XChangeWindowAttributes(disp, EoGetWin(ewin),
|
||||
CWEventMask | CWDontPropagate, &att);
|
||||
EChangeWindowAttributes(EoGetWin(ewin), CWEventMask | CWDontPropagate, &att);
|
||||
ewin->client.win = win;
|
||||
FocusEwinSetGrabs(ewin);
|
||||
GrabButtonGrabs(ewin);
|
||||
|
@ -221,7 +220,7 @@ EwinDestroy(EWin * ewin)
|
|||
if (ewin->icccm.wm_icon_name)
|
||||
Efree(ewin->icccm.wm_icon_name);
|
||||
if (EoGetWin(ewin))
|
||||
EDestroyWindow(disp, EoGetWin(ewin));
|
||||
EDestroyWindow(EoGetWin(ewin));
|
||||
if (ewin->bits)
|
||||
Efree(ewin->bits);
|
||||
if (ewin->session_id)
|
||||
|
@ -495,7 +494,7 @@ static void
|
|||
EwinAdopt(EWin * ewin)
|
||||
{
|
||||
/* We must reparent after getting original window position */
|
||||
EReparentWindow(disp, ewin->client.win, ewin->win_container, 0, 0);
|
||||
EReparentWindow(ewin->client.win, ewin->win_container, 0, 0);
|
||||
ICCCM_Adopt(ewin);
|
||||
}
|
||||
|
||||
|
@ -963,7 +962,7 @@ EwinWithdraw(EWin * ewin)
|
|||
XTranslateCoordinates(disp, ewin->client.win, VRoot.win,
|
||||
-ewin->border->border.left,
|
||||
-ewin->border->border.top, &x, &y, &win);
|
||||
EReparentWindow(disp, ewin->client.win, VRoot.win, x, y);
|
||||
EReparentWindow(ewin->client.win, VRoot.win, x, y);
|
||||
ICCCM_Withdraw(ewin);
|
||||
HintsDelWindowHints(ewin);
|
||||
|
||||
|
@ -983,7 +982,7 @@ EwinConformToDesktop(EWin * ewin)
|
|||
if ((ewin->iconified) && (ewin->parent != dwin))
|
||||
{
|
||||
ewin->parent = dwin;
|
||||
EReparentWindow(disp, EoGetWin(ewin), dwin, EoGetX(ewin), EoGetY(ewin));
|
||||
EReparentWindow(EoGetWin(ewin), dwin, EoGetX(ewin), EoGetY(ewin));
|
||||
RaiseEwin(ewin);
|
||||
ICCCM_Configure(ewin);
|
||||
}
|
||||
|
@ -992,7 +991,7 @@ EwinConformToDesktop(EWin * ewin)
|
|||
if ((ewin->parent != VRoot.win) && (EoIsFloating(ewin) == 2))
|
||||
{
|
||||
ewin->parent = VRoot.win;
|
||||
EReparentWindow(disp, EoGetWin(ewin), VRoot.win, EoGetX(ewin),
|
||||
EReparentWindow(EoGetWin(ewin), VRoot.win, EoGetX(ewin),
|
||||
EoGetY(ewin));
|
||||
EoSetDesk(ewin, 0);
|
||||
}
|
||||
|
@ -1003,7 +1002,7 @@ EwinConformToDesktop(EWin * ewin)
|
|||
else if (ewin->parent != dwin)
|
||||
{
|
||||
ewin->parent = dwin;
|
||||
EReparentWindow(disp, EoGetWin(ewin), dwin, EoGetX(ewin), EoGetY(ewin));
|
||||
EReparentWindow(EoGetWin(ewin), dwin, EoGetX(ewin), EoGetY(ewin));
|
||||
RaiseEwin(ewin);
|
||||
MoveEwin(ewin, EoGetX(ewin), EoGetY(ewin));
|
||||
}
|
||||
|
@ -1024,7 +1023,7 @@ EwinConformToDesktop(EWin * ewin)
|
|||
void
|
||||
EwinReparent(EWin * ewin, Window parent)
|
||||
{
|
||||
EReparentWindow(disp, ewin->client.win, parent, 0, 0);
|
||||
EReparentWindow(ewin->client.win, parent, 0, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1121,8 +1120,8 @@ EwinEventUnmap(EWin * ewin)
|
|||
|
||||
ewin->shown = 0;
|
||||
/* FIXME - This is to sync the client.win EXID mapped state */
|
||||
EUnmapWindow(disp, ewin->client.win);
|
||||
EUnmapWindow(disp, EoGetWin(ewin));
|
||||
EUnmapWindow(ewin->client.win);
|
||||
EUnmapWindow(EoGetWin(ewin));
|
||||
|
||||
ModulesSignal(ESIGNAL_EWIN_UNMAP, ewin);
|
||||
|
||||
|
@ -1241,7 +1240,7 @@ EwinEventConfigureRequest(EWin * ewin, XEvent * ev)
|
|||
xwc.border_width = ev->xconfigurerequest.border_width;
|
||||
xwc.sibling = ev->xconfigurerequest.above;
|
||||
xwc.stack_mode = ev->xconfigurerequest.detail;
|
||||
EConfigureWindow(disp, win, ev->xconfigurerequest.value_mask, &xwc);
|
||||
EConfigureWindow(win, ev->xconfigurerequest.value_mask, &xwc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1273,8 +1272,7 @@ EwinEventResizeRequest(EWin * ewin, XEvent * ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
EResizeWindow(disp, win, ev->xresizerequest.width,
|
||||
ev->xresizerequest.height);
|
||||
EResizeWindow(win, ev->xresizerequest.width, ev->xresizerequest.height);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1295,9 +1293,9 @@ EwinEventCirculateRequest(EWin * ewin, XEvent * ev)
|
|||
else
|
||||
{
|
||||
if (ev->xcirculaterequest.place == PlaceOnTop)
|
||||
XRaiseWindow(disp, win);
|
||||
ERaiseWindow(win);
|
||||
else
|
||||
XLowerWindow(disp, win);
|
||||
ELowerWindow(win);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1438,7 +1436,7 @@ RestackEwin(EWin * ewin)
|
|||
#if 0 /* FIXME - remove? */
|
||||
if (EoIsFloating(ewin))
|
||||
{
|
||||
XRaiseWindow(disp, EoGetWin(ewin));
|
||||
ERaiseWindow(EoGetWin(ewin));
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
@ -1492,7 +1490,7 @@ RaiseEwin(EWin * ewin)
|
|||
#if 0 /* FIXME - remove? */
|
||||
if (EoIsFloating(ewin))
|
||||
{
|
||||
XRaiseWindow(disp, EoGetWin(ewin));
|
||||
ERaiseWindow(EoGetWin(ewin));
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
@ -1574,12 +1572,12 @@ ShowEwin(EWin * ewin)
|
|||
if (ewin->client.win)
|
||||
{
|
||||
if (ewin->shaded)
|
||||
EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1);
|
||||
EMapWindow(disp, ewin->client.win);
|
||||
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
|
||||
EMapWindow(ewin->client.win);
|
||||
}
|
||||
|
||||
if (EoGetWin(ewin))
|
||||
EMapWindow(disp, EoGetWin(ewin));
|
||||
EMapWindow(EoGetWin(ewin));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1592,10 +1590,10 @@ HideEwin(EWin * ewin)
|
|||
if (GetZoomEWin() == ewin)
|
||||
Zoom(NULL);
|
||||
|
||||
EUnmapWindow(disp, ewin->client.win);
|
||||
EUnmapWindow(ewin->client.win);
|
||||
|
||||
if (EoGetWin(ewin))
|
||||
EUnmapWindow(disp, EoGetWin(ewin));
|
||||
EUnmapWindow(EoGetWin(ewin));
|
||||
}
|
||||
|
||||
Window
|
||||
|
@ -1815,7 +1813,7 @@ EwinsSetFree(void)
|
|||
|
||||
/* This makes E determine the client window stacking at exit */
|
||||
EwinInstantUnShade(ewin);
|
||||
EReparentWindow(disp, ewin->client.win, VRoot.win,
|
||||
EReparentWindow(ewin->client.win, VRoot.win,
|
||||
ewin->client.x, ewin->client.y);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,18 +134,18 @@ ExtInitWinMain(void)
|
|||
imlib_context_set_image(im);
|
||||
imlib_context_set_drawable(w2);
|
||||
imlib_render_pixmaps_for_whole_image(&pmap, &mask);
|
||||
EShapeCombineMask(disp, w2, ShapeBounding, 0, 0, mask,
|
||||
XShapeCombineMask(disp, w2, ShapeBounding, 0, 0, mask,
|
||||
ShapeSet);
|
||||
ESetWindowBackgroundPixmap(disp, w2, pmap);
|
||||
XSetWindowBackgroundPixmap(disp, w2, pmap);
|
||||
imlib_free_pixmap_and_mask(pmap);
|
||||
XClearWindow(disp, w2);
|
||||
XQueryPointer(disp, win, &ww, &ww, &dd, &dd, &x, &y, &mm);
|
||||
EMoveResizeWindow(disp, w2,
|
||||
XMoveResizeWindow(disp, w2,
|
||||
x - imlib_image_get_width() / 2,
|
||||
y - imlib_image_get_height() / 2,
|
||||
imlib_image_get_width(),
|
||||
imlib_image_get_height());
|
||||
EMapWindow(disp, w2);
|
||||
XMapWindow(disp, w2);
|
||||
imlib_free_image();
|
||||
}
|
||||
tv.tv_sec = 0;
|
||||
|
|
20
src/icccm.c
20
src/icccm.c
|
@ -177,7 +177,7 @@ ICCCM_Delete(const EWin * ewin)
|
|||
{
|
||||
if (EwinIsInternal(ewin))
|
||||
{
|
||||
EUnmapWindow(disp, ewin->client.win);
|
||||
EUnmapWindow(ewin->client.win);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ ICCCM_Save(const EWin * ewin)
|
|||
void
|
||||
ICCCM_Iconify(const EWin * ewin)
|
||||
{
|
||||
EUnmapWindow(disp, ewin->client.win);
|
||||
EUnmapWindow(ewin->client.win);
|
||||
ecore_x_icccm_state_set_iconic(ewin->client.win);
|
||||
AddItem(ewin, "ICON", ewin->client.win, LIST_TYPE_ICONIFIEDS);
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ ICCCM_Iconify(const EWin * ewin)
|
|||
void
|
||||
ICCCM_DeIconify(const EWin * ewin)
|
||||
{
|
||||
EMapWindow(disp, ewin->client.win);
|
||||
EMapWindow(ewin->client.win);
|
||||
ecore_x_icccm_state_set_normal(ewin->client.win);
|
||||
RemoveItem("ICON", ewin->client.win, LIST_FINDBY_BOTH, LIST_TYPE_ICONIFIEDS);
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
|
|||
w = ewin->client.w;
|
||||
h = ewin->client.h;
|
||||
bw = ewin->client.bw;
|
||||
EGetGeometry(disp, ewin->client.win, &ww, &x, &y, &w, &h, &bw, &dummy);
|
||||
EGetGeometry(ewin->client.win, &ww, &x, &y, &w, &h, &bw, &dummy);
|
||||
ewin->client.x = x;
|
||||
ewin->client.y = y;
|
||||
ewin->client.w = w;
|
||||
|
@ -883,14 +883,14 @@ ICCCM_GetShapeInfo(EWin * ewin)
|
|||
Window rt;
|
||||
|
||||
ecore_x_grab();
|
||||
EGetGeometry(disp, ewin->client.win, &rt, &x, &y, &w, &h, &d, &d);
|
||||
rl = EShapeGetRectangles(disp, ewin->client.win, ShapeBounding, &rn, &ord);
|
||||
EGetGeometry(ewin->client.win, &rt, &x, &y, &w, &h, &d, &d);
|
||||
rl = EShapeGetRectangles(ewin->client.win, ShapeBounding, &rn, &ord);
|
||||
ecore_x_ungrab();
|
||||
|
||||
if (rn < 1)
|
||||
{
|
||||
ewin->client.shaped = 0;
|
||||
EShapeCombineMask(disp, ewin->win_container, ShapeBounding, 0, 0, None,
|
||||
EShapeCombineMask(ewin->win_container, ShapeBounding, 0, 0, None,
|
||||
ShapeSet);
|
||||
}
|
||||
else if (rn == 1)
|
||||
|
@ -899,20 +899,20 @@ ICCCM_GetShapeInfo(EWin * ewin)
|
|||
&& (rl[0].height >= h))
|
||||
{
|
||||
ewin->client.shaped = 0;
|
||||
EShapeCombineMask(disp, ewin->win_container, ShapeBounding, 0, 0,
|
||||
EShapeCombineMask(ewin->win_container, ShapeBounding, 0, 0,
|
||||
None, ShapeSet);
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.shaped = 1;
|
||||
EShapeCombineShape(disp, ewin->win_container, ShapeBounding, 0, 0,
|
||||
EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
|
||||
ewin->client.win, ShapeBounding, ShapeSet);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.shaped = 1;
|
||||
EShapeCombineShape(disp, ewin->win_container, ShapeBounding, 0, 0,
|
||||
EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
|
||||
ewin->client.win, ShapeBounding, ShapeSet);
|
||||
}
|
||||
if (rl)
|
||||
|
|
14
src/iclass.c
14
src/iclass.c
|
@ -1059,22 +1059,22 @@ ITApply(Window win, ImageClass * ic, ImageState * is, int w, int h, int state,
|
|||
/* Set window pixmap */
|
||||
if (pmm.w == w && pmm.h == h)
|
||||
{
|
||||
ESetWindowBackgroundPixmap(disp, win, pmm.pmap);
|
||||
EShapeCombineMask(disp, win, ShapeBounding, 0, 0,
|
||||
ESetWindowBackgroundPixmap(win, pmm.pmap);
|
||||
EShapeCombineMask(win, ShapeBounding, 0, 0,
|
||||
pmm.mask, ShapeSet);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Tiled */
|
||||
ESetWindowBackgroundPixmap(disp, win, pmm.pmap);
|
||||
ESetWindowBackgroundPixmap(win, pmm.pmap);
|
||||
if (pmm.mask)
|
||||
EShapeCombineMaskTiled(disp, win, ShapeBounding, 0, 0,
|
||||
EShapeCombineMaskTiled(win, ShapeBounding, 0, 0,
|
||||
pmm.mask, ShapeSet, w, h);
|
||||
}
|
||||
}
|
||||
|
||||
FreePmapMask(&pmm);
|
||||
XClearWindow(disp, win);
|
||||
EClearWindow(win);
|
||||
|
||||
if ((is->unloadable) || (Conf.memory_paranoia))
|
||||
{
|
||||
|
@ -1089,8 +1089,8 @@ ITApply(Window win, ImageClass * ic, ImageState * is, int w, int h, int state,
|
|||
else
|
||||
{
|
||||
/* FIXME - No text */
|
||||
ESetWindowBackground(disp, win, is->bg.pixel);
|
||||
XClearWindow(disp, win);
|
||||
ESetWindowBackground(win, is->bg.pixel);
|
||||
EClearWindow(win);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
223
src/iconify.c
223
src/iconify.c
|
@ -349,31 +349,31 @@ IconboxCreate(const char *name)
|
|||
ib->scrollbarknob_win = ECreateWindow(ib->scrollbar_win, -20, -20, 4, 4, 0);
|
||||
ib->pmap = ecore_x_pixmap_new(ib->icon_win, 128, 32, VRoot.depth);
|
||||
|
||||
XSelectInput(disp, ib->icon_win,
|
||||
ESelectInput(ib->icon_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask | PointerMotionMask);
|
||||
XSelectInput(disp, ib->scroll_win,
|
||||
ESelectInput(ib->scroll_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask);
|
||||
XSelectInput(disp, ib->cover_win,
|
||||
ESelectInput(ib->cover_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask);
|
||||
XSelectInput(disp, ib->arrow1_win,
|
||||
ESelectInput(ib->arrow1_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask);
|
||||
XSelectInput(disp, ib->arrow2_win,
|
||||
ESelectInput(ib->arrow2_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask);
|
||||
XSelectInput(disp, ib->scrollbar_win,
|
||||
ESelectInput(ib->scrollbar_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask | PointerMotionMask);
|
||||
|
||||
EMapWindow(disp, ib->icon_win);
|
||||
EMapWindow(disp, ib->scroll_win);
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMapWindow(disp, ib->scrollbar_win);
|
||||
EMapWindow(disp, ib->scrollbarknob_win);
|
||||
EMapWindow(ib->icon_win);
|
||||
EMapWindow(ib->scroll_win);
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMapWindow(ib->scrollbar_win);
|
||||
EMapWindow(ib->scrollbarknob_win);
|
||||
|
||||
ib->ewin = NULL;
|
||||
ib->num_objs = 0;
|
||||
|
@ -418,7 +418,7 @@ IconboxDestroy(Iconbox * ib)
|
|||
if (ib->pmap)
|
||||
ecore_x_pixmap_del(ib->pmap);
|
||||
|
||||
EDestroyWindow(disp, ib->win);
|
||||
EDestroyWindow(ib->win);
|
||||
|
||||
Efree(ib);
|
||||
IconboxesConfigSave();
|
||||
|
@ -671,7 +671,7 @@ IconboxWindowAdd(Iconbox * ib, Window win)
|
|||
|
||||
XReparentWindow(disp, win, ib->icon_win, 0, 0);
|
||||
IconboxRedraw(ib);
|
||||
EMapWindow(disp, win);
|
||||
XMapWindow(disp, win);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -817,7 +817,7 @@ IB_GetAppIcon(EWin * ewin)
|
|||
|
||||
w = 0;
|
||||
h = 0;
|
||||
EGetGeometry(disp, ewin->client.icon_pmap, &rt, &x, &y, &w, &h, &bw, &depth);
|
||||
XGetGeometry(disp, ewin->client.icon_pmap, &rt, &x, &y, &w, &h, &bw, &depth);
|
||||
|
||||
if (w < 1 || h < 1)
|
||||
return;
|
||||
|
@ -1466,11 +1466,11 @@ IB_DrawScroll(Iconbox * ib)
|
|||
|
||||
ic = ImageclassFind("ICONBOX_SCROLLKNOB_VERTICAL", 0);
|
||||
if ((ic) && (bw > ib->knob_length))
|
||||
EMoveResizeWindow(disp, ib->scrollbarknob_win, 0,
|
||||
EMoveResizeWindow(ib->scrollbarknob_win, 0,
|
||||
(bw - ib->knob_length) / 2, ib->bar_thickness,
|
||||
ib->knob_length);
|
||||
else
|
||||
EMoveResizeWindow(disp, ib->scrollbarknob_win, -9999, -9999,
|
||||
EMoveResizeWindow(ib->scrollbarknob_win, -9999, -9999,
|
||||
ib->bar_thickness, ib->knob_length);
|
||||
if (show_sb)
|
||||
{
|
||||
|
@ -1481,18 +1481,18 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* start */
|
||||
if (ib->arrow_side == 0)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win,
|
||||
ib->w - ib->scroll_thickness, 0,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win,
|
||||
EMoveResizeWindow(ib->arrow2_win,
|
||||
ib->w - ib->scroll_thickness,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win,
|
||||
EMoveResizeWindow(ib->scroll_win,
|
||||
ib->w - ib->scroll_thickness,
|
||||
ib->arrow_thickness * 2,
|
||||
ib->scroll_thickness,
|
||||
|
@ -1501,18 +1501,18 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* both ends */
|
||||
else if (ib->arrow_side == 1)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win,
|
||||
ib->w - ib->scroll_thickness, 0,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win,
|
||||
EMoveResizeWindow(ib->arrow2_win,
|
||||
ib->w - ib->scroll_thickness,
|
||||
ib->h - ib->arrow_thickness,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win,
|
||||
EMoveResizeWindow(ib->scroll_win,
|
||||
ib->w - ib->scroll_thickness,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness,
|
||||
|
@ -1521,19 +1521,19 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* end */
|
||||
else if (ib->arrow_side == 2)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win,
|
||||
ib->w - ib->scroll_thickness,
|
||||
ib->h - (ib->arrow_thickness * 2),
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win,
|
||||
EMoveResizeWindow(ib->arrow2_win,
|
||||
ib->w - ib->scroll_thickness,
|
||||
ib->h - ib->arrow_thickness,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win,
|
||||
EMoveResizeWindow(ib->scroll_win,
|
||||
ib->w - ib->scroll_thickness, 0,
|
||||
ib->scroll_thickness,
|
||||
ib->h - (ib->arrow_thickness * 2));
|
||||
|
@ -1541,9 +1541,9 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* no arrows */
|
||||
else
|
||||
{
|
||||
EUnmapWindow(disp, ib->arrow1_win);
|
||||
EUnmapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->scroll_win,
|
||||
EUnmapWindow(ib->arrow1_win);
|
||||
EUnmapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->scroll_win,
|
||||
ib->w - ib->scroll_thickness, 0,
|
||||
ib->scroll_thickness, ib->h);
|
||||
}
|
||||
|
@ -1554,16 +1554,16 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* start */
|
||||
if (ib->arrow_side == 0)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win, 0, 0,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win, 0, 0,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win, 0,
|
||||
EMoveResizeWindow(ib->arrow2_win, 0,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win, 0,
|
||||
EMoveResizeWindow(ib->scroll_win, 0,
|
||||
ib->arrow_thickness * 2,
|
||||
ib->scroll_thickness,
|
||||
ib->h - (ib->arrow_thickness * 2));
|
||||
|
@ -1571,16 +1571,16 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* both ends */
|
||||
else if (ib->arrow_side == 1)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win, 0, 0,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win, 0, 0,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win, 0,
|
||||
EMoveResizeWindow(ib->arrow2_win, 0,
|
||||
ib->h - ib->arrow_thickness,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win, 0,
|
||||
EMoveResizeWindow(ib->scroll_win, 0,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness,
|
||||
ib->h - (ib->arrow_thickness * 2));
|
||||
|
@ -1588,37 +1588,37 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* end */
|
||||
else if (ib->arrow_side == 2)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win, 0,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win, 0,
|
||||
ib->h - (ib->arrow_thickness * 2),
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win, 0,
|
||||
EMoveResizeWindow(ib->arrow2_win, 0,
|
||||
ib->h - ib->arrow_thickness,
|
||||
ib->scroll_thickness,
|
||||
ib->arrow_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win, 0, 0,
|
||||
EMoveResizeWindow(ib->scroll_win, 0, 0,
|
||||
ib->scroll_thickness,
|
||||
ib->h - (ib->arrow_thickness * 2));
|
||||
}
|
||||
/* no arrows */
|
||||
else
|
||||
{
|
||||
EUnmapWindow(disp, ib->arrow1_win);
|
||||
EUnmapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->scroll_win, 0, 0,
|
||||
EUnmapWindow(ib->arrow1_win);
|
||||
EUnmapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->scroll_win, 0, 0,
|
||||
ib->scroll_thickness, ib->h);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EMoveResizeWindow(disp, ib->scroll_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(ib->scroll_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(ib->arrow1_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(ib->arrow2_win, -9999, -9999, 2, 2);
|
||||
}
|
||||
EMoveResizeWindow(disp, ib->scrollbar_win,
|
||||
EMoveResizeWindow(ib->scrollbar_win,
|
||||
(ib->scroll_thickness - ib->bar_thickness) / 2, bx,
|
||||
ib->bar_thickness, bw);
|
||||
|
||||
|
@ -1709,11 +1709,11 @@ IB_DrawScroll(Iconbox * ib)
|
|||
show_sb = 0;
|
||||
ic = ImageclassFind("ICONBOX_SCROLLKNOB_HORIZONTAL", 0);
|
||||
if ((ic) && (bw > ib->knob_length))
|
||||
EMoveResizeWindow(disp, ib->scrollbarknob_win,
|
||||
EMoveResizeWindow(ib->scrollbarknob_win,
|
||||
(bw - ib->knob_length) / 2, 0, ib->knob_length,
|
||||
ib->bar_thickness);
|
||||
else
|
||||
EMoveResizeWindow(disp, ib->scrollbarknob_win, -9999, -9999,
|
||||
EMoveResizeWindow(ib->scrollbarknob_win, -9999, -9999,
|
||||
ib->knob_length, ib->bar_thickness);
|
||||
|
||||
if (show_sb)
|
||||
|
@ -1724,18 +1724,18 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* start */
|
||||
if (ib->arrow_side == 0)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win, 0,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win, 0,
|
||||
ib->h - ib->scroll_thickness,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win,
|
||||
EMoveResizeWindow(ib->arrow2_win,
|
||||
ib->arrow_thickness,
|
||||
ib->h - ib->scroll_thickness,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win,
|
||||
EMoveResizeWindow(ib->scroll_win,
|
||||
ib->arrow_thickness * 2,
|
||||
ib->h - ib->scroll_thickness,
|
||||
ib->w - (ib->arrow_thickness * 2),
|
||||
|
@ -1744,18 +1744,18 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* both ends */
|
||||
else if (ib->arrow_side == 1)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win, 0,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win, 0,
|
||||
ib->h - ib->scroll_thickness,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win,
|
||||
EMoveResizeWindow(ib->arrow2_win,
|
||||
ib->w - ib->arrow_thickness,
|
||||
ib->h - ib->scroll_thickness,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win,
|
||||
EMoveResizeWindow(ib->scroll_win,
|
||||
ib->arrow_thickness,
|
||||
ib->h - ib->scroll_thickness,
|
||||
ib->w - (ib->arrow_thickness * 2),
|
||||
|
@ -1764,19 +1764,19 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* end */
|
||||
else if (ib->arrow_side == 2)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win,
|
||||
ib->w - (ib->arrow_thickness * 2),
|
||||
ib->h - ib->scroll_thickness,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win,
|
||||
EMoveResizeWindow(ib->arrow2_win,
|
||||
ib->w - ib->arrow_thickness,
|
||||
ib->h - ib->scroll_thickness,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win, 0,
|
||||
EMoveResizeWindow(ib->scroll_win, 0,
|
||||
ib->h - ib->scroll_thickness,
|
||||
ib->w - (ib->arrow_thickness * 2),
|
||||
ib->scroll_thickness);
|
||||
|
@ -1784,9 +1784,9 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* no arrows */
|
||||
else
|
||||
{
|
||||
EUnmapWindow(disp, ib->arrow1_win);
|
||||
EUnmapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->scroll_win, 0,
|
||||
EUnmapWindow(ib->arrow1_win);
|
||||
EUnmapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->scroll_win, 0,
|
||||
ib->h - ib->scroll_thickness, ib->w,
|
||||
ib->scroll_thickness);
|
||||
}
|
||||
|
@ -1797,16 +1797,16 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* start */
|
||||
if (ib->arrow_side == 0)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win, 0, 0,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win, 0, 0,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win,
|
||||
EMoveResizeWindow(ib->arrow2_win,
|
||||
ib->arrow_thickness, 0,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win,
|
||||
EMoveResizeWindow(ib->scroll_win,
|
||||
ib->arrow_thickness * 2, 0,
|
||||
ib->w - (ib->arrow_thickness * 2),
|
||||
ib->scroll_thickness);
|
||||
|
@ -1814,16 +1814,16 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* both ends */
|
||||
else if (ib->arrow_side == 1)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win, 0, 0,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win, 0, 0,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win,
|
||||
EMoveResizeWindow(ib->arrow2_win,
|
||||
ib->w - ib->arrow_thickness, 0,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win,
|
||||
EMoveResizeWindow(ib->scroll_win,
|
||||
ib->arrow_thickness, 0,
|
||||
ib->w - (ib->arrow_thickness * 2),
|
||||
ib->scroll_thickness);
|
||||
|
@ -1831,38 +1831,38 @@ IB_DrawScroll(Iconbox * ib)
|
|||
/* end */
|
||||
else if (ib->arrow_side == 2)
|
||||
{
|
||||
EMapWindow(disp, ib->arrow1_win);
|
||||
EMapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win,
|
||||
EMapWindow(ib->arrow1_win);
|
||||
EMapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->arrow1_win,
|
||||
ib->w - (ib->arrow_thickness * 2), 0,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win,
|
||||
EMoveResizeWindow(ib->arrow2_win,
|
||||
ib->w - ib->arrow_thickness, 0,
|
||||
ib->arrow_thickness,
|
||||
ib->scroll_thickness);
|
||||
EMoveResizeWindow(disp, ib->scroll_win, 0, 0,
|
||||
EMoveResizeWindow(ib->scroll_win, 0, 0,
|
||||
ib->w - (ib->arrow_thickness * 2),
|
||||
ib->scroll_thickness);
|
||||
}
|
||||
/* no arrows */
|
||||
else
|
||||
{
|
||||
EUnmapWindow(disp, ib->arrow1_win);
|
||||
EUnmapWindow(disp, ib->arrow2_win);
|
||||
EMoveResizeWindow(disp, ib->scroll_win, 0, 0, ib->w,
|
||||
EUnmapWindow(ib->arrow1_win);
|
||||
EUnmapWindow(ib->arrow2_win);
|
||||
EMoveResizeWindow(ib->scroll_win, 0, 0, ib->w,
|
||||
ib->scroll_thickness);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EMoveResizeWindow(disp, ib->scroll_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(disp, ib->arrow1_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(disp, ib->arrow2_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(ib->scroll_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(ib->arrow1_win, -9999, -9999, 2, 2);
|
||||
EMoveResizeWindow(ib->arrow2_win, -9999, -9999, 2, 2);
|
||||
}
|
||||
|
||||
EMoveResizeWindow(disp, ib->scrollbar_win, bx,
|
||||
EMoveResizeWindow(ib->scrollbar_win, bx,
|
||||
(ib->scroll_thickness - ib->bar_thickness) / 2, bw,
|
||||
ib->bar_thickness);
|
||||
|
||||
|
@ -2063,7 +2063,7 @@ IconboxRedraw(Iconbox * ib)
|
|||
ib->w = w;
|
||||
ib->h = h;
|
||||
MoveResizeEwin(ib->ewin, x, y, w, h);
|
||||
EResizeWindow(disp, ib->win, w, h);
|
||||
EResizeWindow(ib->win, w, h);
|
||||
im = imlib_create_image(w, h);
|
||||
ib->force_update = 0;
|
||||
}
|
||||
|
@ -2099,19 +2099,19 @@ IconboxRedraw(Iconbox * ib)
|
|||
ib_hh = ib->h - ib->scroll_thickness;
|
||||
}
|
||||
|
||||
EMoveResizeWindow(disp, ib->icon_win, ib_xlt, ib_ylt, ib_ww, ib_hh);
|
||||
EMoveResizeWindow(ib->icon_win, ib_xlt, ib_ylt, ib_ww, ib_hh);
|
||||
|
||||
if (ib_ic_cover && (!(ib->cover_hide)))
|
||||
{
|
||||
EMoveResizeWindow(disp, ib->cover_win, ib_xlt, ib_ylt, ib_ww, ib_hh);
|
||||
EMapWindow(disp, ib->cover_win);
|
||||
EMoveResizeWindow(ib->cover_win, ib_xlt, ib_ylt, ib_ww, ib_hh);
|
||||
EMapWindow(ib->cover_win);
|
||||
ImageclassApply(ib_ic_cover, ib->cover_win, -1, -1, 0, 0, STATE_NORMAL,
|
||||
0, ST_ICONBOX);
|
||||
}
|
||||
else
|
||||
{
|
||||
EMoveResizeWindow(disp, ib->cover_win, -30000, -30000, 2, 2);
|
||||
EUnmapWindow(disp, ib->cover_win);
|
||||
EMoveResizeWindow(ib->cover_win, -30000, -30000, 2, 2);
|
||||
EUnmapWindow(ib->cover_win);
|
||||
}
|
||||
|
||||
if (!ib->nobg && ib_ic_box)
|
||||
|
@ -2217,7 +2217,7 @@ IconboxRedraw(Iconbox * ib)
|
|||
else
|
||||
{
|
||||
w = h = ib->iconsize;
|
||||
EMoveResizeWindow(disp, ib->objs[i].win, x, y, w, h);
|
||||
EMoveResizeWindow(ib->objs[i].win, x, y, w, h);
|
||||
}
|
||||
|
||||
if (ib->orientation)
|
||||
|
@ -2233,13 +2233,12 @@ IconboxRedraw(Iconbox * ib)
|
|||
imlib_context_set_image(im);
|
||||
imlib_image_set_has_alpha(1);
|
||||
imlib_render_pixmaps_for_whole_image(&ib->pmap, &ib->mask);
|
||||
ESetWindowBackgroundPixmap(disp, ib->icon_win, ib->pmap);
|
||||
EShapeCombineMask(disp, ib->icon_win, ShapeBounding, 0, 0, ib->mask,
|
||||
ShapeSet);
|
||||
ESetWindowBackgroundPixmap(ib->icon_win, ib->pmap);
|
||||
EShapeCombineMask(ib->icon_win, ShapeBounding, 0, 0, ib->mask, ShapeSet);
|
||||
if (ib->nobg && ib->num_objs == 0)
|
||||
EMoveWindow(disp, ib->icon_win, -ib->w, -ib->h);
|
||||
EMoveWindow(ib->icon_win, -ib->w, -ib->h);
|
||||
imlib_free_image();
|
||||
XClearWindow(disp, ib->icon_win);
|
||||
EClearWindow(ib->icon_win);
|
||||
|
||||
PropagateShapes(ib->win);
|
||||
ICCCM_GetShapeInfo(ib->ewin);
|
||||
|
@ -3359,7 +3358,7 @@ SystrayInit(Iconbox * obj, Window win, int screen)
|
|||
|
||||
Eprintf("Window %#lx is now system tray\n", win);
|
||||
|
||||
XSelectInput(disp, win, SubstructureRedirectMask | ResizeRedirectMask |
|
||||
ESelectInput(win, SubstructureRedirectMask | ResizeRedirectMask |
|
||||
SubstructureNotifyMask);
|
||||
EventCallbackRegister(win, 0, SystrayEvent, obj);
|
||||
|
||||
|
|
59
src/menus.c
59
src/menus.c
|
@ -171,8 +171,8 @@ MenuHide(Menu * m)
|
|||
{
|
||||
if (m->win)
|
||||
{
|
||||
EUnmapWindow(disp, m->win);
|
||||
EReparentWindow(disp, m->win, VRoot.win, 0, 0);
|
||||
EUnmapWindow(m->win);
|
||||
EReparentWindow(m->win, VRoot.win, 0, 0);
|
||||
}
|
||||
|
||||
MenuActivateItem(m, NULL);
|
||||
|
@ -313,28 +313,27 @@ MenuShow(Menu * m, char noshow)
|
|||
if ((Mode.x >= 0) && (Mode.y >= 0))
|
||||
{
|
||||
if (Conf.menus.onscreen)
|
||||
EMoveWindow(disp, m->win, wx, wy);
|
||||
EMoveWindow(m->win, wx, wy);
|
||||
else
|
||||
EMoveWindow(disp, m->win, Mode.x - x - (w / 2),
|
||||
Mode.y - y - (h / 2));
|
||||
EMoveWindow(m->win, Mode.x - x - (w / 2), Mode.y - y - (h / 2));
|
||||
}
|
||||
else if ((Mode.x >= 0) && (Mode.y < 0))
|
||||
{
|
||||
if (((-Mode.y) + (int)mh) > (int)VRoot.h)
|
||||
Mode.y = -((-Mode.y) - Mode.context_h - mh);
|
||||
if (Conf.menus.onscreen)
|
||||
EMoveWindow(disp, m->win, wx, -Mode.y);
|
||||
EMoveWindow(m->win, wx, -Mode.y);
|
||||
else
|
||||
EMoveWindow(disp, m->win, Mode.x - x - (w / 2), -Mode.y);
|
||||
EMoveWindow(m->win, Mode.x - x - (w / 2), -Mode.y);
|
||||
}
|
||||
else if ((Mode.x < 0) && (Mode.y >= 0))
|
||||
{
|
||||
if (((-Mode.x) + (int)mw) > (int)VRoot.w)
|
||||
Mode.x = -((-Mode.x) - Mode.context_w - mw);
|
||||
if (Conf.menus.onscreen)
|
||||
EMoveWindow(disp, m->win, -Mode.x, wy);
|
||||
EMoveWindow(m->win, -Mode.x, wy);
|
||||
else
|
||||
EMoveWindow(disp, m->win, -Mode.x, Mode.y - y - (h / 2));
|
||||
EMoveWindow(m->win, -Mode.x, Mode.y - y - (h / 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -342,7 +341,7 @@ MenuShow(Menu * m, char noshow)
|
|||
Mode.x = -((-Mode.x) - Mode.context_w - mw);
|
||||
if (((-Mode.y) + (int)mh) > (int)VRoot.h)
|
||||
Mode.y = -((-Mode.y) - Mode.context_h - mh);
|
||||
EMoveWindow(disp, m->win, -Mode.x, -Mode.y);
|
||||
EMoveWindow(m->win, -Mode.x, -Mode.y);
|
||||
}
|
||||
|
||||
ewin = AddInternalToFamily(m->win, m->style->border_name, EWIN_TYPE_MENU, m,
|
||||
|
@ -350,7 +349,7 @@ MenuShow(Menu * m, char noshow)
|
|||
if (ewin)
|
||||
{
|
||||
ewin->client.event_mask |= KeyPressMask;
|
||||
XSelectInput(disp, m->win, ewin->client.event_mask);
|
||||
ESelectInput(m->win, ewin->client.event_mask);
|
||||
|
||||
ewin->head = head_num;
|
||||
if (Conf.menus.slide)
|
||||
|
@ -535,7 +534,7 @@ MenuDestroy(Menu * m)
|
|||
MenuHide(m);
|
||||
|
||||
if (m->win)
|
||||
EDestroyWindow(disp, m->win);
|
||||
EDestroyWindow(m->win);
|
||||
|
||||
Esnprintf(s, sizeof(s), "__.%s", m->name);
|
||||
RemoveTimerEvent(s);
|
||||
|
@ -601,7 +600,7 @@ MenuEmpty(Menu * m)
|
|||
for (j = 0; j < 3; j++)
|
||||
FreePmapMask(&(m->items[i]->pmm[j]));
|
||||
if (m->items[i]->win)
|
||||
EDestroyWindow(disp, m->items[i]->win);
|
||||
EDestroyWindow(m->items[i]->win);
|
||||
if (m->items[i])
|
||||
Efree(m->items[i]);
|
||||
}
|
||||
|
@ -684,8 +683,8 @@ MenuRealize(Menu * m)
|
|||
m->items[i]->win = ECreateWindow(m->win, 0, 0, 1, 1, 0);
|
||||
EventCallbackRegister(m->items[i]->win, 0, MenuItemHandleEvents,
|
||||
m->items[i]);
|
||||
XSelectInput(disp, m->items[i]->win, MENU_ITEM_EVENT_MASK);
|
||||
EMapWindow(disp, m->items[i]->win);
|
||||
ESelectInput(m->items[i]->win, MENU_ITEM_EVENT_MASK);
|
||||
EMapWindow(m->items[i]->win);
|
||||
|
||||
if ((m->style) && (m->style->tclass) && (m->items[i]->text))
|
||||
{
|
||||
|
@ -707,7 +706,7 @@ MenuRealize(Menu * m)
|
|||
ECreateWindow(m->items[i]->win, 0, 0,
|
||||
imlib_image_get_width(),
|
||||
imlib_image_get_height(), 0);
|
||||
EMapWindow(disp, m->items[i]->icon_win);
|
||||
EMapWindow(m->items[i]->icon_win);
|
||||
m->items[i]->icon_w = imlib_image_get_width();
|
||||
m->items[i]->icon_h = imlib_image_get_height();
|
||||
if (imlib_image_get_height() > maxh)
|
||||
|
@ -776,14 +775,14 @@ MenuRealize(Menu * m)
|
|||
|
||||
for (i = 0; i < m->num; i++)
|
||||
{
|
||||
EMoveResizeWindow(disp, m->items[i]->win, x, y, maxw, maxh);
|
||||
EMoveResizeWindow(m->items[i]->win, x, y, maxw, maxh);
|
||||
if (m->style->iconpos == ICON_LEFT)
|
||||
{
|
||||
m->items[i]->text_x = m->style->item_iclass->padding.left + maxx2;
|
||||
m->items[i]->text_w = maxx1;
|
||||
m->items[i]->text_y = (maxh - m->items[i]->text_h) / 2;
|
||||
if (m->items[i]->icon_win)
|
||||
EMoveWindow(disp, m->items[i]->icon_win,
|
||||
EMoveWindow(m->items[i]->icon_win,
|
||||
m->style->item_iclass->padding.left +
|
||||
((maxx2 - m->items[i]->icon_w) / 2),
|
||||
((maxh - m->items[i]->icon_h) / 2));
|
||||
|
@ -794,7 +793,7 @@ MenuRealize(Menu * m)
|
|||
m->items[i]->text_w = maxx1;
|
||||
m->items[i]->text_y = (maxh - m->items[i]->text_h) / 2;
|
||||
if (m->items[i]->icon_win)
|
||||
EMoveWindow(disp, m->items[i]->icon_win,
|
||||
EMoveWindow(m->items[i]->icon_win,
|
||||
maxw - m->style->item_iclass->padding.right -
|
||||
maxx2 + ((maxx2 - w) / 2), ((maxh - h) / 2));
|
||||
}
|
||||
|
@ -845,7 +844,7 @@ MenuRealize(Menu * m)
|
|||
}
|
||||
|
||||
m->redraw = 1;
|
||||
EResizeWindow(disp, m->win, mmw, mmh);
|
||||
EResizeWindow(m->win, mmw, mmh);
|
||||
|
||||
Mode.queue_up = pq;
|
||||
}
|
||||
|
@ -872,9 +871,8 @@ MenuRedraw(Menu * m)
|
|||
FreePmapMask(&m->pmm);
|
||||
ImageclassApplyCopy(m->style->bg_iclass, m->win, w, h, 0, 0,
|
||||
STATE_NORMAL, &m->pmm, 1, ST_MENU);
|
||||
ESetWindowBackgroundPixmap(disp, m->win, m->pmm.pmap);
|
||||
EShapeCombineMask(disp, m->win, ShapeBounding, 0, 0, m->pmm.mask,
|
||||
ShapeSet);
|
||||
ESetWindowBackgroundPixmap(m->win, m->pmm.pmap);
|
||||
EShapeCombineMask(m->win, ShapeBounding, 0, 0, m->pmm.mask, ShapeSet);
|
||||
for (i = 0; i < m->num; i++)
|
||||
MenuDrawItem(m, m->items[i], 0);
|
||||
}
|
||||
|
@ -949,10 +947,9 @@ MenuDrawItem(Menu * m, MenuItem * mi, char shape)
|
|||
}
|
||||
}
|
||||
|
||||
ESetWindowBackgroundPixmap(disp, mi->win, mi_pmm->pmap);
|
||||
EShapeCombineMask(disp, mi->win, ShapeBounding, 0, 0, mi_pmm->mask,
|
||||
ShapeSet);
|
||||
XClearWindow(disp, mi->win);
|
||||
ESetWindowBackgroundPixmap(mi->win, mi_pmm->pmap);
|
||||
EShapeCombineMask(mi->win, ShapeBounding, 0, 0, mi_pmm->mask, ShapeSet);
|
||||
EClearWindow(mi->win);
|
||||
|
||||
if ((shape) && (m->style->use_item_bg))
|
||||
PropagateShapes(m->win);
|
||||
|
@ -988,10 +985,10 @@ MenuShowMasker(Menu * m)
|
|||
EobjSetDesk(eo, EoGetDesk(ewin));
|
||||
EobjSetLayer(eo, 20);
|
||||
EobjListStackLower(eo);
|
||||
XSelectInput(disp, Mode_menus.cover_win,
|
||||
ESelectInput(Mode_menus.cover_win,
|
||||
ButtonPressMask | ButtonReleaseMask | EnterWindowMask |
|
||||
LeaveWindowMask);
|
||||
EMapWindow(disp, Mode_menus.cover_win);
|
||||
EMapWindow(Mode_menus.cover_win);
|
||||
EventCallbackRegister(Mode_menus.cover_win, 0, MenuMaskerHandleEvents,
|
||||
NULL);
|
||||
#if 1 /* FIXME - Too expensive */
|
||||
|
@ -1006,7 +1003,7 @@ MenuHideMasker(void)
|
|||
if (Mode_menus.cover_win)
|
||||
{
|
||||
EobjUnregister(Mode_menus.cover_win);
|
||||
EDestroyWindow(disp, Mode_menus.cover_win);
|
||||
EDestroyWindow(Mode_menus.cover_win);
|
||||
Mode_menus.cover_win = 0;
|
||||
Mode_menus.win_covered = 0;
|
||||
}
|
||||
|
@ -1626,7 +1623,7 @@ MenusSetEvents(int on)
|
|||
continue;
|
||||
|
||||
for (j = 0; j < m->num; j++)
|
||||
XSelectInput(disp, m->items[j]->win, event_mask);
|
||||
ESelectInput(m->items[j]->win, event_mask);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
102
src/pager.c
102
src/pager.c
|
@ -85,12 +85,12 @@ PagerCreate(void)
|
|||
p->win = ECreateWindow(VRoot.win, 0, 0, p->w, p->h, 0);
|
||||
EventCallbackRegister(p->win, 0, PagerEventMainWin, p);
|
||||
p->pmap = ecore_x_pixmap_new(p->win, p->w, p->h, VRoot.depth);
|
||||
ESetWindowBackgroundPixmap(disp, p->win, p->pmap);
|
||||
ESetWindowBackgroundPixmap(p->win, p->pmap);
|
||||
p->hi_win = ECreateWindow(VRoot.win, 0, 0, 3, 3, 0);
|
||||
EventCallbackRegister(p->hi_win, 0, PagerEventHiWin, p);
|
||||
p->hi_visible = 0;
|
||||
p->hi_ewin = NULL;
|
||||
XSelectInput(disp, p->hi_win,
|
||||
ESelectInput(p->hi_win,
|
||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
||||
EnterWindowMask | LeaveWindowMask);
|
||||
p->desktop = 0;
|
||||
|
@ -119,9 +119,9 @@ PagerDestroy(Pager * p)
|
|||
RemoveTimerEvent(s);
|
||||
if (p->name)
|
||||
Efree(p->name);
|
||||
EDestroyWindow(disp, p->win);
|
||||
EDestroyWindow(p->win);
|
||||
if (p->hi_win)
|
||||
EDestroyWindow(disp, p->hi_win);
|
||||
EDestroyWindow(p->hi_win);
|
||||
if (p->pmap)
|
||||
ecore_x_pixmap_del(p->pmap);
|
||||
FreePmapMask(&p->bgpmap);
|
||||
|
@ -179,7 +179,7 @@ PagerUpdateTimeout(int val __UNUSED__, void *data)
|
|||
y2 = (y * VRoot.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);
|
||||
EClearArea(p->win, xx, yy + y, ww, 1, False);
|
||||
|
||||
p->update_phase++;
|
||||
if (p->update_phase >= p->h)
|
||||
|
@ -428,8 +428,8 @@ PagerRedraw(Pager * p, char newbg)
|
|||
|
||||
if (newbg < 2)
|
||||
{
|
||||
ESetWindowBackgroundPixmap(disp, p->win, p->pmap);
|
||||
XClearWindow(disp, p->win);
|
||||
ESetWindowBackgroundPixmap(p->win, p->pmap);
|
||||
EClearWindow(p->win);
|
||||
}
|
||||
|
||||
ecore_x_gc_del(gc);
|
||||
|
@ -477,7 +477,7 @@ PagerForceUpdate(Pager * p)
|
|||
yy = cy * hh;
|
||||
|
||||
ScaleRect(p->pmap, VRoot.win, 0, 0, xx, yy, VRoot.w, VRoot.h, ww, hh);
|
||||
XClearWindow(disp, p->win);
|
||||
EClearWindow(p->win);
|
||||
|
||||
lst = EwinListGetForDesk(&num, p->desktop);
|
||||
for (i = 0; i < num; i++)
|
||||
|
@ -517,7 +517,7 @@ PagerEwinMoveResize(EWin * ewin, int resize __UNUSED__)
|
|||
GetAreaSize(&ax, &ay);
|
||||
ecore_x_pixmap_del(p->pmap);
|
||||
FreePmapMask(&p->bgpmap);
|
||||
EResizeWindow(disp, p->win, w, h);
|
||||
EResizeWindow(p->win, w, h);
|
||||
p->w = w;
|
||||
p->h = h;
|
||||
p->dw = w / ax;
|
||||
|
@ -525,8 +525,8 @@ PagerEwinMoveResize(EWin * ewin, int resize __UNUSED__)
|
|||
p->pmap = ecore_x_pixmap_new(p->win, p->w, p->h, VRoot.depth);
|
||||
if (p->visible)
|
||||
PagerRedraw(p, 1);
|
||||
ESetWindowBackgroundPixmap(disp, p->win, p->pmap);
|
||||
XClearWindow(disp, p->win);
|
||||
ESetWindowBackgroundPixmap(p->win, p->pmap);
|
||||
EClearWindow(p->win);
|
||||
if (p->ewin)
|
||||
{
|
||||
double aspect;
|
||||
|
@ -543,8 +543,7 @@ PagerEwinMoveResize(EWin * ewin, int resize __UNUSED__)
|
|||
if (ic)
|
||||
{
|
||||
DeskGetArea(p->desktop, &cx, &cy);
|
||||
EMoveResizeWindow(disp, p->sel_win, cx * p->dw, cy * p->dh, p->dw,
|
||||
p->dh);
|
||||
EMoveResizeWindow(p->sel_win, cx * p->dw, cy * p->dh, p->dw, p->dh);
|
||||
ImageclassApply(ic, p->sel_win, p->dw, p->dh, 0, 0, STATE_NORMAL, 0,
|
||||
ST_PAGER);
|
||||
}
|
||||
|
@ -615,7 +614,7 @@ PagerShow(Pager * p)
|
|||
|
||||
ewin->client.event_mask |=
|
||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask;
|
||||
XSelectInput(disp, p->win, ewin->client.event_mask);
|
||||
ESelectInput(p->win, ewin->client.event_mask);
|
||||
|
||||
aspect = ((double)VRoot.w) / ((double)VRoot.h);
|
||||
GetAreaSize(&ax, &ay);
|
||||
|
@ -935,7 +934,7 @@ PagerMenuShow(Pager * p, int x, int y)
|
|||
static void
|
||||
PagerClose(Pager * p)
|
||||
{
|
||||
EUnmapWindow(disp, p->win);
|
||||
EUnmapWindow(p->win);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -957,12 +956,12 @@ UpdatePagerSel(void)
|
|||
{
|
||||
p = pl[i];
|
||||
if (p->desktop != DesksGetCurrent())
|
||||
EUnmapWindow(disp, p->sel_win);
|
||||
EUnmapWindow(p->sel_win);
|
||||
else
|
||||
{
|
||||
DeskGetArea(p->desktop, &cx, &cy);
|
||||
EMoveWindow(disp, p->sel_win, cx * p->dw, cy * p->dh);
|
||||
EMapWindow(disp, p->sel_win);
|
||||
EMoveWindow(p->sel_win, cx * p->dw, cy * p->dh);
|
||||
EMapWindow(p->sel_win);
|
||||
ic = ImageclassFind("PAGER_SEL", 0);
|
||||
if (ic)
|
||||
ImageclassApply(ic, p->sel_win, p->dw, p->dh, 0, 0,
|
||||
|
@ -1002,7 +1001,7 @@ PagerHideHi(Pager * p)
|
|||
if (p->hi_visible)
|
||||
{
|
||||
p->hi_visible = 0;
|
||||
EUnmapWindow(disp, p->hi_win);
|
||||
EUnmapWindow(p->hi_win);
|
||||
}
|
||||
p->hi_ewin = NULL;
|
||||
|
||||
|
@ -1044,8 +1043,8 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
p->hi_win_h = 2 * h;
|
||||
|
||||
ic = ImageclassFind("PAGER_WIN", 0);
|
||||
EMoveResizeWindow(disp, p->hi_win, x, y, w, h);
|
||||
EMapRaised(disp, p->hi_win);
|
||||
EMoveResizeWindow(p->hi_win, x, y, w, h);
|
||||
EMapRaised(p->hi_win);
|
||||
if (ewin->mini_pmm.pmap)
|
||||
{
|
||||
Imlib_Image *im;
|
||||
|
@ -1066,10 +1065,10 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
yy = y + ((h - hh) / 2);
|
||||
imlib_render_pixmaps_for_whole_image_at_size(&pmap,
|
||||
&mask, ww, hh);
|
||||
ESetWindowBackgroundPixmap(disp, p->hi_win, pmap);
|
||||
ESetWindowBackgroundPixmap(p->hi_win, pmap);
|
||||
imlib_free_pixmap_and_mask(pmap);
|
||||
EMoveResizeWindow(disp, p->hi_win, xx, yy, ww, hh);
|
||||
XClearWindow(disp, p->hi_win);
|
||||
EMoveResizeWindow(p->hi_win, xx, yy, ww, hh);
|
||||
EClearWindow(p->hi_win);
|
||||
{
|
||||
int px, py;
|
||||
|
||||
|
@ -1078,7 +1077,7 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
|| (py >= (y + h)))
|
||||
{
|
||||
imlib_free_image_and_decache();
|
||||
EUnmapWindow(disp, p->hi_win);
|
||||
EUnmapWindow(p->hi_win);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
@ -1094,10 +1093,10 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
yy = y + ((h - hh) / 2);
|
||||
imlib_render_pixmaps_for_whole_image_at_size(&pmap,
|
||||
&mask, ww, hh);
|
||||
ESetWindowBackgroundPixmap(disp, p->hi_win, pmap);
|
||||
ESetWindowBackgroundPixmap(p->hi_win, pmap);
|
||||
imlib_free_pixmap_and_mask(pmap);
|
||||
EMoveResizeWindow(disp, p->hi_win, xx, yy, ww, hh);
|
||||
XClearWindow(disp, p->hi_win);
|
||||
EMoveResizeWindow(p->hi_win, xx, yy, ww, hh);
|
||||
EClearWindow(p->hi_win);
|
||||
{
|
||||
int px, py;
|
||||
|
||||
|
@ -1106,14 +1105,13 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
|| (py >= (y + h)))
|
||||
{
|
||||
imlib_free_image_and_decache();
|
||||
EUnmapWindow(disp, p->hi_win);
|
||||
EUnmapWindow(p->hi_win);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EMoveResizeWindow(disp, p->hi_win, x - (w / 2), y - (h / 2),
|
||||
w * 2, h * 2);
|
||||
EMoveResizeWindow(p->hi_win, x - (w / 2), y - (h / 2), w * 2, h * 2);
|
||||
imlib_context_set_image(im);
|
||||
imlib_context_set_drawable(p->hi_win);
|
||||
imlib_render_image_on_drawable_at_size(0, 0, p->hi_win_w, p->hi_win_h);
|
||||
|
@ -1134,8 +1132,8 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
yy = y + ((h - hh) / 2);
|
||||
ImageclassApply(ic, p->hi_win, ww, hh, 0, 0, STATE_NORMAL, 0,
|
||||
ST_PAGER);
|
||||
EMoveResizeWindow(disp, p->hi_win, xx, yy, ww, hh);
|
||||
XClearWindow(disp, p->hi_win);
|
||||
EMoveResizeWindow(p->hi_win, xx, yy, ww, hh);
|
||||
EClearWindow(p->hi_win);
|
||||
{
|
||||
int px, py;
|
||||
|
||||
|
@ -1143,7 +1141,7 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
if ((px < x) || (py < y) || (px >= (x + w))
|
||||
|| (py >= (y + h)))
|
||||
{
|
||||
EUnmapWindow(disp, p->hi_win);
|
||||
EUnmapWindow(p->hi_win);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
@ -1159,8 +1157,8 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
yy = y + ((h - hh) / 2);
|
||||
ImageclassApply(ic, p->hi_win, ww, hh, 0, 0, STATE_NORMAL, 0,
|
||||
ST_PAGER);
|
||||
EMoveResizeWindow(disp, p->hi_win, xx, yy, ww, hh);
|
||||
XClearWindow(disp, p->hi_win);
|
||||
EMoveResizeWindow(p->hi_win, xx, yy, ww, hh);
|
||||
EClearWindow(p->hi_win);
|
||||
{
|
||||
int px, py;
|
||||
|
||||
|
@ -1168,14 +1166,13 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
if ((px < x) || (py < y) || (px >= (x + w))
|
||||
|| (py >= (y + h)))
|
||||
{
|
||||
EUnmapWindow(disp, p->hi_win);
|
||||
EUnmapWindow(p->hi_win);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EMoveResizeWindow(disp, p->hi_win, x - (w / 2), y - (h / 2), w * 2,
|
||||
h * 2);
|
||||
EMoveResizeWindow(p->hi_win, x - (w / 2), y - (h / 2), w * 2, h * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1184,7 +1181,7 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
int xx, yy, ww, hh, i;
|
||||
|
||||
pmap = ecore_x_pixmap_new(p->hi_win, w * 2, h * 2, VRoot.depth);
|
||||
ESetWindowBackgroundPixmap(disp, p->hi_win, pmap);
|
||||
ESetWindowBackgroundPixmap(p->hi_win, pmap);
|
||||
gc = ecore_x_gc_new(pmap);
|
||||
|
||||
if (w > h)
|
||||
|
@ -1199,8 +1196,8 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
XFillRectangle(disp, pmap, gc, 0, 0, ww, hh);
|
||||
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);
|
||||
EMoveResizeWindow(p->hi_win, xx, yy, ww, hh);
|
||||
EClearWindow(p->hi_win);
|
||||
{
|
||||
int px, py;
|
||||
|
||||
|
@ -1209,7 +1206,7 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
|| (py >= (y + h)))
|
||||
{
|
||||
ecore_x_pixmap_del(pmap);
|
||||
EUnmapWindow(disp, p->hi_win);
|
||||
EUnmapWindow(p->hi_win);
|
||||
goto done1;
|
||||
}
|
||||
}
|
||||
|
@ -1227,8 +1224,8 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
XFillRectangle(disp, pmap, gc, 0, 0, ww, hh);
|
||||
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);
|
||||
EMoveResizeWindow(p->hi_win, xx, yy, ww, hh);
|
||||
EClearWindow(p->hi_win);
|
||||
{
|
||||
int px, py;
|
||||
|
||||
|
@ -1237,15 +1234,14 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
|| (py >= (y + h)))
|
||||
{
|
||||
ecore_x_pixmap_del(pmap);
|
||||
EUnmapWindow(disp, p->hi_win);
|
||||
EUnmapWindow(p->hi_win);
|
||||
goto done1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ecore_x_pixmap_del(pmap);
|
||||
EMoveResizeWindow(disp, p->hi_win, x - (w / 2), y - (h / 2), w * 2,
|
||||
h * 2);
|
||||
EMoveResizeWindow(p->hi_win, x - (w / 2), y - (h / 2), w * 2, h * 2);
|
||||
done1:
|
||||
ecore_x_gc_del(gc);
|
||||
}
|
||||
|
@ -1470,8 +1466,8 @@ PagerEwinMove(Pager * p, Pager * pd)
|
|||
GetWinXY(p->hi_win, &x, &y);
|
||||
x += dx;
|
||||
y += dy;
|
||||
XRaiseWindow(disp, p->hi_win);
|
||||
EMoveWindow(disp, p->hi_win, x, y);
|
||||
ERaiseWindow(p->hi_win);
|
||||
EMoveWindow(p->hi_win, x, y);
|
||||
}
|
||||
|
||||
/* Find real window position */
|
||||
|
@ -1574,9 +1570,9 @@ PagerEventMouseDown(Pager * p, XEvent * ev)
|
|||
wh = ((EoGetH(ewin)) * (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);
|
||||
EMoveResizeWindow(p->hi_win, px + wx, py + wy, ww, wh);
|
||||
ESetWindowBackgroundPixmap(p->hi_win, ewin->mini_pmm.pmap);
|
||||
EMapRaised(p->hi_win);
|
||||
GrabPointerSet(p->hi_win, ECSR_ACT_MOVE, 1);
|
||||
p->hi_visible = 1;
|
||||
p->hi_ewin = ewin;
|
||||
|
|
|
@ -94,11 +94,11 @@ ProgressbarDestroy(Progressbar * p)
|
|||
if (p->name)
|
||||
Efree(p->name);
|
||||
if (p->win)
|
||||
EDestroyWindow(disp, p->win);
|
||||
EDestroyWindow(p->win);
|
||||
if (p->win)
|
||||
EDestroyWindow(disp, p->n_win);
|
||||
EDestroyWindow(p->n_win);
|
||||
if (p->win)
|
||||
EDestroyWindow(disp, p->p_win);
|
||||
EDestroyWindow(p->p_win);
|
||||
|
||||
for (i = 0; i < pnum; i++)
|
||||
{
|
||||
|
@ -108,12 +108,11 @@ ProgressbarDestroy(Progressbar * p)
|
|||
{
|
||||
plist[j] = plist[j + 1];
|
||||
plist[j]->y -= p->h;
|
||||
EMoveWindow(disp, p->win, plist[j]->x, plist[j]->y);
|
||||
EMoveWindow(disp, p->n_win,
|
||||
EMoveWindow(p->win, plist[j]->x, plist[j]->y);
|
||||
EMoveWindow(p->n_win,
|
||||
plist[j]->x + plist[j]->w - (plist[j]->h * 5),
|
||||
plist[j]->y);
|
||||
EMoveWindow(disp, p->p_win, plist[j]->x,
|
||||
plist[j]->y + plist[j]->h);
|
||||
EMoveWindow(p->p_win, plist[j]->x, plist[j]->y + plist[j]->h);
|
||||
}
|
||||
i = pnum;
|
||||
}
|
||||
|
@ -169,7 +168,7 @@ ProgressbarSet(Progressbar * p, int progress)
|
|||
TextclassApply(p->inc, p->n_win, p->h * 5, p->h, 0, 0, STATE_CLICKED, 0,
|
||||
p->tnc, s);
|
||||
ImageclassApply(p->inc, p->p_win, w, p->h, 1, 0, STATE_NORMAL, 0, ST_UNKNWN);
|
||||
EResizeWindow(disp, p->p_win, w, p->h);
|
||||
EResizeWindow(p->p_win, w, p->h);
|
||||
Mode.queue_up = pq;
|
||||
XFlush(disp);
|
||||
}
|
||||
|
@ -192,9 +191,9 @@ ProgressbarShow(Progressbar * p)
|
|||
ImageclassApply(p->inc, p->n_win, (p->h * 5), p->h, 0, 0, STATE_CLICKED, 0,
|
||||
ST_UNKNWN);
|
||||
ImageclassApply(p->ipc, p->p_win, w, p->h, 1, 0, STATE_NORMAL, 0, ST_UNKNWN);
|
||||
EMapRaised(disp, p->win);
|
||||
EMapRaised(disp, p->n_win);
|
||||
EMapRaised(disp, p->p_win);
|
||||
EMapRaised(p->win);
|
||||
EMapRaised(p->n_win);
|
||||
EMapRaised(p->p_win);
|
||||
ecore_x_sync();
|
||||
TextclassApply(p->ic, p->win, p->w - (p->h * 5), p->h, 0, 0, STATE_NORMAL, 0,
|
||||
p->tc, p->name);
|
||||
|
@ -204,9 +203,9 @@ ProgressbarShow(Progressbar * p)
|
|||
void
|
||||
ProgressbarHide(Progressbar * p)
|
||||
{
|
||||
EUnmapWindow(disp, p->win);
|
||||
EUnmapWindow(disp, p->n_win);
|
||||
EUnmapWindow(disp, p->p_win);
|
||||
EUnmapWindow(p->win);
|
||||
EUnmapWindow(p->n_win);
|
||||
EUnmapWindow(p->p_win);
|
||||
}
|
||||
|
||||
Window *
|
||||
|
@ -239,9 +238,9 @@ ProgressbarsRaise(void)
|
|||
|
||||
for (i = 0; i < pnum; i++)
|
||||
{
|
||||
XRaiseWindow(disp, plist[i]->win);
|
||||
XRaiseWindow(disp, plist[i]->n_win);
|
||||
XRaiseWindow(disp, plist[i]->p_win);
|
||||
ERaiseWindow(plist[i]->win);
|
||||
ERaiseWindow(plist[i]->n_win);
|
||||
ERaiseWindow(plist[i]->p_win);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -63,7 +63,7 @@ MapUnmap(int start)
|
|||
}
|
||||
else
|
||||
{
|
||||
EUnmapWindow(disp, wlist[i]);
|
||||
XUnmapWindow(disp, wlist[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,12 +89,12 @@ MapUnmap(int start)
|
|||
#endif
|
||||
StartupWindowsRaise();
|
||||
ProgressbarsRaise();
|
||||
EMapWindow(disp, wlist[i]);
|
||||
XMapWindow(disp, wlist[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Mode.wm.exiting)
|
||||
EMapWindow(disp, wlist[i]);
|
||||
XMapWindow(disp, wlist[i]);
|
||||
else
|
||||
AddToFamily(NULL, wlist[i]);
|
||||
}
|
||||
|
|
|
@ -51,12 +51,12 @@ SlideWindowSizeTo(Window win, int fx, int fy, int tx, int ty, int fw, int fh,
|
|||
y = ((fy * (1024 - k)) + (ty * k)) >> 10;
|
||||
w = ((fw * (1024 - k)) + (tw * k)) >> 10;
|
||||
h = ((fh * (1024 - k)) + (th * k)) >> 10;
|
||||
EMoveResizeWindow(disp, win, x, y, w, h);
|
||||
EMoveResizeWindow(win, x, y, w, h);
|
||||
ecore_x_sync();
|
||||
|
||||
k = ETimedLoopNext();
|
||||
}
|
||||
EMoveResizeWindow(disp, win, tx, ty, tw, th);
|
||||
EMoveResizeWindow(win, tx, ty, tw, th);
|
||||
|
||||
ecore_x_ungrab();
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ SlideoutShow(Slideout * s, EWin * ewin, Window win)
|
|||
return;
|
||||
|
||||
SlideoutCalcSize(s);
|
||||
EGetGeometry(disp, win, &dw, &di, &di, &w, &h, &d, &d);
|
||||
EGetGeometry(win, &dw, &di, &di, &w, &h, &d, &d);
|
||||
XTranslateCoordinates(disp, win, VRoot.win, 0, 0, &x, &y, &dw);
|
||||
|
||||
xx = 0;
|
||||
|
@ -168,59 +168,59 @@ SlideoutShow(Slideout * s, EWin * ewin, Window win)
|
|||
yy -= DeskGetY(desk);
|
||||
dw = DeskGetWin(desk);
|
||||
}
|
||||
EReparentWindow(disp, s->win, dw, xx, yy);
|
||||
EReparentWindow(s->win, dw, xx, yy);
|
||||
|
||||
switch (s->direction)
|
||||
{
|
||||
case 0:
|
||||
att.win_gravity = SouthEastGravity;
|
||||
XChangeWindowAttributes(disp, s->win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(s->win, CWWinGravity, &att);
|
||||
att.win_gravity = NorthWestGravity;
|
||||
for (i = 0; i < s->num_buttons; i++)
|
||||
XChangeWindowAttributes(disp, ButtonGetWindow(s->button[i]),
|
||||
EChangeWindowAttributes(ButtonGetWindow(s->button[i]),
|
||||
CWWinGravity, &att);
|
||||
EMoveResizeWindow(disp, s->win, xx, yy, 1, 1);
|
||||
EMoveResizeWindow(s->win, xx, yy, 1, 1);
|
||||
ecore_x_sync();
|
||||
EMapRaised(disp, s->win);
|
||||
EMapRaised(s->win);
|
||||
SlideWindowSizeTo(s->win, xx + s->w, yy, xx, yy, 0, s->h, s->w, s->h,
|
||||
Conf.slidespeedmap);
|
||||
break;
|
||||
case 1:
|
||||
att.win_gravity = NorthWestGravity;
|
||||
XChangeWindowAttributes(disp, s->win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(s->win, CWWinGravity, &att);
|
||||
att.win_gravity = SouthEastGravity;
|
||||
for (i = 0; i < s->num_buttons; i++)
|
||||
XChangeWindowAttributes(disp, ButtonGetWindow(s->button[i]),
|
||||
EChangeWindowAttributes(ButtonGetWindow(s->button[i]),
|
||||
CWWinGravity, &att);
|
||||
EMoveResizeWindow(disp, s->win, xx, yy, 1, 1);
|
||||
EMoveResizeWindow(s->win, xx, yy, 1, 1);
|
||||
ecore_x_sync();
|
||||
EMapRaised(disp, s->win);
|
||||
EMapRaised(s->win);
|
||||
SlideWindowSizeTo(s->win, xx, yy, xx, yy, 0, s->h, s->w, s->h,
|
||||
Conf.slidespeedmap);
|
||||
break;
|
||||
case 2:
|
||||
att.win_gravity = SouthEastGravity;
|
||||
XChangeWindowAttributes(disp, s->win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(s->win, CWWinGravity, &att);
|
||||
att.win_gravity = NorthWestGravity;
|
||||
for (i = 0; i < s->num_buttons; i++)
|
||||
XChangeWindowAttributes(disp, ButtonGetWindow(s->button[i]),
|
||||
EChangeWindowAttributes(ButtonGetWindow(s->button[i]),
|
||||
CWWinGravity, &att);
|
||||
EMoveResizeWindow(disp, s->win, xx, yy, 1, 1);
|
||||
EMoveResizeWindow(s->win, xx, yy, 1, 1);
|
||||
ecore_x_sync();
|
||||
EMapRaised(disp, s->win);
|
||||
EMapRaised(s->win);
|
||||
SlideWindowSizeTo(s->win, xx, yy + s->h, xx, yy, s->w, 0, s->w, s->h,
|
||||
Conf.slidespeedmap);
|
||||
break;
|
||||
case 3:
|
||||
att.win_gravity = NorthWestGravity;
|
||||
XChangeWindowAttributes(disp, s->win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(s->win, CWWinGravity, &att);
|
||||
att.win_gravity = SouthEastGravity;
|
||||
for (i = 0; i < s->num_buttons; i++)
|
||||
XChangeWindowAttributes(disp, ButtonGetWindow(s->button[i]),
|
||||
EChangeWindowAttributes(ButtonGetWindow(s->button[i]),
|
||||
CWWinGravity, &att);
|
||||
EMoveResizeWindow(disp, s->win, xx, yy, 1, 1);
|
||||
EMoveResizeWindow(s->win, xx, yy, 1, 1);
|
||||
ecore_x_sync();
|
||||
EMapRaised(disp, s->win);
|
||||
EMapRaised(s->win);
|
||||
SlideWindowSizeTo(s->win, xx, yy, xx, yy, s->w, 0, s->w, s->h,
|
||||
Conf.slidespeedmap);
|
||||
break;
|
||||
|
@ -239,7 +239,7 @@ SlideoutHide(Slideout * s)
|
|||
if (!s)
|
||||
return;
|
||||
|
||||
EUnmapWindow(disp, s->win);
|
||||
EUnmapWindow(s->win);
|
||||
s->from_win = 0;
|
||||
s->ref_count--;
|
||||
Mode.slideout = NULL;
|
||||
|
@ -283,7 +283,7 @@ SlideoutCalcSize(Slideout * s)
|
|||
}
|
||||
}
|
||||
|
||||
EResizeWindow(disp, s->win, mx, my);
|
||||
EResizeWindow(s->win, mx, my);
|
||||
s->w = mx;
|
||||
s->h = my;
|
||||
|
||||
|
@ -296,22 +296,20 @@ SlideoutCalcSize(Slideout * s)
|
|||
{
|
||||
case 2:
|
||||
y += bh;
|
||||
EMoveWindow(disp, ButtonGetWindow(s->button[i]),
|
||||
EMoveWindow(ButtonGetWindow(s->button[i]),
|
||||
(s->w - bw) >> 1, s->h - y);
|
||||
break;
|
||||
case 3:
|
||||
EMoveWindow(disp, ButtonGetWindow(s->button[i]),
|
||||
(s->w - bw) >> 1, y);
|
||||
EMoveWindow(ButtonGetWindow(s->button[i]), (s->w - bw) >> 1, y);
|
||||
y += bh;
|
||||
break;
|
||||
case 0:
|
||||
x += bw;
|
||||
EMoveWindow(disp, ButtonGetWindow(s->button[i]), s->w - x,
|
||||
EMoveWindow(ButtonGetWindow(s->button[i]), s->w - x,
|
||||
(s->h - bh) >> 1);
|
||||
break;
|
||||
case 1:
|
||||
EMoveWindow(disp, ButtonGetWindow(s->button[i]), x,
|
||||
(s->h - bh) >> 1);
|
||||
EMoveWindow(ButtonGetWindow(s->button[i]), x, (s->h - bh) >> 1);
|
||||
x += bw;
|
||||
default:
|
||||
break;
|
||||
|
@ -331,7 +329,7 @@ SlideoutAddButton(Slideout * s, Button * b)
|
|||
s->num_buttons++;
|
||||
s->button = Erealloc(s->button, sizeof(Button *) * s->num_buttons);
|
||||
s->button[s->num_buttons - 1] = b;
|
||||
EReparentWindow(disp, ButtonGetWindow(b), s->win, 0, 0);
|
||||
EReparentWindow(ButtonGetWindow(b), s->win, 0, 0);
|
||||
ButtonSetSwallowed(b);
|
||||
ButtonShow(b);
|
||||
SlideoutCalcSize(s);
|
||||
|
|
|
@ -1524,7 +1524,7 @@ MatchEwinToSnapInfo(EWin * ewin)
|
|||
ewin->client.x += ((sn->area_x - ax) * VRoot.w);
|
||||
ewin->client.y += ((sn->area_y - ay) * VRoot.h);
|
||||
}
|
||||
EMoveResizeWindow(disp, ewin->client.win, ewin->client.x,
|
||||
EMoveResizeWindow(ewin->client.win, ewin->client.x,
|
||||
ewin->client.y, ewin->client.w, ewin->client.h);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,14 +72,14 @@ StartupWindowsCreate(int start)
|
|||
win2 = ECreateWindow(w2, 0, -(VRoot.h / 2), VRoot.w, VRoot.h, 0);
|
||||
}
|
||||
|
||||
EMapWindow(disp, win1);
|
||||
EMapWindow(disp, win2);
|
||||
EMapWindow(win1);
|
||||
EMapWindow(win2);
|
||||
|
||||
b1 = ECreateWindow(w1, 0, VRoot.h - Conf.desks.dragbar_width, VRoot.w,
|
||||
Conf.desks.dragbar_width, 0);
|
||||
b2 = ECreateWindow(w2, 0, 0, VRoot.w, Conf.desks.dragbar_width, 0);
|
||||
EMapRaised(disp, b1);
|
||||
EMapRaised(disp, b2);
|
||||
EMapRaised(b1);
|
||||
EMapRaised(b2);
|
||||
|
||||
pq = Mode.queue_up;
|
||||
Mode.queue_up = 0;
|
||||
|
@ -93,8 +93,8 @@ StartupWindowsCreate(int start)
|
|||
BackgroundImagesFree(bg, 1);
|
||||
init_win1 = w1;
|
||||
init_win2 = w2;
|
||||
EMapRaised(disp, w1);
|
||||
EMapRaised(disp, w2);
|
||||
EMapRaised(w1);
|
||||
EMapRaised(w2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -125,15 +125,15 @@ StartupWindowsCreate(int start)
|
|||
y = ty;
|
||||
}
|
||||
|
||||
EMoveWindow(disp, w1, x + xOffset, -y - yOffset);
|
||||
EMoveWindow(disp, w2, -x - xOffset, y + yOffset);
|
||||
EMoveWindow(w1, x + xOffset, -y - yOffset);
|
||||
EMoveWindow(w2, -x - xOffset, y + yOffset);
|
||||
ecore_x_sync();
|
||||
|
||||
k = ETimedLoopNext();
|
||||
}
|
||||
|
||||
EDestroyWindow(disp, w1);
|
||||
EDestroyWindow(disp, w2);
|
||||
EDestroyWindow(w1);
|
||||
EDestroyWindow(w2);
|
||||
init_win1 = 0;
|
||||
init_win2 = 0;
|
||||
|
||||
|
@ -148,7 +148,7 @@ StartupWindowsRaise(void)
|
|||
{
|
||||
if (init_win1)
|
||||
{
|
||||
XRaiseWindow(disp, init_win1);
|
||||
XRaiseWindow(disp, init_win2);
|
||||
ERaiseWindow(init_win1);
|
||||
ERaiseWindow(init_win2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -803,7 +803,7 @@ TextDrawRotTo(Window win, Drawable * drawable, int x, int y, int w, int h,
|
|||
imlib_render_image_on_drawable_at_size(0, 0, w, h);
|
||||
break;
|
||||
case FONT_TO_DOWN:
|
||||
EGetGeometry(disp, win, &rr, &win_x, &win_y, &win_w, &win_h,
|
||||
XGetGeometry(disp, win, &rr, &win_x, &win_y, &win_w, &win_h,
|
||||
&win_b, &win_d);
|
||||
ecore_x_sync(); /* Workaround for crash seen with Absolute E (Imlib2?) */
|
||||
imlib_context_set_drawable(win);
|
||||
|
@ -850,7 +850,7 @@ TextDrawRotBack(Window win, Pixmap drawable, int x, int y, int w, int h,
|
|||
break;
|
||||
case FONT_TO_DOWN:
|
||||
imlib_context_set_drawable(drawable);
|
||||
EGetGeometry(disp, win, &rr, &win_x, &win_y, &win_w, &win_h,
|
||||
XGetGeometry(disp, win, &rr, &win_x, &win_y, &win_w, &win_h,
|
||||
&win_b, &win_d);
|
||||
ii = imlib_create_image_from_drawable(0, 0, 0, w, h, 0);
|
||||
imlib_context_set_image(ii);
|
||||
|
|
|
@ -431,13 +431,13 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
{
|
||||
ix = tt->iclass->padding.left;
|
||||
iy = (h - ih) / 2;
|
||||
EMoveResizeWindow(disp, tt->iwin, ix, iy, iw, ih);
|
||||
EMapWindow(disp, tt->iwin);
|
||||
EMoveResizeWindow(tt->iwin, ix, iy, iw, ih);
|
||||
EMapWindow(tt->iwin);
|
||||
ImageclassApply(tt->tooltippic, tt->iwin, iw, ih, 0, 0, STATE_NORMAL, 0,
|
||||
ST_TOOLTIP);
|
||||
}
|
||||
else
|
||||
EUnmapWindow(disp, tt->iwin);
|
||||
EUnmapWindow(tt->iwin);
|
||||
|
||||
dx = x - VRoot.w / 2;
|
||||
dy = y - VRoot.h / 2;
|
||||
|
@ -466,19 +466,19 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
|
||||
yy = y - ((ady * 10 * dist) / 100);
|
||||
xx = x - (dist * 10 * dx) / (100 * VRoot.w / 2);
|
||||
EMoveWindow(disp, tt->s_win[0], xx - 4, yy - 4);
|
||||
EMoveWindow(tt->s_win[0], xx - 4, yy - 4);
|
||||
|
||||
yy = y - ((ady * 30 * dist) / 100);
|
||||
xx = x - (dist * 30 * dx) / (100 * VRoot.w / 2);
|
||||
EMoveWindow(disp, tt->s_win[1], xx - 8, yy - 8);
|
||||
EMoveWindow(tt->s_win[1], xx - 8, yy - 8);
|
||||
|
||||
yy = y - ((ady * 50 * dist) / 100);
|
||||
xx = x - (dist * 50 * dx) / (100 * VRoot.w / 2);
|
||||
EMoveWindow(disp, tt->s_win[2], xx - 12, yy - 12);
|
||||
EMoveWindow(tt->s_win[2], xx - 12, yy - 12);
|
||||
|
||||
yy = y - ((ady * 80 * dist) / 100);
|
||||
xx = x - (dist * 80 * dx) / (100 * VRoot.w / 2);
|
||||
EMoveWindow(disp, tt->s_win[3], xx - 16, yy - 16);
|
||||
EMoveWindow(tt->s_win[3], xx - 16, yy - 16);
|
||||
|
||||
yy = y - ((ady * 100 * dist) / 100);
|
||||
xx = x - (dist * 100 * dx) / (100 * VRoot.w / 2);
|
||||
|
@ -511,16 +511,16 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
adx = adx / dx;
|
||||
xx = x - ((adx * 10 * dist) / 100);
|
||||
yy = y - (dist * 10 * dy) / (100 * VRoot.h / 2);
|
||||
EMoveWindow(disp, tt->s_win[0], xx - 4, yy - 4);
|
||||
EMoveWindow(tt->s_win[0], xx - 4, yy - 4);
|
||||
xx = x - ((adx * 30 * dist) / 100);
|
||||
yy = y - (dist * 30 * dy) / (100 * VRoot.h / 2);
|
||||
EMoveWindow(disp, tt->s_win[1], xx - 8, yy - 8);
|
||||
EMoveWindow(tt->s_win[1], xx - 8, yy - 8);
|
||||
xx = x - ((adx * 50 * dist) / 100);
|
||||
yy = y - (dist * 50 * dy) / (100 * VRoot.h / 2);
|
||||
EMoveWindow(disp, tt->s_win[2], xx - 12, yy - 12);
|
||||
EMoveWindow(tt->s_win[2], xx - 12, yy - 12);
|
||||
xx = x - ((adx * 80 * dist) / 100);
|
||||
yy = y - (dist * 80 * dy) / (100 * VRoot.h / 2);
|
||||
EMoveWindow(disp, tt->s_win[3], xx - 16, yy - 16);
|
||||
EMoveWindow(tt->s_win[3], xx - 16, yy - 16);
|
||||
xx = x - ((adx * 100 * dist) / 100);
|
||||
yy = y - (dist * 100 * dy) / (100 * VRoot.h / 2);
|
||||
if (adx < 0)
|
||||
|
@ -534,7 +534,7 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
hh = (h / 2) + ((dy * h) / (VRoot.h / 2));
|
||||
}
|
||||
|
||||
EMoveResizeWindow(disp, tt->win, xx - ww, yy - hh, w, h);
|
||||
EMoveResizeWindow(tt->win, xx - ww, yy - hh, w, h);
|
||||
|
||||
ImageclassApply(tt->s_iclass[0], tt->s_win[0], 8, 8, 0, 0, STATE_NORMAL, 0,
|
||||
ST_TOOLTIP);
|
||||
|
@ -546,11 +546,11 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
|
|||
ST_TOOLTIP);
|
||||
ImageclassApply(tt->iclass, tt->win, w, h, 0, 0, STATE_NORMAL, 0,
|
||||
ST_TOOLTIP);
|
||||
EMapRaised(disp, tt->s_win[0]);
|
||||
EMapRaised(disp, tt->s_win[1]);
|
||||
EMapRaised(disp, tt->s_win[2]);
|
||||
EMapRaised(disp, tt->s_win[3]);
|
||||
EMapRaised(disp, tt->win);
|
||||
EMapRaised(tt->s_win[0]);
|
||||
EMapRaised(tt->s_win[1]);
|
||||
EMapRaised(tt->s_win[2]);
|
||||
EMapRaised(tt->s_win[3]);
|
||||
EMapRaised(tt->win);
|
||||
ecore_x_sync();
|
||||
|
||||
xx = tt->iclass->padding.left + iw;
|
||||
|
@ -655,11 +655,11 @@ TooltipHide(ToolTip * tt)
|
|||
return;
|
||||
|
||||
tt->visible = 0;
|
||||
EUnmapWindow(disp, tt->win);
|
||||
EUnmapWindow(disp, tt->s_win[0]);
|
||||
EUnmapWindow(disp, tt->s_win[1]);
|
||||
EUnmapWindow(disp, tt->s_win[2]);
|
||||
EUnmapWindow(disp, tt->s_win[3]);
|
||||
EUnmapWindow(tt->win);
|
||||
EUnmapWindow(tt->s_win[0]);
|
||||
EUnmapWindow(tt->s_win[1]);
|
||||
EUnmapWindow(tt->s_win[2]);
|
||||
EUnmapWindow(tt->s_win[3]);
|
||||
ecore_x_sync();
|
||||
}
|
||||
|
||||
|
|
15
src/warp.c
15
src/warp.c
|
@ -84,7 +84,7 @@ WarpFocusShowTitle(EWin * ewin)
|
|||
|
||||
pq = Mode.queue_up;
|
||||
Mode.queue_up = 0;
|
||||
XRaiseWindow(disp, warpFocusTitleWindow);
|
||||
ERaiseWindow(warpFocusTitleWindow);
|
||||
|
||||
if (!warpFocusTitleShowing)
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ WarpFocusShowTitle(EWin * ewin)
|
|||
warplist_num * sizeof(WarplistItem));
|
||||
warplist[warplist_num - 1].win =
|
||||
ECreateWindow(warpFocusTitleWindow, 0, 0, 1, 1, 0);
|
||||
EMapWindow(disp, warplist[warplist_num - 1].win);
|
||||
EMapWindow(warplist[warplist_num - 1].win);
|
||||
warplist[warplist_num - 1].ewin = lst[i];
|
||||
Esnprintf(s, sizeof(s), (lst[i]->iconified) ? "[%s]" : "%s",
|
||||
EwinGetName(lst[i]));
|
||||
|
@ -123,11 +123,10 @@ WarpFocusShowTitle(EWin * ewin)
|
|||
y += (hh - h * warplist_num) / 2;
|
||||
mw = w;
|
||||
mh = h;
|
||||
EMoveResizeWindow(disp, warpFocusTitleWindow, x, y, w,
|
||||
(h * warplist_num));
|
||||
EMoveResizeWindow(warpFocusTitleWindow, x, y, w, (h * warplist_num));
|
||||
for (i = 0; i < warplist_num; i++)
|
||||
{
|
||||
EMoveResizeWindow(disp, warplist[i].win, 0, (h * i), mw, mh);
|
||||
EMoveResizeWindow(warplist[i].win, 0, (h * i), mw, mh);
|
||||
if (ewin == warplist[i].ewin)
|
||||
ImageclassApply(ic, warplist[i].win, mw, mh, 0, 0,
|
||||
STATE_CLICKED, 0, ST_WARPLIST);
|
||||
|
@ -136,7 +135,7 @@ WarpFocusShowTitle(EWin * ewin)
|
|||
0, ST_WARPLIST);
|
||||
}
|
||||
PropagateShapes(warpFocusTitleWindow);
|
||||
EMapWindow(disp, warpFocusTitleWindow);
|
||||
EMapWindow(warpFocusTitleWindow);
|
||||
|
||||
/*
|
||||
* Grab the keyboard. The grab is automatically released when
|
||||
|
@ -177,10 +176,10 @@ WarpFocusHideTitle(void)
|
|||
|
||||
if (warpFocusTitleWindow)
|
||||
{
|
||||
EUnmapWindow(disp, warpFocusTitleWindow);
|
||||
EUnmapWindow(warpFocusTitleWindow);
|
||||
for (i = 0; i < warplist_num; i++)
|
||||
{
|
||||
EDestroyWindow(disp, warplist[i].win);
|
||||
EDestroyWindow(warplist[i].win);
|
||||
Efree(warplist[i].txt);
|
||||
}
|
||||
}
|
||||
|
|
118
src/x.c
118
src/x.c
|
@ -274,7 +274,7 @@ ECreateWindow(Window parent, int x, int y, int w, int h, int saveunder)
|
|||
}
|
||||
|
||||
void
|
||||
EMoveWindow(Display * d __UNUSED__, Window win, int x, int y)
|
||||
EMoveWindow(Window win, int x, int y)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -297,7 +297,7 @@ EMoveWindow(Display * d __UNUSED__, Window win, int x, int y)
|
|||
}
|
||||
|
||||
void
|
||||
EResizeWindow(Display * d __UNUSED__, Window win, int w, int h)
|
||||
EResizeWindow(Window win, int w, int h)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -316,8 +316,7 @@ EResizeWindow(Display * d __UNUSED__, Window win, int w, int h)
|
|||
}
|
||||
|
||||
void
|
||||
EMoveResizeWindow(Display * d __UNUSED__, Window win, int x, int y, int w,
|
||||
int h)
|
||||
EMoveResizeWindow(Window win, int x, int y, int w, int h)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -342,7 +341,7 @@ EMoveResizeWindow(Display * d __UNUSED__, Window win, int x, int y, int w,
|
|||
}
|
||||
|
||||
void
|
||||
EDestroyWindow(Display * d, Window win)
|
||||
EDestroyWindow(Window win)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -357,20 +356,20 @@ EDestroyWindow(Display * d, Window win)
|
|||
int i, num;
|
||||
|
||||
EXidDelete(win);
|
||||
XDestroyWindow(d, win);
|
||||
XDestroyWindow(disp, win);
|
||||
lst = (EXID **) ListItemType(&num, LIST_TYPE_XID);
|
||||
if (lst)
|
||||
{
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (lst[i]->parent == win)
|
||||
EDestroyWindow(d, lst[i]->win);
|
||||
EDestroyWindow(lst[i]->win);
|
||||
}
|
||||
Efree(lst);
|
||||
}
|
||||
}
|
||||
else
|
||||
XDestroyWindow(d, win);
|
||||
XDestroyWindow(disp, win);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -424,7 +423,7 @@ EUnregisterWindow(Window win)
|
|||
}
|
||||
|
||||
void
|
||||
EMapWindow(Display * d, Window win)
|
||||
EMapWindow(Window win)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -434,15 +433,15 @@ EMapWindow(Display * d, Window win)
|
|||
if (!xid->mapped)
|
||||
{
|
||||
xid->mapped = 1;
|
||||
XMapWindow(d, win);
|
||||
XMapWindow(disp, win);
|
||||
}
|
||||
}
|
||||
else
|
||||
XMapWindow(d, win);
|
||||
XMapWindow(disp, win);
|
||||
}
|
||||
|
||||
void
|
||||
EUnmapWindow(Display * d, Window win)
|
||||
EUnmapWindow(Window win)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -452,16 +451,15 @@ EUnmapWindow(Display * d, Window win)
|
|||
if (xid->mapped)
|
||||
{
|
||||
xid->mapped = 0;
|
||||
XUnmapWindow(d, win);
|
||||
XUnmapWindow(disp, win);
|
||||
}
|
||||
}
|
||||
else
|
||||
XUnmapWindow(d, win);
|
||||
XUnmapWindow(disp, win);
|
||||
}
|
||||
|
||||
void
|
||||
EShapeCombineMask(Display * d, Window win, int dest, int x, int y, Pixmap pmap,
|
||||
int op)
|
||||
EShapeCombineMask(Window win, int dest, int x, int y, Pixmap pmap, int op)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -479,9 +477,9 @@ EShapeCombineMask(Display * d, Window win, int dest, int x, int y, Pixmap pmap,
|
|||
}
|
||||
if (pmap)
|
||||
{
|
||||
XShapeCombineMask(d, win, dest, x, y, pmap, op);
|
||||
XShapeCombineMask(disp, win, dest, x, y, pmap, op);
|
||||
xid->rects =
|
||||
XShapeGetRectangles(d, win, dest, &(xid->num_rect),
|
||||
XShapeGetRectangles(disp, win, dest, &(xid->num_rect),
|
||||
&(xid->ord));
|
||||
if (xid->rects)
|
||||
{
|
||||
|
@ -499,14 +497,14 @@ EShapeCombineMask(Display * d, Window win, int dest, int x, int y, Pixmap pmap,
|
|||
}
|
||||
}
|
||||
else if ((!pmap) && (wasshaped))
|
||||
XShapeCombineMask(d, win, dest, x, y, pmap, op);
|
||||
XShapeCombineMask(disp, win, dest, x, y, pmap, op);
|
||||
}
|
||||
else
|
||||
XShapeCombineMask(d, win, dest, x, y, pmap, op);
|
||||
XShapeCombineMask(disp, win, dest, x, y, pmap, op);
|
||||
}
|
||||
|
||||
void
|
||||
EShapeCombineMaskTiled(Display * d, Window win, int dest, int x, int y,
|
||||
EShapeCombineMaskTiled(Window win, int dest, int x, int y,
|
||||
Pixmap pmap, int op, int w, int h)
|
||||
{
|
||||
XGCValues gcv;
|
||||
|
@ -518,16 +516,16 @@ EShapeCombineMaskTiled(Display * d, Window win, int dest, int x, int y,
|
|||
gcv.ts_x_origin = 0;
|
||||
gcv.ts_y_origin = 0;
|
||||
tm = ecore_x_pixmap_new(win, w, h, 1);
|
||||
gc = XCreateGC(d, tm, GCFillStyle | GCTile |
|
||||
gc = XCreateGC(disp, tm, GCFillStyle | GCTile |
|
||||
GCTileStipXOrigin | GCTileStipYOrigin, &gcv);
|
||||
XFillRectangle(d, tm, gc, 0, 0, w, h);
|
||||
XFreeGC(d, gc);
|
||||
EShapeCombineMask(d, win, dest, x, y, tm, op);
|
||||
XFillRectangle(disp, tm, gc, 0, 0, w, h);
|
||||
XFreeGC(disp, gc);
|
||||
EShapeCombineMask(win, dest, x, y, tm, op);
|
||||
ecore_x_pixmap_del(tm);
|
||||
}
|
||||
|
||||
void
|
||||
EShapeCombineRectangles(Display * d, Window win, int dest, int x, int y,
|
||||
EShapeCombineRectangles(Window win, int dest, int x, int y,
|
||||
XRectangle * rect, int n_rects, int op, int ordering)
|
||||
{
|
||||
EXID *xid;
|
||||
|
@ -543,17 +541,17 @@ EShapeCombineRectangles(Display * d, Window win, int dest, int x, int y,
|
|||
xid->num_rect = 0;
|
||||
XFree(xid->rects);
|
||||
xid->rects = NULL;
|
||||
XShapeCombineMask(d, win, dest, x, y, None, op);
|
||||
XShapeCombineMask(disp, win, dest, x, y, None, op);
|
||||
return;
|
||||
}
|
||||
}
|
||||
xid->num_rect = 0;
|
||||
if (xid->rects)
|
||||
XFree(xid->rects);
|
||||
XShapeCombineRectangles(d, win, dest, x, y, rect, n_rects, op,
|
||||
XShapeCombineRectangles(disp, win, dest, x, y, rect, n_rects, op,
|
||||
ordering);
|
||||
xid->rects =
|
||||
XShapeGetRectangles(d, win, dest, &(xid->num_rect), &(xid->ord));
|
||||
XShapeGetRectangles(disp, win, dest, &(xid->num_rect), &(xid->ord));
|
||||
if (xid->rects)
|
||||
{
|
||||
if (xid->num_rect == 1)
|
||||
|
@ -570,11 +568,12 @@ EShapeCombineRectangles(Display * d, Window win, int dest, int x, int y,
|
|||
}
|
||||
}
|
||||
else
|
||||
XShapeCombineRectangles(d, win, dest, x, y, rect, n_rects, op, ordering);
|
||||
XShapeCombineRectangles(disp, win, dest, x, y, rect, n_rects, op,
|
||||
ordering);
|
||||
}
|
||||
|
||||
void
|
||||
EShapeCombineShape(Display * d, Window win, int dest, int x, int y,
|
||||
EShapeCombineShape(Window win, int dest, int x, int y,
|
||||
Window src_win, int src_kind, int op)
|
||||
{
|
||||
EXID *xid;
|
||||
|
@ -585,9 +584,9 @@ EShapeCombineShape(Display * d, Window win, int dest, int x, int y,
|
|||
xid->num_rect = 0;
|
||||
if (xid->rects)
|
||||
XFree(xid->rects);
|
||||
XShapeCombineShape(d, win, dest, x, y, src_win, src_kind, op);
|
||||
XShapeCombineShape(disp, win, dest, x, y, src_win, src_kind, op);
|
||||
xid->rects =
|
||||
XShapeGetRectangles(d, win, dest, &(xid->num_rect), &(xid->ord));
|
||||
XShapeGetRectangles(disp, win, dest, &(xid->num_rect), &(xid->ord));
|
||||
if (xid->rects)
|
||||
{
|
||||
if (xid->num_rect == 1)
|
||||
|
@ -604,11 +603,11 @@ EShapeCombineShape(Display * d, Window win, int dest, int x, int y,
|
|||
}
|
||||
}
|
||||
else
|
||||
XShapeCombineShape(d, win, dest, x, y, src_win, src_kind, op);
|
||||
XShapeCombineShape(disp, win, dest, x, y, src_win, src_kind, op);
|
||||
}
|
||||
|
||||
XRectangle *
|
||||
EShapeGetRectangles(Display * d, Window win, int dest, int *rn, int *ord)
|
||||
EShapeGetRectangles(Window win, int dest, int *rn, int *ord)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -632,7 +631,7 @@ EShapeGetRectangles(Display * d, Window win, int dest, int *rn, int *ord)
|
|||
{
|
||||
XRectangle *r, *rr;
|
||||
|
||||
r = XShapeGetRectangles(d, win, dest, rn, ord);
|
||||
r = XShapeGetRectangles(disp, win, dest, rn, ord);
|
||||
if (r)
|
||||
{
|
||||
rr = Emalloc(sizeof(XRectangle) * *rn);
|
||||
|
@ -645,7 +644,7 @@ EShapeGetRectangles(Display * d, Window win, int dest, int *rn, int *ord)
|
|||
}
|
||||
|
||||
void
|
||||
EReparentWindow(Display * d, Window win, Window parent, int x, int y)
|
||||
EReparentWindow(Window win, Window parent, int x, int y)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -672,15 +671,15 @@ EReparentWindow(Display * d, Window win, Window parent, int x, int y)
|
|||
xid->parent = parent;
|
||||
xid->x = x;
|
||||
xid->y = y;
|
||||
XReparentWindow(d, win, parent, x, y);
|
||||
XReparentWindow(disp, win, parent, x, y);
|
||||
}
|
||||
}
|
||||
else
|
||||
XReparentWindow(d, win, parent, x, y);
|
||||
XReparentWindow(disp, win, parent, x, y);
|
||||
}
|
||||
|
||||
void
|
||||
EMapRaised(Display * d, Window win)
|
||||
EMapRaised(Window win)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -688,19 +687,19 @@ EMapRaised(Display * d, Window win)
|
|||
if (xid)
|
||||
{
|
||||
if (xid->mapped)
|
||||
XRaiseWindow(d, win);
|
||||
XRaiseWindow(disp, win);
|
||||
else
|
||||
{
|
||||
xid->mapped = 1;
|
||||
XMapRaised(d, win);
|
||||
XMapRaised(disp, win);
|
||||
}
|
||||
}
|
||||
else
|
||||
XMapRaised(d, win);
|
||||
XMapRaised(disp, win);
|
||||
}
|
||||
|
||||
int
|
||||
EGetGeometry(Display * d, Window win, Window * root_return, int *x, int *y,
|
||||
EGetGeometry(Window win, Window * root_return, int *x, int *y,
|
||||
unsigned int *w, unsigned int *h, unsigned int *bw,
|
||||
unsigned int *depth)
|
||||
{
|
||||
|
@ -728,7 +727,7 @@ EGetGeometry(Display * d, Window win, Window * root_return, int *x, int *y,
|
|||
}
|
||||
else
|
||||
{
|
||||
ok = XGetGeometry(d, win, root_return, x, y, w, h, bw, depth);
|
||||
ok = XGetGeometry(disp, win, root_return, x, y, w, h, bw, depth);
|
||||
}
|
||||
#if 0 /* Debug */
|
||||
if (!ok)
|
||||
|
@ -738,8 +737,7 @@ EGetGeometry(Display * d, Window win, Window * root_return, int *x, int *y,
|
|||
}
|
||||
|
||||
void
|
||||
EConfigureWindow(Display * d, Window win, unsigned int mask,
|
||||
XWindowChanges * wc)
|
||||
EConfigureWindow(Window win, unsigned int mask, XWindowChanges * wc)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -769,16 +767,16 @@ EConfigureWindow(Display * d, Window win, unsigned int mask,
|
|||
doit = 1;
|
||||
}
|
||||
if ((doit) || (mask & (CWBorderWidth | CWSibling | CWStackMode)))
|
||||
XConfigureWindow(d, win, mask, wc);
|
||||
XConfigureWindow(disp, win, mask, wc);
|
||||
}
|
||||
else
|
||||
{
|
||||
XConfigureWindow(d, win, mask, wc);
|
||||
XConfigureWindow(disp, win, mask, wc);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ESetWindowBackgroundPixmap(Display * d, Window win, Pixmap pmap)
|
||||
ESetWindowBackgroundPixmap(Window win, Pixmap pmap)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -786,14 +784,14 @@ ESetWindowBackgroundPixmap(Display * d, Window win, Pixmap pmap)
|
|||
if (xid)
|
||||
{
|
||||
xid->bgpmap = pmap;
|
||||
XSetWindowBackgroundPixmap(d, win, pmap);
|
||||
XSetWindowBackgroundPixmap(disp, win, pmap);
|
||||
}
|
||||
else
|
||||
XSetWindowBackgroundPixmap(d, win, pmap);
|
||||
XSetWindowBackgroundPixmap(disp, win, pmap);
|
||||
}
|
||||
|
||||
void
|
||||
ESetWindowBackground(Display * d, Window win, int col)
|
||||
ESetWindowBackground(Window win, int col)
|
||||
{
|
||||
EXID *xid;
|
||||
|
||||
|
@ -804,16 +802,16 @@ ESetWindowBackground(Display * d, Window win, int col)
|
|||
{
|
||||
xid->bgpmap = 0;
|
||||
xid->bgcol = col;
|
||||
XSetWindowBackground(d, win, col);
|
||||
XSetWindowBackground(disp, win, col);
|
||||
}
|
||||
else if (xid->bgcol != col)
|
||||
{
|
||||
xid->bgcol = col;
|
||||
XSetWindowBackground(d, win, col);
|
||||
XSetWindowBackground(disp, win, col);
|
||||
}
|
||||
}
|
||||
else
|
||||
XSetWindowBackground(d, win, col);
|
||||
XSetWindowBackground(disp, win, col);
|
||||
}
|
||||
|
||||
Window
|
||||
|
@ -939,7 +937,7 @@ GetWinXY(Window win, int *x, int *y)
|
|||
Window w1;
|
||||
unsigned int w, h, b, d;
|
||||
|
||||
EGetGeometry(disp, win, &w1, x, y, &w, &h, &b, &d);
|
||||
EGetGeometry(win, &w1, x, y, &w, &h, &b, &d);
|
||||
}
|
||||
|
||||
Window
|
||||
|
@ -961,7 +959,7 @@ GetWinWH(Window win, unsigned int *w, unsigned int *h)
|
|||
int x, y;
|
||||
unsigned int b, d;
|
||||
|
||||
EGetGeometry(disp, win, &w1, &x, &y, w, h, &b, &d);
|
||||
EGetGeometry(win, &w1, &x, &y, w, h, &b, &d);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -971,7 +969,7 @@ GetWinDepth(Window win)
|
|||
unsigned int w, h, b, d;
|
||||
int x, y;
|
||||
|
||||
EGetGeometry(disp, win, &w1, &x, &y, &w, &h, &b, &d);
|
||||
EGetGeometry(win, &w1, &x, &y, &w, &h, &b, &d);
|
||||
return d;
|
||||
}
|
||||
|
||||
|
@ -983,7 +981,7 @@ WinExists(Window win)
|
|||
unsigned int w, h;
|
||||
unsigned int b, d;
|
||||
|
||||
if (EGetGeometry(disp, win, &w1, &x, &y, &w, &h, &b, &d))
|
||||
if (EGetGeometry(win, &w1, &x, &y, &w, &h, &b, &d))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
16
src/zoom.c
16
src/zoom.c
|
@ -183,10 +183,10 @@ ZoomMask(int x, int y, int w, int h)
|
|||
return 0;
|
||||
|
||||
win = ECreateWindow(VRoot.win, x, y, w, h, 0);
|
||||
XSetWindowBackgroundPixmap(disp, win, None);
|
||||
XSetWindowBackground(disp, win, BlackPixel(disp, VRoot.scr));
|
||||
XRaiseWindow(disp, win);
|
||||
XMapWindow(disp, win);
|
||||
ESetWindowBackgroundPixmap(win, None);
|
||||
ESetWindowBackground(win, BlackPixel(disp, VRoot.scr));
|
||||
ERaiseWindow(win);
|
||||
EMapWindow(win);
|
||||
|
||||
return win;
|
||||
}
|
||||
|
@ -207,13 +207,13 @@ Zoom(EWin * ewin)
|
|||
/* XUngrabPointer(disp, CurrentTime); */
|
||||
MoveEwin(ewin, zoom_last_x, zoom_last_y);
|
||||
if (zoom_mask_1)
|
||||
EDestroyWindow(disp, zoom_mask_1);
|
||||
EDestroyWindow(zoom_mask_1);
|
||||
if (zoom_mask_2)
|
||||
EDestroyWindow(disp, zoom_mask_2);
|
||||
EDestroyWindow(zoom_mask_2);
|
||||
if (zoom_mask_3)
|
||||
EDestroyWindow(disp, zoom_mask_3);
|
||||
EDestroyWindow(zoom_mask_3);
|
||||
if (zoom_mask_4)
|
||||
EDestroyWindow(disp, zoom_mask_4);
|
||||
EDestroyWindow(zoom_mask_4);
|
||||
SwitchRes(0, 0, 0, 0, 0);
|
||||
XWarpPointer(disp, None, ewin->client.win, 0, 0, 0, 0,
|
||||
ewin->client.w / 2, ewin->client.h / 2);
|
||||
|
|
Loading…
Reference in New Issue