forked from e16/e16
1
0
Fork 0

More warning fixes for gcc-4.6.

SVN revision: 56965
This commit is contained in:
Kim Woelders 2011-02-12 16:43:52 +00:00
parent bc582d5de5
commit 86da917809
4 changed files with 47 additions and 32 deletions

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2009 Kim Woelders * Copyright (C) 2004-2011 Kim Woelders
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -233,6 +233,7 @@ ClientHandleComms(XClientMessageEvent * ev)
if (!IpcExecReply(s, ClientIpcReply, c)) if (!IpcExecReply(s, ClientIpcReply, c))
{ {
#if ENABLE_DIALOGS
const char *s1, *s2; const char *s1, *s2;
s1 = (c->clientname) ? c->clientname : "UNKNOWN"; s1 = (c->clientname) ? c->clientname : "UNKNOWN";
@ -241,6 +242,7 @@ ClientHandleComms(XClientMessageEvent * ev)
_("Received Unknown Client Message.\n" _("Received Unknown Client Message.\n"
"Client Name: %s\n" "Client Version: %s\n" "Client Name: %s\n" "Client Version: %s\n"
"Message Contents:\n\n" "%s\n"), s1, s2, s); "Message Contents:\n\n" "%s\n"), s1, s2, s);
#endif
SoundPlay(SOUND_ERROR_IPC); SoundPlay(SOUND_ERROR_IPC);
} }

View File

@ -422,23 +422,28 @@ EobjResize(EObj * eo, int w, int h)
EobjMoveResize(eo, EobjGetX(eo), EobjGetY(eo), w, h); EobjMoveResize(eo, EobjGetX(eo), EobjGetY(eo), w, h);
} }
#if USE_COMPOSITE
void void
EobjDamage(EObj * eo) EobjDamage(EObj * eo)
{ {
#if USE_COMPOSITE
if (eo->cmhook) if (eo->cmhook)
ECompMgrWinDamageArea(eo, 0, 0, 0, 0); ECompMgrWinDamageArea(eo, 0, 0, 0, 0);
#else
eo = NULL;
#endif
} }
#else
void
EobjDamage(EObj * eo __UNUSED__)
{
}
#endif
void void
EobjReparent(EObj * eo, EObj * dst, int x, int y) EobjReparent(EObj * eo, EObj * dst, int x, int y)
{ {
#if USE_COMPOSITE
int move; int move;
move = x != EobjGetX(eo) || y != EobjGetY(eo); move = x != EobjGetX(eo) || y != EobjGetY(eo);
#endif
EReparentWindow(EobjGetWin(eo), EobjGetWin(dst), x, y); EReparentWindow(EobjGetWin(eo), EobjGetWin(dst), x, y);
if (dst->type == EOBJ_TYPE_DESK) if (dst->type == EOBJ_TYPE_DESK)
@ -536,32 +541,35 @@ EobjShapeUpdate(EObj * eo, int propagate)
#endif #endif
} }
#if USE_COMPOSITE
Pixmap Pixmap
EobjGetPixmap(const EObj * eo) EobjGetPixmap(const EObj * eo)
{ {
Pixmap pmap = None; return ECompMgrWinGetPixmap(eo);
}
#else
Pixmap
EobjGetPixmap(const EObj * eo __UNUSED__)
{
return None;
}
#endif
#if USE_COMPOSITE #if USE_COMPOSITE
pmap = ECompMgrWinGetPixmap(eo);
#else
eo = NULL;
#endif
return pmap;
}
void void
EobjChangeOpacity(EObj * eo, unsigned int opacity) EobjChangeOpacity(EObj * eo, unsigned int opacity)
{ {
#if USE_COMPOSITE
if (eo->opacity == opacity) if (eo->opacity == opacity)
return; return;
eo->opacity = opacity; eo->opacity = opacity;
ECompMgrWinChangeOpacity(eo, opacity); ECompMgrWinChangeOpacity(eo, opacity);
#else
eo = NULL;
opacity = 0;
#endif
} }
#else
void
EobjChangeOpacity(EObj * eo __UNUSED__, unsigned int opacity __UNUSED__)
{
}
#endif
#if USE_COMPOSITE #if USE_COMPOSITE
void void

View File

@ -458,15 +458,18 @@ SessionGetInfo(EWin * ewin __UNUSED__)
#endif #endif
} }
#if USE_SM
void void
SetSMID(const char *smid) SetSMID(const char *smid)
{ {
#if USE_SM
sm_client_id = Estrdup(smid); sm_client_id = Estrdup(smid);
#else
smid = NULL;
#endif /* USE_SM */
} }
#else
void
SetSMID(const char *smid __UNUSED__)
{
}
#endif /* USE_SM */
static void static void
SessionSave(int shutdown) SessionSave(int shutdown)

22
src/x.c
View File

@ -1,6 +1,6 @@
/* /*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2010 Kim Woelders * Copyright (C) 2004-2011 Kim Woelders
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -379,15 +379,11 @@ ECreateWindowVD(Win parent, int x, int y, int w, int h,
} }
#endif #endif
#endif /* USE_COMPOSITE */
Win Win
ECreateObjectWindow(Win parent, int x, int y, int w, int h, int saveunder, ECreateObjectWindow(Win parent, int x, int y, int w, int h, int saveunder,
int type, Win cwin) int type, Win cwin)
{ {
Win win; Win win;
#if USE_COMPOSITE
int argb = 0; int argb = 0;
switch (type) switch (type)
@ -415,15 +411,21 @@ ECreateObjectWindow(Win parent, int x, int y, int w, int h, int saveunder,
win = ECreateArgbWindow(parent, x, y, w, h, cwin); win = ECreateArgbWindow(parent, x, y, w, h, cwin);
else else
win = ECreateWindow(parent, x, y, w, h, saveunder); win = ECreateWindow(parent, x, y, w, h, saveunder);
#else
win = ECreateWindow(parent, x, y, w, h, saveunder);
type = 0;
cwin = NULL;
#endif
return win; return win;
} }
#else
Win
ECreateObjectWindow(Win parent, int x, int y, int w, int h, int saveunder,
int type __UNUSED__, Win cwin __UNUSED__)
{
return ECreateWindow(parent, x, y, w, h, saveunder);
}
#endif /* USE_COMPOSITE */
Win Win
ECreateClientWindow(Win parent, int x, int y, int w, int h) ECreateClientWindow(Win parent, int x, int y, int w, int h)
{ {