Trivial cleanups.

SVN revision: 49486
This commit is contained in:
Kim Woelders 2010-06-06 10:05:53 +00:00
parent 708e19593e
commit 48f6bbe94c
24 changed files with 44 additions and 60 deletions

View File

@ -370,7 +370,6 @@ typedef struct {
struct {
char check; /* Avoid losing windows offscreen */
char swap;
int swapcoord_x, swapcoord_y;
} move;
struct {
signed char enable_features;

View File

@ -110,6 +110,7 @@ GetLine(char *s, int size, FILE * f)
case ';': /* Line separator */
if (escape || quote)
goto case_char;
/* FALLTHROUGH */
case '\n':
if (so == s) /* Skip empty lines */
break;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2007 Kim Woelders
* Copyright (C) 2007-2010 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -298,16 +298,6 @@ EGlGetDepth(void)
return (egl.vi) ? egl.vi->depth : 0;
}
#if 0
Win
EGlWindowCreate(Win parent, int x, int y, unsigned int width,
unsigned int height)
{
return ECreateWindowVD(parent, x, y, width, height, egl.vi->visual,
egl.vi->depth);
}
#endif
void
EGlWindowConnect(Window xwin)
{
@ -502,28 +492,27 @@ EobjGetTexture(EObj * eo)
{
if (eo->glhook)
{
if (eo->glhook->glxpmap)
return eo->glhook;
_EGlTextureFromDrawable(eo->glhook, EobjGetPixmap(eo), 0);
return eo->glhook;
if (eo->glhook->glxpmap == None)
_EGlTextureFromDrawable(eo->glhook, EobjGetPixmap(eo), 0);
}
else
{
EobjTextureCreate(eo);
}
return EobjTextureCreate(eo);
return eo->glhook;
}
ETexture *
void
EobjTextureCreate(EObj * eo)
{
Pixmap pmap;
pmap = EobjGetPixmap(eo);
if (pmap == None)
return NULL;
return;
eo->glhook = EGlTextureFromDrawable(pmap, 0);
return eo->glhook;
}
void

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2007 Kim Woelders
* Copyright (C) 2007-2010 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -26,11 +26,9 @@
#include "eimage.h"
#include "xwin.h"
#define _glhook _etexture
typedef struct _glhook ETexture;
typedef struct _etexture ETexture;
struct _etexture {
struct _glhook {
unsigned int texture;
unsigned short target;
unsigned char type;
@ -43,9 +41,6 @@ void EGlExit(void);
Visual *EGlGetVisual(void);
unsigned int EGlGetDepth(void);
Win EGlWindowCreate(Win parent, int x, int y,
unsigned int width, unsigned int height);
void EGlWindowConnect(Window xwin);
void EGlWindowDisconnect(void);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2003-2009 Kim Woelders
* Copyright (C) 2003-2010 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -60,7 +60,7 @@ typedef enum {
ESIGNAL_EWIN_CHANGE,
ESIGNAL_EWIN_DAMAGE,
ESIGNAL_THEME_TRANS_CHANGE,
} e_signal_t;
} esignal_e;
#if 0 /* Maybe later */
void EModuleRegister(EModule * em);

View File

@ -168,10 +168,10 @@ void EobjsRepaint(void);
Pixmap EobjGetPixmap(const EObj * eo);
#if USE_GLX
struct _etexture *EobjGetTexture(EObj * eo);
struct _etexture *EobjTextureCreate(EObj * eo);
void EobjTextureCreate(EObj * eo);
void EobjTextureDestroy(EObj * eo);
void EobjTextureInvalidate(EObj * eo);
struct _glhook *EobjGetTexture(EObj * eo);
#endif
void EobjChangeOpacity(EObj * eo, unsigned int opacity);
void EobjChangeShadow(EObj * eo, int shadow);

View File

@ -302,7 +302,9 @@ ExtQuery(const EServerExt * ext)
*/
struct _EventFdDesc {
#if 0 /* Unused */
const char *name;
#endif
int fd;
void (*handler) (void);
};
@ -432,6 +434,7 @@ HandleEvent(XEvent * ev)
case KeyPress:
Mode.events.last_keycode = ev->xkey.keycode;
Mode.events.last_keystate = ev->xkey.state;
/* FALLTHROUGH */
case KeyRelease:
Mode.events.time = ev->xkey.time;
ModeGetXY(ev->xkey.x_root, ev->xkey.y_root);

View File

@ -850,7 +850,7 @@ typedef struct {
int k, dk;
_xywh start;
_xywh final;
int a, b, c, d;
int a, b, c;
} _ewin_shade_data;
static void

View File

@ -442,7 +442,6 @@ void EwinOpFullscreen(EWin * ewin, int source, int on);
/* finders.c */
EWin *EwinFindByPtr(const EWin * ewin);
EWin *EwinFindByClient(Window win);
EWin *EwinFindByChildren(Window win);
EWin **EwinsFindByExpr(const char *match, int *pnum, int *pflags);
EWin *EwinFindByExpr(const char *match);

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2008-2009 Kim Woelders
* Copyright (C) 2008-2010 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -59,7 +59,7 @@ EwinFindByClient(Window win)
return NULL;
}
EWin *
static EWin *
EwinFindByChildren(Window win)
{
EWin *const *ewins;

View File

@ -323,6 +323,7 @@ doFocusToEwin(EWin * ewin, int why)
case FOCUS_DESK_LEAVE:
focus_is_set = 0;
/* FALLTHROUGH */
case FOCUS_NONE:
ewin = NULL;
if (ewin == Mode.focuswin)
@ -423,6 +424,7 @@ doFocusToEwin(EWin * ewin, int why)
case FOCUS_DESK_ENTER:
if (Conf.focus.mode == MODE_FOCUS_CLICK)
break;
/* FALLTHROUGH */
default:
case FOCUS_INIT:
EwinListFocusRaise(ewin);

View File

@ -317,8 +317,8 @@ SceneDraw2(double t, EWin ** ewins, int num)
DrawBackground(texture[sel_bg], w, h);
i = sqrt(w * h / (1.0 * num));
nx = (w + i - 1) / i;
i = (int)sqrt(w * h / (1.0 * num));
nx = (int)((w + i - 1) / i);
if (nx <= 0)
nx = 1;
ny = (num + nx - 1) / nx;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2003-2009 Kim Woelders
* Copyright (C) 2003-2010 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -332,12 +332,10 @@ Pixmap
HintsGetRootPixmap(Win win)
{
Ecore_X_Pixmap pm;
int num;
pm = None;
num =
ecore_x_window_prop_xid_get(WinGetXwin(win), E_XROOTPMAP_ID, XA_PIXMAP,
&pm, 1);
ecore_x_window_prop_xid_get(WinGetXwin(win), E_XROOTPMAP_ID, XA_PIXMAP,
&pm, 1);
return pm;
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2008 Kim Woelders
* Copyright (C) 2004-2010 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -24,7 +24,6 @@
#include "E.h"
#include "container.h"
#include "desktops.h"
#include "e16-ecore_hints.h"
#include "emodule.h"
#include "eobj.h"
#include "ewins.h"

View File

@ -53,7 +53,6 @@ typedef struct {
int scale; /* Zoom level */
int sx, sy; /* Scene x,y */
int sw, sh; /* Scene wxh */
char mode;
char bpress;
char filter;
char grabbing;

View File

@ -802,6 +802,7 @@ _MoveResizeHandleKey(unsigned int key)
case XK_Escape:
Mode_mr.cur_x = Mode_mr.start_x;
Mode_mr.cur_y = Mode_mr.start_y;
/* FALLTHROUGH */
case XK_Return:
end = 1;
break;

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2009 Kim Woelders
* Copyright (C) 2004-2010 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -540,6 +540,7 @@ doSMExit(int mode, const char *params)
case EEXIT_THEME:
ss = params;
/* FALLTHROUGH */
case EEXIT_RESTART:
SoundPlay(SOUND_WAIT);
#ifdef USE_EXT_INIT_WIN

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2009 Kim Woelders
* Copyright (C) 2004-2010 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -312,6 +312,7 @@ SlideoutCalcSize(Slideout * s)
case 1:
EMoveWindow(EobjGetWin(s->objs[i]), x, (sh - bh) >> 1);
x += bw;
break;
default:
break;
}

View File

@ -564,7 +564,6 @@ typedef struct {
char snap_location;
char snap_layer;
char snap_sticky;
char snap_icon;
char snap_shaded;
char snap_cmd;
char snap_group;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2009 Kim Woelders
* Copyright (C) 2008-2010 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -87,7 +87,7 @@ typedef enum {
SOUND_WINDOW_STICK,
SOUND_WINDOW_UNSTICK,
SOUND_NOT_USED
} sound_e;
} esound_e;
#if HAVE_SOUND

View File

@ -655,7 +655,9 @@ TsTextDraw(TextState * ts, int x, int y, const char *text, int len)
typedef struct {
const char *type;
const FontOps *ops;
#if USE_MODULES
char checked;
#endif
} FontHandler;
#if USE_MODULES
@ -664,7 +666,7 @@ typedef struct {
#else
#define FONT(type, ops, opsm) { type, ops, 0 }
#define FONT(type, ops, opsm) { type, ops }
#if FONT_TYPE_IFT
extern const FontOps FontOps_ift;
@ -694,7 +696,7 @@ static FontHandler fhs[] = {
#if FONT_TYPE_PANGO_XFT
FONT("pango", &FontOps_pango, NULL), /* Pango-Xft */
#endif
{NULL, NULL, 0},
FONT(NULL, NULL, NULL)
};
static void

View File

@ -58,9 +58,7 @@ struct _tooltip {
int dist;
Win iwin;
EObj *win[5];
char visible;
ImageClass *tooltippic;
unsigned int ref_count;
};
#define TTWIN win[4]

View File

@ -364,7 +364,7 @@ ECreateArgbWindow(Win parent, int x, int y, int w, int h, Win cwin)
}
#if USE_GLX
Win
static Win
ECreateWindowVD(Win parent, int x, int y, int w, int h,
Visual * vis, unsigned int depth)
{

View File

@ -149,8 +149,6 @@ Win ECreateWindow(Win parent, int x, int y, int w, int h,
int saveunder);
Win ECreateArgbWindow(Win parent, int x, int y, int w, int h,
Win cwin);
Win ECreateWindowVD(Win parent, int x, int y, int w, int h,
Visual * vis, unsigned int depth);
Win ECreateClientWindow(Win parent, int x, int y, int w, int h);
#define WIN_TYPE_CLIENT 0