forked from e16/e16
1
0
Fork 0

Cleanups.

SVN revision: 14887
This commit is contained in:
Kim Woelders 2005-05-21 21:49:36 +00:00
parent ad3b5c7d2e
commit a89b87aa74
9 changed files with 4 additions and 92 deletions

View File

@ -786,7 +786,6 @@ struct _ewin
int shape_x, shape_y, shape_w, shape_h;
int req_x, req_y;
void (*MoveResize) (EWin * ewin, int resize);
void (*Refresh) (EWin * ewin);
void (*Close) (EWin * ewin);
};
@ -1574,7 +1573,6 @@ void EventShow(const XEvent * ev);
#define EWIN_CHANGE_OPACITY (1<<5)
void EwinShapeSet(EWin * ewin);
void EwinRefresh(EWin * ewin);
void EwinFloatAt(EWin * ewin, int x, int y);
void EwinUnfloatAt(EWin * ewin, int desk, int x, int y);
void RaiseEwin(EWin * ewin);
@ -2293,7 +2291,6 @@ void EGetColor(const XColor * pxc, int *pr, int *pg, int *pb);
int GetWinDepth(Window win);
Window GetWinParent(Window win);
int WinExists(Window win);
Window WinGetParent(Window win);
Window WindowAtXY_0(Window base, int bx, int by, int x, int y);
Window WindowAtXY(int x, int y);

View File

@ -461,11 +461,9 @@ BackgroundApply(Background * bg, Window win, int setbg)
GC gc;
int rt;
if (!WinExists(win))
if (!EGetGeometry(win, NULL, NULL, NULL, &rw, &rh, NULL, &depth))
return;
EGetGeometry(win, NULL, NULL, NULL, &rw, &rh, NULL, &depth);
imlib_context_set_drawable(win);
EAllocColor(&bg->bg_solid);

View File

@ -528,12 +528,6 @@ DialogEwinMoveResize(EWin * ewin, int resize __UNUSED__)
DialogRedraw(d);
}
static void
DialogEwinRefresh(EWin * ewin)
{
DialogEwinMoveResize(ewin, 0);
}
static void
DialogEwinClose(EWin * ewin)
{
@ -550,7 +544,6 @@ DialogEwinInit(EWin * ewin, void *ptr)
d->ewin = ewin;
ewin->MoveResize = DialogEwinMoveResize;
ewin->Refresh = DialogEwinRefresh;
ewin->Close = DialogEwinClose;
ewin->client.width.min = ewin->client.width.max = ewin->client.w = d->w;

View File

@ -61,18 +61,8 @@ static PixImg *
ECreatePixImg(Window win, int w, int h)
{
XGCValues gcv;
int bpp;
PixImg *pi;
if (VRoot.depth <= 8)
bpp = 1;
else if (VRoot.depth <= 16)
bpp = 2;
else if (VRoot.depth <= 24)
bpp = 3;
else
bpp = 4;
pi = Emalloc(sizeof(PixImg));
if (!pi)
return NULL;
@ -633,7 +623,6 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
int x1, y1, w1, h1, i, j, pw, ph, dx, dy;
static Pixmap b1 = 0, b2 = 0, b3 = 0;
static Font font = 0;
int bpp;
char str[32];
char check_move = 0;
@ -644,23 +633,11 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
break;
}
if ((md == 5)
&& ((Mode.mode == MODE_RESIZE) || (Mode.mode == MODE_RESIZE_H)
|| (Mode.mode == MODE_RESIZE_V) || (ewin->groups && check_move)))
if ((md == 5) &&
((Mode.mode == MODE_RESIZE) || (Mode.mode == MODE_RESIZE_H) ||
(Mode.mode == MODE_RESIZE_V) || (ewin->groups && check_move)))
md = 0;
if (md == 5)
{
if (VRoot.depth <= 8)
bpp = 1;
else if (VRoot.depth <= 16)
bpp = 2;
else if (VRoot.depth <= 24)
bpp = 3;
else
bpp = 4;
}
pw = w;
ph = h;

View File

@ -221,19 +221,6 @@ EwinFixPosition(EWin * ewin)
MoveEwin(ewin, x, y);
}
void
EwinRefresh(EWin * ewin)
{
if (!ewin)
return;
if (TransparencyEnabled())
EwinBorderDraw(ewin, 0, 1); /* Update the border */
if (ewin->Refresh)
ewin->Refresh(ewin);
}
static void
EwinDetermineArea(EWin * ewin)
{

View File

@ -512,21 +512,6 @@ IconboxEwinMoveResize(EWin * ewin, int resize __UNUSED__)
call_depth--;
}
static void
IconboxEwinRefresh(EWin * ewin)
{
Iconbox *ib = ewin->data;
if (!ib)
return;
if (!TransparencyEnabled())
return;
ib->force_update = 1;
IconboxRedraw(ib);
}
static void
IconboxEwinClose(EWin * ewin)
{
@ -540,7 +525,6 @@ IconboxEwinInit(EWin * ewin, void *ptr)
ewin->data = (Iconbox *) ptr;
ewin->MoveResize = IconboxEwinMoveResize;
ewin->Refresh = IconboxEwinRefresh;
ewin->Close = IconboxEwinClose;
ewin->skiptask = 1;

View File

@ -190,12 +190,6 @@ MenuEwinMoveResize(EWin * ewin, int resize __UNUSED__)
MenuRedraw(m);
}
static void
MenuEwinRefresh(EWin * ewin)
{
MenuEwinMoveResize(ewin, 0);
}
static void
MenuEwinClose(EWin * ewin)
{
@ -217,7 +211,6 @@ MenuEwinInit(EWin * ewin, void *ptr)
ewin->data = ptr;
ewin->MoveResize = MenuEwinMoveResize;
ewin->Refresh = MenuEwinRefresh;
ewin->Close = MenuEwinClose;
ewin->skiptask = 1;

View File

@ -572,11 +572,6 @@ PagerEwinMoveResize(EWin * ewin, int resize __UNUSED__)
PagerEwinUpdateMini(p, lst[i]);
}
static void
PagerEwinRefresh(EWin * ewin __UNUSED__)
{
}
static void
PagerEwinClose(EWin * ewin)
{
@ -590,7 +585,6 @@ PagerEwinInit(EWin * ewin, void *ptr)
ewin->data = ptr;
ewin->MoveResize = PagerEwinMoveResize;
ewin->Refresh = PagerEwinRefresh;
ewin->Close = PagerEwinClose;
ewin->skiptask = 1;

11
src/x.c
View File

@ -1230,17 +1230,6 @@ GetWinDepth(Window win)
return d;
}
int
WinExists(Window win)
{
Window w1;
int x, y, w, h, b, d;
if (EGetGeometry(win, &w1, &x, &y, &w, &h, &b, &d))
return 1;
return 0;
}
Window
WinGetParent(Window win)
{