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 { struct {
char check; /* Avoid losing windows offscreen */ char check; /* Avoid losing windows offscreen */
char swap; char swap;
int swapcoord_x, swapcoord_y;
} move; } move;
struct { struct {
signed char enable_features; signed char enable_features;

View File

@ -110,6 +110,7 @@ GetLine(char *s, int size, FILE * f)
case ';': /* Line separator */ case ';': /* Line separator */
if (escape || quote) if (escape || quote)
goto case_char; goto case_char;
/* FALLTHROUGH */
case '\n': case '\n':
if (so == s) /* Skip empty lines */ if (so == s) /* Skip empty lines */
break; 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 * 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
@ -298,16 +298,6 @@ EGlGetDepth(void)
return (egl.vi) ? egl.vi->depth : 0; 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 void
EGlWindowConnect(Window xwin) EGlWindowConnect(Window xwin)
{ {
@ -502,28 +492,27 @@ EobjGetTexture(EObj * eo)
{ {
if (eo->glhook) if (eo->glhook)
{ {
if (eo->glhook->glxpmap) if (eo->glhook->glxpmap == None)
return eo->glhook; _EGlTextureFromDrawable(eo->glhook, EobjGetPixmap(eo), 0);
}
_EGlTextureFromDrawable(eo->glhook, EobjGetPixmap(eo), 0); else
return eo->glhook; {
EobjTextureCreate(eo);
} }
return EobjTextureCreate(eo); return eo->glhook;
} }
ETexture * void
EobjTextureCreate(EObj * eo) EobjTextureCreate(EObj * eo)
{ {
Pixmap pmap; Pixmap pmap;
pmap = EobjGetPixmap(eo); pmap = EobjGetPixmap(eo);
if (pmap == None) if (pmap == None)
return NULL; return;
eo->glhook = EGlTextureFromDrawable(pmap, 0); eo->glhook = EGlTextureFromDrawable(pmap, 0);
return eo->glhook;
} }
void 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 * 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
@ -26,11 +26,9 @@
#include "eimage.h" #include "eimage.h"
#include "xwin.h" #include "xwin.h"
#define _glhook _etexture typedef struct _glhook ETexture;
typedef struct _etexture ETexture; struct _glhook {
struct _etexture {
unsigned int texture; unsigned int texture;
unsigned short target; unsigned short target;
unsigned char type; unsigned char type;
@ -43,9 +41,6 @@ void EGlExit(void);
Visual *EGlGetVisual(void); Visual *EGlGetVisual(void);
unsigned int EGlGetDepth(void); unsigned int EGlGetDepth(void);
Win EGlWindowCreate(Win parent, int x, int y,
unsigned int width, unsigned int height);
void EGlWindowConnect(Window xwin); void EGlWindowConnect(Window xwin);
void EGlWindowDisconnect(void); 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 * 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
@ -60,7 +60,7 @@ typedef enum {
ESIGNAL_EWIN_CHANGE, ESIGNAL_EWIN_CHANGE,
ESIGNAL_EWIN_DAMAGE, ESIGNAL_EWIN_DAMAGE,
ESIGNAL_THEME_TRANS_CHANGE, ESIGNAL_THEME_TRANS_CHANGE,
} e_signal_t; } esignal_e;
#if 0 /* Maybe later */ #if 0 /* Maybe later */
void EModuleRegister(EModule * em); void EModuleRegister(EModule * em);

View File

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

View File

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

View File

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

View File

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

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) 2008-2009 Kim Woelders * Copyright (C) 2008-2010 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
@ -59,7 +59,7 @@ EwinFindByClient(Window win)
return NULL; return NULL;
} }
EWin * static EWin *
EwinFindByChildren(Window win) EwinFindByChildren(Window win)
{ {
EWin *const *ewins; EWin *const *ewins;

View File

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

View File

@ -317,8 +317,8 @@ SceneDraw2(double t, EWin ** ewins, int num)
DrawBackground(texture[sel_bg], w, h); DrawBackground(texture[sel_bg], w, h);
i = sqrt(w * h / (1.0 * num)); i = (int)sqrt(w * h / (1.0 * num));
nx = (w + i - 1) / i; nx = (int)((w + i - 1) / i);
if (nx <= 0) if (nx <= 0)
nx = 1; nx = 1;
ny = (num + nx - 1) / nx; 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 * 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
@ -332,12 +332,10 @@ Pixmap
HintsGetRootPixmap(Win win) HintsGetRootPixmap(Win win)
{ {
Ecore_X_Pixmap pm; Ecore_X_Pixmap pm;
int num;
pm = None; pm = None;
num = ecore_x_window_prop_xid_get(WinGetXwin(win), E_XROOTPMAP_ID, XA_PIXMAP,
ecore_x_window_prop_xid_get(WinGetXwin(win), E_XROOTPMAP_ID, XA_PIXMAP, &pm, 1);
&pm, 1);
return pm; return pm;
} }

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-2008 Kim Woelders * Copyright (C) 2004-2010 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
@ -24,7 +24,6 @@
#include "E.h" #include "E.h"
#include "container.h" #include "container.h"
#include "desktops.h" #include "desktops.h"
#include "e16-ecore_hints.h"
#include "emodule.h" #include "emodule.h"
#include "eobj.h" #include "eobj.h"
#include "ewins.h" #include "ewins.h"

View File

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

View File

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

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-2010 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
@ -540,6 +540,7 @@ doSMExit(int mode, const char *params)
case EEXIT_THEME: case EEXIT_THEME:
ss = params; ss = params;
/* FALLTHROUGH */
case EEXIT_RESTART: case EEXIT_RESTART:
SoundPlay(SOUND_WAIT); SoundPlay(SOUND_WAIT);
#ifdef USE_EXT_INIT_WIN #ifdef USE_EXT_INIT_WIN

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-2010 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
@ -312,6 +312,7 @@ SlideoutCalcSize(Slideout * s)
case 1: case 1:
EMoveWindow(EobjGetWin(s->objs[i]), x, (sh - bh) >> 1); EMoveWindow(EobjGetWin(s->objs[i]), x, (sh - bh) >> 1);
x += bw; x += bw;
break;
default: default:
break; break;
} }

View File

@ -564,7 +564,6 @@ typedef struct {
char snap_location; char snap_location;
char snap_layer; char snap_layer;
char snap_sticky; char snap_sticky;
char snap_icon;
char snap_shaded; char snap_shaded;
char snap_cmd; char snap_cmd;
char snap_group; 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 * 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
@ -87,7 +87,7 @@ typedef enum {
SOUND_WINDOW_STICK, SOUND_WINDOW_STICK,
SOUND_WINDOW_UNSTICK, SOUND_WINDOW_UNSTICK,
SOUND_NOT_USED SOUND_NOT_USED
} sound_e; } esound_e;
#if HAVE_SOUND #if HAVE_SOUND

View File

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

View File

@ -58,9 +58,7 @@ struct _tooltip {
int dist; int dist;
Win iwin; Win iwin;
EObj *win[5]; EObj *win[5];
char visible;
ImageClass *tooltippic; ImageClass *tooltippic;
unsigned int ref_count;
}; };
#define TTWIN win[4] #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 #if USE_GLX
Win static Win
ECreateWindowVD(Win parent, int x, int y, int w, int h, ECreateWindowVD(Win parent, int x, int y, int w, int h,
Visual * vis, unsigned int depth) 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); int saveunder);
Win ECreateArgbWindow(Win parent, int x, int y, int w, int h, Win ECreateArgbWindow(Win parent, int x, int y, int w, int h,
Win cwin); 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); Win ECreateClientWindow(Win parent, int x, int y, int w, int h);
#define WIN_TYPE_CLIENT 0 #define WIN_TYPE_CLIENT 0