From 307afc96bdfbdd4b688d5d47e6a9beb7e937f81f Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sun, 21 May 2006 18:44:18 +0000 Subject: [PATCH] Trivial cleanups. SVN revision: 22818 --- src/e16-ecore_hints.c | 2 -- src/eimage.c | 3 +++ src/hints.h | 1 - src/icccm.c | 2 +- src/sound.c | 2 +- src/ttfont.c | 1 - src/x.c | 6 +++--- src/xwin.h | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/e16-ecore_hints.c b/src/e16-ecore_hints.c index a430a083..e3474912 100644 --- a/src/e16-ecore_hints.c +++ b/src/e16-ecore_hints.c @@ -75,8 +75,6 @@ ecore_x_icccm_state_set_withdrawn(Ecore_X_Window win) #else /* USE_ECORE_X */ -extern Display *disp; - /* * General stuff */ diff --git a/src/eimage.c b/src/eimage.c index bbf7bc2b..b36d13bc 100644 --- a/src/eimage.c +++ b/src/eimage.c @@ -259,6 +259,9 @@ EImageTile(EImage * im, EImage * tile, int blend, int tw, int th, int x, y, tx, ty, ww, hh; int sw, sh; + if (tw <= 0 || th <= 0) + return; + imlib_context_set_image(tile); sw = imlib_image_get_width(); sh = imlib_image_get_height(); diff --git a/src/hints.h b/src/hints.h index 10e347cc..f5d261a4 100644 --- a/src/hints.h +++ b/src/hints.h @@ -105,7 +105,6 @@ void EHintsSetInfoOnAll(void); void ICCCM_Init(void); void ICCCM_ProcessClientMessage(XClientMessageEvent * event); void ICCCM_GetTitle(EWin * ewin, Atom atom_change); -void ICCCM_GetColormap(EWin * ewin); void ICCCM_Delete(const EWin * ewin); void ICCCM_Save(const EWin * ewin); void ICCCM_Iconify(const EWin * ewin); diff --git a/src/icccm.c b/src/icccm.c index 8eb5cdc0..a37fe16e 100644 --- a/src/icccm.c +++ b/src/icccm.c @@ -92,7 +92,7 @@ ICCCM_GetTitle(EWin * ewin, Atom atom_change) EwinChange(ewin, EWIN_CHANGE_NAME); } -void +static void ICCCM_GetColormap(EWin * ewin) { XWindowAttributes xwa; diff --git a/src/sound.c b/src/sound.c index 29eed384..fa694bd6 100644 --- a/src/sound.c +++ b/src/sound.c @@ -65,7 +65,7 @@ static struct static int sound_fd = -1; -Ecore_List *sound_list = NULL; +static Ecore_List *sound_list = NULL; #ifdef HAVE_LIBESD static Sample * diff --git a/src/ttfont.c b/src/ttfont.c index 1f05e86e..c00c6cb0 100644 --- a/src/ttfont.c +++ b/src/ttfont.c @@ -24,7 +24,6 @@ #include "E.h" #include "eimage.h" #include "tclass.h" -#include "xwin.h" #include struct _efont diff --git a/src/x.c b/src/x.c index 465c1c83..c543c9ae 100644 --- a/src/x.c +++ b/src/x.c @@ -64,7 +64,7 @@ struct _xwin int depth; Colormap cmap; Pixmap bgpmap; - int bgcol; + unsigned int bgcol; }; typedef struct _xwin EXID; /* FIXME - Remove */ @@ -110,7 +110,7 @@ EXidCreate(void) EXID *xid; xid = Ecalloc(1, sizeof(EXID)); - xid->bgcol = -1; + xid->bgcol = 0xffffffff; return xid; } @@ -905,7 +905,7 @@ ESetWindowBackgroundPixmap(Win win, Pixmap pmap) } void -ESetWindowBackground(Win win, int col) +ESetWindowBackground(Win win, unsigned int col) { EXID *xid = win; diff --git a/src/xwin.h b/src/xwin.h index 225b8806..c4726ce6 100644 --- a/src/xwin.h +++ b/src/xwin.h @@ -87,7 +87,7 @@ void EGetWindowAttributes(Win win, XWindowAttributes * pxwa); void EConfigureWindow(Win win, unsigned int mask, XWindowChanges * wc); void ESetWindowBackgroundPixmap(Win win, Pixmap pmap); -void ESetWindowBackground(Win win, int col); +void ESetWindowBackground(Win win, unsigned int col); int ETranslateCoordinates(Win src_w, Win dst_w, int src_x, int src_y, int *dest_x_return,