forked from e16/e16
1
0
Fork 0

Fri Mar 24 17:53:46 PST 2000

(Mandrake)

working on xinerama (copying home)


SVN revision: 2321
This commit is contained in:
Mandrake 2000-03-25 01:57:02 +00:00
parent 3ed53b060f
commit 1f71e1e26e
47 changed files with 2089 additions and 2100 deletions

View File

@ -4384,3 +4384,10 @@ Thu Mar 23 22:10:29 PST 2000
minor update to tell you that xinerama is not active on your box if it isn't
turned on but you have xinerama support in your server.
-------------------------------------------------------------------------------
Fri Mar 24 17:53:46 PST 2000
(Mandrake)
working on xinerama (copying home)

View File

@ -1181,11 +1181,11 @@ doMoveEnd(void *params)
if (gwins[i]->floating)
MoveEwinToDesktopAt(gwins[i], d,
gwins[i]->x - (desks.desk[d].x -
desks.
desk[gwins[i]->desktop].x),
desks.desk[gwins[i]->
desktop].x),
gwins[i]->y - (desks.desk[d].y -
desks.
desk[gwins[i]->desktop].y));
desks.desk[gwins[i]->
desktop].y));
else
MoveEwinToDesktopAt(gwins[i], d, gwins[i]->x, gwins[i]->y);
gwins[i]->floating = 0;
@ -3487,8 +3487,7 @@ struct _keyset
int
doInsertKeys(void *params)
{
const struct _keyset ks[] =
{
const struct _keyset ks[] = {
{"a", 0, "a"},
{"b", 0, "b"},
{"c", 0, "c"},

View File

@ -357,13 +357,13 @@ SetCurrentArea(int ax, int ay)
lst[i]->x -
(root.w *
(ax -
desks.desk[desks.
current].current_area_x)),
desks.desk[desks.current].
current_area_x)),
lst[i]->y -
(root.h *
(ay -
desks.desk[desks.
current].current_area_y)));
desks.desk[desks.current].
current_area_y)));
if (setflip)
mode.flipp = 0;
lst[i]->area_x = a1;
@ -394,13 +394,13 @@ SetCurrentArea(int ax, int ay)
x -
(root.w *
(ax -
desks.desk[desks.current].
current_area_x)),
desks.desk[desks.
current].current_area_x)),
y -
(root.h *
(ay -
desks.desk[desks.current].
current_area_y)));
desks.desk[desks.
current].current_area_y)));
}
}
/* if we're not moving it... move it across */
@ -419,13 +419,13 @@ SetCurrentArea(int ax, int ay)
lst[i]->x -
(root.w *
(ax -
desks.desk[desks.
current].current_area_x)),
desks.desk[desks.current].
current_area_x)),
lst[i]->y -
(root.h *
(ay -
desks.desk[desks.
current].current_area_y)));
desks.desk[desks.current].
current_area_y)));
if (setflip)
mode.flipp = 0;
lst[i]->area_x = a1;

View File

@ -476,10 +476,14 @@ AddToFamily(Window win)
}
/* if it hasnt been planed on a desktop - assing it the current desktop */
if (ewin->desktop < 0)
{
ewin->desktop = desks.current;
/* assign it the desktop it asked for (modulo the number of desks) */
}
else
{
/* assign it the desktop it asked for (modulo the number of desks) */
ewin->desktop = DESKTOPS_WRAP_NUM(ewin->desktop);
}
if ((!ewin->client.transient) && (mode.manual_placement) &&
(!ewin->client.already_placed) && (!mode.startup) && (!mode.place))
@ -1063,9 +1067,9 @@ ChangeEwinWinpart(EWin * ewin, int i)
state, ewin->bits[i].expose);
if (ewin->border->part[i].flags == FLAG_TITLE)
TclassApply(ewin->border->part[i].iclass, ewin->bits[i].win,
ewin->bits[i].w, ewin->bits[i].h, ewin->active, ewin->sticky,
state, ewin->bits[i].expose, ewin->border->part[i].tclass,
ewin->client.title);
ewin->bits[i].w, ewin->bits[i].h, ewin->active,
ewin->sticky, state, ewin->bits[i].expose,
ewin->border->part[i].tclass, ewin->client.title);
if (ewin->bits[i].win)
ChangeEwinWinpartContents(ewin, i);
if (!ewin->shapedone)

View File

@ -383,8 +383,7 @@ void
HandleComms(XEvent * ev)
{
Client *c;
char *s, w[FILEPATH_LEN_MAX], w2[FILEPATH_LEN_MAX], *s1,
*s2;
char *s, w[FILEPATH_LEN_MAX], w2[FILEPATH_LEN_MAX], *s1, *s2;
char sunknown[] = "UNKNOWN";
int unknown;
@ -1099,6 +1098,7 @@ HandleComms(XEvent * ev)
char *name = NULL, *bgf = NULL, *topf = NULL;
int updated = 0, tile, keep_aspect, tkeep_aspect;
int xjust, yjust, xperc, yperc, txjust, tyjust, txperc,
typerc;
sscanf(s, "%1000s %1000s", tmp, w);

View File

@ -3703,8 +3703,7 @@ LoadEConfig(char *themelocation)
{
Progressbar *p = NULL;
int i;
char *config_files[] =
{
char *config_files[] = {
"init.cfg",
"control.cfg",
"textclasses.cfg",

View File

@ -1081,8 +1081,8 @@ DialogRealizeItem(Dialog * d, DItem * di)
ImlibImage *im;
im =
ELoadImage(di->item.slider.ic_border->norm.
normal->im_file);
ELoadImage(di->item.slider.ic_border->norm.normal->
im_file);
if (im)
{
di->item.slider.border_orig_w = im->rgb_width;
@ -1237,8 +1237,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
if ((cols > 0) && (rows > 0))
{
int i, *col_size, *row_size = NULL, r = 0,
c =
0, x = 0, y = 0;
c = 0, x = 0, y = 0;
col_size = Emalloc(sizeof(int) * cols);
row_size = Erealloc(row_size, sizeof(int));
@ -1357,25 +1356,23 @@ DialogRealizeItem(Dialog * d, DItem * di)
dii->item.check_button.check_win,
dii->x, dii->y +
((dii->h -
dii->item.
check_button.check_orig_h) /
2),
dii->item.
check_button.check_orig_w,
dii->item.
check_button.check_orig_h);
dii->item.check_button.
check_orig_h) / 2),
dii->item.check_button.
check_orig_w,
dii->item.check_button.
check_orig_h);
if (dii->type == DITEM_RADIOBUTTON)
EMoveResizeWindow(disp,
dii->item.radio_button.radio_win,
dii->x, dii->y +
((dii->h -
dii->item.
radio_button.radio_orig_h) /
2),
dii->item.
radio_button.radio_orig_w,
dii->item.
radio_button.radio_orig_h);
dii->item.radio_button.
radio_orig_h) / 2),
dii->item.radio_button.
radio_orig_w,
dii->item.radio_button.
radio_orig_h);
if (dii->type == DITEM_AREA)
{
dii->item.area.w = dii->w -
@ -1885,8 +1882,7 @@ DialogItemAreaSetSize(DItem * di, int w, int h)
di->item.area.h = h;
}
Window
DialogItemAreaGetWindow(DItem * di)
Window DialogItemAreaGetWindow(DItem * di)
{
return di->item.area.area_win;
}

View File

@ -29,8 +29,7 @@
char throw_move_events_away = 0;
void DeskAccountTimeout(int val, void *data);
HandleStruct HArray[] =
{
HandleStruct HArray[] = {
{DefaultFunc},
{DefaultFunc},
{HKeyPress},
@ -347,8 +346,7 @@ WaitEvent()
/* XEvent ev; */
fd_set fdset;
struct timeval tval;
static struct timeval tval_last =
{0, 0};
static struct timeval tval_last = { 0, 0 };
double time1, time2;
Qentry *qe;
int count, pcount;

View File

@ -494,7 +494,8 @@ HandleMotion(XEvent * ev)
(gwins
[i]->reqx,
gwins[i]->x,
mode.edge_snap_dist)))))))
mode.
edge_snap_dist)))))))
{
jumpx = 1;
ndx = gwins[i]->reqx - gwins[i]->x + dx;
@ -517,7 +518,8 @@ HandleMotion(XEvent * ev)
(gwins
[i]->reqy,
gwins[i]->y,
mode.edge_snap_dist)))))))
mode.
edge_snap_dist)))))))
{
jumpy = 1;
ndy = gwins[i]->reqy - gwins[i]->y + dy;
@ -980,8 +982,8 @@ HandleMotion(XEvent * ev)
{
di->item.slider.wanted_val += dy;
di->item.slider.val = di->item.slider.lower +
((((di->item.
slider.base_h - di->item.slider.knob_h -
((((di->
item.slider.base_h - di->item.slider.knob_h -
di->item.slider.wanted_val) *
(di->item.slider.upper -
di->item.slider.lower)) /
@ -1920,8 +1922,7 @@ HandleMouseDown(XEvent * ev)
if ((ewin) && (!ewin->pager))
{
Window dw;
int wx, wy, ww, wh, ax, ay, cx, cy,
px, py;
int wx, wy, ww, wh, ax, ay, cx, cy, px, py;
PagerHideHi(p);
pwin_px = ewin->x;
@ -2413,8 +2414,7 @@ HandleMouseUp(XEvent * ev)
if ((ewin) && (ewin->pager))
{
Pager *pp;
int w, h, x, y, ax, ay, cx, cy, px,
py;
int w, h, x, y, ax, ay, cx, cy, px, py;
int wx, wy, base_x = 0, base_y = 0;
Window dw;
@ -2509,13 +2509,13 @@ HandleMouseUp(XEvent * ev)
HideEwin(gwins[i]);
MoveEwin(gwins[i], gwin_px[i] +
((desks.desk
[gwins[i]->
desktop].current_area_x) -
[gwins[i]->desktop].
current_area_x) -
p->hi_ewin->area_x) * root.w,
gwin_py[i] +
((desks.desk
[gwins[i]->
desktop].current_area_y) -
((desks.
desk[gwins[i]->desktop].
current_area_y) -
p->hi_ewin->area_y) * root.h);
if (was_shaded != gwins[i]->shaded)
InstantShadeEwin(gwins[i]);

View File

@ -263,8 +263,7 @@ cp(char *s, char *ss)
EDBUG_RETURN_;
}
time_t
moddate(char *s)
time_t moddate(char *s)
{
struct stat st;

View File

@ -56,8 +56,7 @@ void FX_ImageSpinner_Quit(void);
void FX_ImageSpinner_Pause(void);
static int num_fx_handlers = 4;
static FXHandler fx_handlers[] =
{
static FXHandler fx_handlers[] = {
{"ripples",
FX_Ripple_Init, FX_Ripple_Desk, FX_Ripple_Quit, FX_Ripple_Pause,
0, 0},

View File

@ -720,8 +720,7 @@ GNOME_SetWMNameVer(void)
void
GNOME_DelHints(EWin * ewin)
{
static Atom atom_get[7] =
{0, 0, 0, 0, 0, 0, 0};
static Atom atom_get[7] = { 0, 0, 0, 0, 0, 0, 0 };
EDBUG(6, "GNOME_DelHints");
if (!atom_get[0])

View File

@ -54,14 +54,20 @@ ICCCM_GetTitle(EWin * ewin, Atom atom_change)
XFreeStringList(list);
}
else
{
ewin->client.title = duplicate((char *)xtp.value);
}
}
else
{
ewin->client.title = duplicate((char *)xtp.value);
}
XFree(xtp.value);
}
else if (!ewin->internal)
{
ewin->client.title = duplicate("No Title");
}
EDBUG_RETURN_;
}
@ -88,12 +94,18 @@ ICCCM_GetColormap(EWin * ewin)
if (XGetWindowAttributes(disp, ewin->client.win, &xwa))
{
if (xwa.colormap)
{
ewin->client.cmap = xwa.colormap;
else
ewin->client.cmap = 0;
}
else
{
ewin->client.cmap = 0;
}
}
else
{
ewin->client.cmap = 0;
}
EDBUG_RETURN_;
}
@ -161,7 +173,9 @@ ICCCM_Delete(EWin * ewin)
XSendEvent(disp, ewin->client.win, False, 0, (XEvent *) & ev);
}
else
{
XKillClient(disp, (XID) ewin->client.win);
}
EDBUG_RETURN_;
}
@ -375,9 +389,13 @@ ICCCM_Adopt(EWin * ewin, Window win)
if (!a)
a = XInternAtom(disp, "WM_STATE", False);
if (ewin->client.start_iconified)
{
c[0] = IconicState;
}
else
{
c[0] = NormalState;
}
c[1] = 0;
XChangeProperty(disp, win, a, a, 32, PropModeReplace, (unsigned char *)c, 2);
ewin->x = ewin->client.x;
@ -558,9 +576,13 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
if ((hint.flags & USPosition) || ((hint.flags & PPosition)))
{
if (hint.flags & PWinGravity)
{
ewin->client.grav = hint.win_gravity;
}
else
{
ewin->client.grav = NorthWestGravity;
}
ewin->client.x = x;
ewin->client.y = y;
if ((hint.flags & PPosition) && (!ewin->sticky))
@ -573,14 +595,22 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
ewin->client.x -= desks.desk[dsk].x;
ewin->client.y -= desks.desk[dsk].y;
if (ewin->client.x + ewin->client.w >= root.w)
{
ewin->client.x += desks.desk[dsk].x;
}
else if (ewin->client.x < 0)
{
ewin->client.x += desks.desk[dsk].x;
}
if (ewin->client.y + ewin->client.h >= root.h)
{
ewin->client.y += desks.desk[dsk].y;
}
else if (ewin->client.y < 0)
{
ewin->client.y += desks.desk[dsk].y;
}
}
ewin->client.already_placed = 1;
}
}
@ -636,15 +666,19 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
((double)hint.min_aspect.y);
}
else
{
ewin->client.aspect_min = 0.0;
}
if ((hint.max_aspect.y > 0.0) && (hint.max_aspect.x > 0.0))
{
ewin->client.aspect_max = ((double)hint.max_aspect.x) /
((double)hint.max_aspect.y);
}
else
{
ewin->client.aspect_max = 65535.0;
}
}
else
{
ewin->client.aspect_min = 0.0;
@ -773,8 +807,10 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
ewin->client.command = s;
}
else
{
ewin->client.command = NULL;
}
}
else if (XGetCommand(disp, ewin->client.group, &cargv, &cargc))
{
EWin **lst;
@ -813,15 +849,21 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
ewin->client.command = s;
}
else
{
ewin->client.command = NULL;
}
XFreeStringList(cargv);
}
else
{
ewin->client.command = NULL;
}
}
else
{
ewin->client.command = NULL;
}
}
ok = 1;
if (atom_change)
{
@ -849,8 +891,10 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
XFree(xtp.value);
}
else
{
ewin->client.machine = NULL;
}
}
ok = 1;
if (atom_change)
{
@ -868,7 +912,9 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
if (ewin->client.icon_name)
Efree(ewin->client.icon_name);
if (xtp.encoding == XA_STRING)
{
ewin->client.icon_name = duplicate((char *)xtp.value);
}
else
{
char **cl;
@ -891,7 +937,9 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
if (ewin->client.icon_name)
Efree(ewin->client.icon_name);
if (xtp.encoding == XA_STRING)
{
ewin->client.icon_name = duplicate((char *)xtp.value);
}
else
{
char **cl;
@ -910,8 +958,10 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
XFree(xtp.value);
}
else
{
ewin->client.icon_name = NULL;
}
}
ok = 1;
if (atom_change)
{
@ -990,37 +1040,65 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
if (hint->flags & InputHint)
{
if (hint->input)
{
ewin->client.need_input = 1;
else
ewin->client.need_input = 0;
}
else
{
ewin->client.need_input = 0;
}
}
else
{
ewin->client.need_input = 1;
}
if (hint->flags & StateHint)
{
if (hint->initial_state == IconicState)
{
ewin->client.start_iconified = 1;
else
ewin->client.start_iconified = 0;
}
else
{
ewin->client.start_iconified = 0;
}
}
else
{
ewin->client.start_iconified = 0;
}
if (hint->flags & IconPixmapHint)
{
ewin->client.icon_pmap = hint->icon_pixmap;
}
else
{
ewin->client.icon_pmap = 0;
}
if (hint->flags & IconMaskHint)
{
ewin->client.icon_mask = hint->icon_mask;
}
else
{
ewin->client.icon_mask = 0;
}
if (hint->flags & IconWindowHint)
{
ewin->client.icon_win = hint->icon_window;
}
else
{
ewin->client.icon_win = 0;
}
if (hint->flags & WindowGroupHint)
{
ewin->client.group = hint->window_group;
}
else
{
ewin->client.group = 0;
}
XFree(hint);
}
ok = 1;
@ -1058,11 +1136,17 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
ewin->client.transient_for = w;
}
else
{
ewin->client.transient = 0;
}
if (ewin->client.group == ewin->client.win)
{
ewin->client.is_group_leader = 1;
}
else
{
ewin->client.is_group_leader = 0;
}
ok = 1;
if (atom_change)
{

172
src/ipc.c
View File

@ -117,40 +117,34 @@ void IPC_Group(char *params, Client * c);
* --Mandrake
*/
IPCStruct IPCArray[] =
{
IPCStruct IPCArray[] = {
{
IPC_Help,
"help",
"gives you this help screen",
"Additional parameters will retrieve help on many topics - "
"\"help <command>\".\nuse \"help all\" for a list of commands."
},
"\"help <command>\".\nuse \"help all\" for a list of commands."},
{
IPC_Version,
"version",
"displays the current version of Enlightenment running",
NULL
},
NULL},
{
IPC_Nop,
"nop",
"IPC No-operation - returns nop",
NULL
},
NULL},
{
IPC_Copyright,
"copyright",
"displays copyright information for Enlightenment",
NULL
},
NULL},
{
IPC_AutoSave,
"autosave",
"toggle the Automatic Saving Feature",
"Use \"autosave ?\" to list the current status\n"
"use \"autosave on\" or \"autosave off\" to toggle the status"
},
"use \"autosave on\" or \"autosave off\" to toggle the status"},
{
IPC_DefaultTheme,
"default_theme",
@ -158,40 +152,34 @@ IPCStruct IPCArray[] =
"Use \"default_theme ?\" to get the current default theme\n"
"use \"default_theme /path/to/theme\"\n"
"you can retrieve a list of available themes from the "
"\"list_themes\" command"
},
"\"list_themes\" command"},
{
IPC_Restart,
"restart",
"Restart Enlightenment",
NULL
},
NULL},
{
IPC_RestartWM,
"restart_wm",
"Restart another window manager",
"Use \"restart_wm <wmname>\" to start another window manager.\n"
"Example: \"restart_wm fvwm\""
},
"Example: \"restart_wm fvwm\""},
{
IPC_RestartTheme,
"restart_theme",
"Restart with another theme",
"Use \"restart_theme <themename>\" to restart enlightenment "
"with another theme\nExample: \"restart_theme icE\""
},
"with another theme\nExample: \"restart_theme icE\""},
{
IPC_Exit,
"exit",
"Exit Enlightenment",
NULL
},
NULL},
{
IPC_ForceSave,
"save_config",
"Force Enlightenment to save settings now",
NULL
},
NULL},
{
IPC_SMFile,
"sm_file",
@ -199,14 +187,12 @@ IPCStruct IPCArray[] =
"Average users are encouraged not to touch this setting.\n"
"Use \"sm_file ?\" to retrieve the current session management "
"file prefix\nUse \"sm_file /path/to/prefix/filenameprefix\" "
"to change."
},
"to change."},
{
IPC_ListThemes,
"list_themes",
"List currently available themes",
NULL
},
NULL},
{
IPC_GotoDesktop,
"goto_desktop",
@ -214,9 +200,7 @@ IPCStruct IPCArray[] =
"Use \"goto_desktop num\" to go to a specific desktop.\n"
"Use \"goto_desktop next\" and \"goto_desktop prev\" to go to "
"the next and\n previous desktop\n"
"Use \"goto_desktop ?\" to find out what desktop you are "
"currently on"
},
"Use \"goto_desktop ?\" to find out what desktop you are " "currently on"},
{
IPC_GotoArea,
"goto_area",
@ -225,15 +209,13 @@ IPCStruct IPCArray[] =
"Use \"goto_desktop next <vert/horiz>\" and \"goto_desktop "
"prev <vert/horiz>\" to go to the next and\n "
"previous areas\nUse \"goto_area ?\" to find out what area "
"you are currently on"
},
"you are currently on"},
{
IPC_ShowIcons,
"show_icons",
"Toggle the display of icons on the desktop",
"Use \"show_icons on\" and \"show_icons off\" to change this setting\n"
"Use \"show_icons ?\" to retrieve the current setting"
},
"Use \"show_icons ?\" to retrieve the current setting"},
{
IPC_FocusMode,
"focus_mode",
@ -248,8 +230,7 @@ IPCStruct IPCArray[] =
"pointer: The focus will follow the mouse pointer\n"
"sloppy: in sloppy-focus, the focus follows the mouse, "
"but when over\n "
"the desktop background the last window does not lose the focus"
},
"the desktop background the last window does not lose the focus"},
{
IPC_AdvancedFocus,
"advanced_focus",
@ -274,24 +255,20 @@ IPCStruct IPCArray[] =
" window that created them.\n"
"switch_to_popup_location: switch to where a popup window appears\n"
"focus_list: display and use focus list (requires XKB)\n"
"manual_placement: place all new windows by hand"
},
"manual_placement: place all new windows by hand"},
{
IPC_NumDesks,
"num_desks",
"Change the number of available desktops",
"Use \"num_desks <num>\" to change the available number of desktops.\n"
"Use \"num_desks ?\" to retrieve the current setting"
},
"Use \"num_desks ?\" to retrieve the current setting"},
{
IPC_NumAreas,
"num_areas",
"Change the size of the virtual desktop",
"Use \"num_areas <width> <height>\" to change the size of the "
"virtual desktop.\nExample: \"num_areas 2 2\" makes 2x2 "
"virtual destkops\nUse \"num_areas ?\" to retrieve the "
"current setting"
},
"virtual destkops\nUse \"num_areas ?\" to retrieve the " "current setting"},
{
IPC_WinOps,
"win_op",
@ -317,8 +294,7 @@ IPCStruct IPCArray[] =
"win_op <windowid> lower\n "
"win_op <windowid> layer <0-100,4=normal>\n "
"<windowid> may be substituted with \"current\" to use the "
"current window"
},
"current window"},
{
IPC_WinList,
"window_list",
@ -327,8 +303,7 @@ IPCStruct IPCArray[] =
"format - \"window_id : title\"\n"
"you can get an extended list using \"window_list extended\"\n"
"returns the following format:\n\"window_id : title :: "
"desktop : area_x area_y : x_coordinate y_coordinate\""
},
"desktop : area_x area_y : x_coordinate y_coordinate\""},
{
IPC_ButtonShow,
"button_show",
@ -337,15 +312,13 @@ IPCStruct IPCArray[] =
"<BUTTON_STRING>\"\nexamples: \"button_show buttons all\" "
"(removes all buttons and the dragbar)\n\"button_show\" "
"(removes all buttons)\n \"button_show buttons CONFIG*\" "
"(removes all buttons with CONFIG in the start)"
},
"(removes all buttons with CONFIG in the start)"},
{
IPC_ActiveNetwork,
"active_network",
"Enable or disable networking",
"use \"active_network <on/off>\" to toggle\n"
"use \"active_network ?\" to test status"
},
"use \"active_network ?\" to test status"},
{
IPC_FX,
"fx",
@ -374,8 +347,7 @@ IPCStruct IPCArray[] =
"a window will\n resist moving against another window\n"
"audio <on/off> (changes state of audio)\n"
"- seconds for tooltips and autoraise can have less than one second\n"
" (i.e. 0.5) or greater (1.3, 3.5, etc)"
},
" (i.e. 0.5) or greater (1.3, 3.5, etc)"},
{
IPC_DockPosition,
"dock",
@ -383,22 +355,19 @@ IPCStruct IPCArray[] =
"use \"dock direction <up/down/left/right/?>\" to set or "
"test direction\n"
"use \"dock start_pos ?\" to test the starting x y coords\n"
"use \"dock start_pos x y\" to set the starting x y coords"
},
"use \"dock start_pos x y\" to set the starting x y coords"},
{
IPC_MoveMode,
"move_mode",
"Toggle the Window move mode",
"use \"move_mode <opaque/lined/box/shaded/semi-solid/translucent>\" "
"to set\nuse \"move_mode ?\" to get the current mode"
},
"to set\nuse \"move_mode ?\" to get the current mode"},
{
IPC_ResizeMode,
"resize_mode",
"Toggle the Window resize mode",
"use \"resize_mode <opaque/lined/box/shaded/semi-solid>\" "
"to set\nuse \"resize_mode ?\" to get the current mode"
},
"to set\nuse \"resize_mode ?\" to get the current mode"},
{
IPC_Pager,
"pager",
@ -410,9 +379,7 @@ IPCStruct IPCArray[] =
"use \"pager snap <on/off>\" to toggle snapshotting in the pager\n"
"use \"pager zoom <on/off>\" to toggle zooming in the pager\n"
"use \"pager title <on/off>\" to toggle title display in the pager\n"
"use \"pager scanrate <#>\" to toggle number of line update "
"per second"
},
"use \"pager scanrate <#>\" to toggle number of line update " "per second"},
{
IPC_InternalList,
"internal_list",
@ -420,21 +387,18 @@ IPCStruct IPCArray[] =
"use \"internal_list <pagers/menus/dialogs/internal_ewin>\"\n"
"to retrieve a list of various internal window types.\n"
"(note that listing internal_ewin doesn't retrieve "
"dialogs currently)\n"
},
"dialogs currently)\n"},
{
IPC_SetFocus,
"set_focus",
"Set/Retrieve focused window",
"use \"set_focus <win_id>\" to focus a new window\n"
"use \"set_focus ?\" to retrieve the currently focused window"
},
"use \"set_focus ?\" to retrieve the currently focused window"},
{
IPC_DialogOK,
"dialog_ok",
"Pop up a dialog box with an OK button",
"use \"dialog_ok <message>\" to pop up a dialog box."
},
"use \"dialog_ok <message>\" to pop up a dialog box."},
{
IPC_ListClassMembers,
"list_class",
@ -443,46 +407,39 @@ IPCStruct IPCArray[] =
"available classes are:\n"
"sounds\n"
"actions\n"
"backgrounds\n" "borders\n" "text\n" "images\n" "cursors\n" "buttons"
},
"backgrounds\n" "borders\n" "text\n" "images\n" "cursors\n" "buttons"},
{
IPC_PlaySoundClass,
"play_sound",
"Plays a soundclass via E",
"use \"play_sound <soundclass>\" to play a sound.\n"
"use \"list_class sounds\" to get a list of available sounds"
},
"use \"list_class sounds\" to get a list of available sounds"},
{
IPC_SoundClass,
"soundclass",
"Create/Delete soundclasses",
"use \"soundclass create <classname> <filename>\" to create\n"
"use \"soundclass delete <classname>\" to delete"
},
"use \"soundclass delete <classname>\" to delete"},
{
IPC_ImageClass,
"imageclass",
"Create/delete/modify/apply an ImageClass",
"This doesn't do anything yet."
},
"This doesn't do anything yet."},
{
IPC_ActionClass,
"actionclass",
"Create/Delete/Modify an ActionClass",
"This doesn't do anything yet."
},
"This doesn't do anything yet."},
{
IPC_ColorModifierClass,
"colormod",
"Create/Delete/Modify a ColorModifierClass",
"This doesn't do anything yet."
},
"This doesn't do anything yet."},
{
IPC_TextClass,
"textclass",
"Create/Delete/Modify/apply a TextClass",
"This doesn't do anything yet."
},
"This doesn't do anything yet."},
{
IPC_Background,
"background",
@ -491,51 +448,43 @@ IPCStruct IPCArray[] =
"use \"background <name>\" to delete a background.\n"
"use \"background <name> ?\" to show current values.\n"
"use \"background <name> <type> <value> to create / modify.\n"
"(get available types from \"background <name> ?\"."
},
"(get available types from \"background <name> ?\"."},
{
IPC_Border,
"border",
"Create/Delete/Modify a Border",
"This doesn't do anything yet."
},
"This doesn't do anything yet."},
{
IPC_Cursor,
"cursor",
"Create/Delete/Modify a Cursor",
"This doesn't do anything yet."
},
"This doesn't do anything yet."},
{
IPC_Button,
"button",
"Create/Delete/Modify a Button",
"This doesn't do anything yet."
},
"This doesn't do anything yet."},
{
IPC_GeneralInfo,
"general_info",
"Retrieve some general information",
"use \"general_info <info>\" to retrieve information\n"
"available info is: screen_size"
},
"available info is: screen_size"},
{
IPC_Modules,
"module",
"Load/Unload/List Modules",
NULL
},
NULL},
{
IPC_ReloadMenus,
"reload_menus",
"Reload menus.cfg without restarting (Asmodean_)",
NULL
},
NULL},
{
IPC_GroupInfo,
"group_info",
"Retrieve some info on groups",
"use \"group_info [group_index]\""
},
"use \"group_info [group_index]\""},
{
IPC_GroupOps,
"group_op",
@ -547,8 +496,7 @@ IPCStruct IPCArray[] =
" group_op <windowid> add [<group_index>]\n"
" group_op <windowid> remove [<group_index>]\n"
" group_op <windowid> break [<group_index>]\n"
" group_op <windowid> showhide\n"
},
" group_op <windowid> showhide\n"},
{
IPC_Group,
"group",
@ -563,14 +511,12 @@ IPCStruct IPCArray[] =
" group <groupid> set_border <on/off/?>\n"
" group <groupid> stick <on/off/?>\n"
" group <groupid> shade <on/off/?>\n"
" group <groupid> mirror <on/off/?>\n"
},
" group <groupid> mirror <on/off/?>\n"},
{
IPC_KDE,
"kde",
"Turns on and off KDE support",
"use \"kde on\" and \"kde off\" to enable/disable support"
},
"use \"kde on\" and \"kde off\" to enable/disable support"},
{
IPC_MemDebug,
"dump_mem_debug",
@ -582,8 +528,7 @@ IPCStruct IPCArray[] =
"memory-related problems\n"
"very easily with all pointers allocated stamped with a time, call\n"
"tree that led to that allocation, file and line, "
"and the chunk size.\n"
},
"and the chunk size.\n"},
{
IPC_Remember,
"remember",
@ -592,20 +537,17 @@ IPCStruct IPCArray[] =
" remember <windowid> <parameter>...\n"
" where parameter is one of: all, none, border, desktop, size,\n"
" location, layer, sticky, icon, shade, group, dialog, command\n"
" Multiple parameters may be given."
},
" Multiple parameters may be given."},
{
IPC_CurrentTheme,
"current_theme",
"Returns the name of the currently used theme",
NULL
},
NULL},
{
IPC_Xinerama,
"xinerama",
"return xinerama information about your current system",
NULL
}
NULL}
};
/* the functions */
@ -1802,8 +1744,8 @@ IPC_ImageClass(char *params, Client * c)
if (iclass->norm.normal->real_file)
im =
Imlib_load_image(id,
iclass->norm.
normal->real_file);
iclass->norm.normal->
real_file);
if (im)
{
Esnprintf(buf, sizeof(buf),

View File

@ -1101,8 +1101,7 @@ CreateMenuFromDirectory(char *name, MenuStyle * ms, char *dir)
char tile = 1, keep_asp = 0;
int width, height, scalex =
0, scaley = 0;
int scr_asp, im_asp, w2,
h2;
int scr_asp, im_asp, w2, h2;
int maxw = 48, maxh = 48;
int justx = 512, justy = 512;
@ -1716,7 +1715,8 @@ CreateMenuFromGnome(char *name, MenuStyle * ms, char *dir)
else if (name_buf[0] &&
!strncmp(s, name_buf, strlen(name_buf)))
iname = duplicate(&(s[strlen(name_buf)]));
else if (!strncmp(s, "TryExec=", strlen("TryExec=")))
else
if (!strncmp(s, "TryExec=", strlen("TryExec=")))
texec = duplicate(&(s[strlen("TryExec=")]));
else if (!strncmp(s, "Exec=", strlen("Exec=")))
exec = duplicate(&(s[strlen("Exec=")]));

View File

@ -46,8 +46,7 @@ BlumFlimFrub(void)
#endif
char *docs[4] =
{ "E-docs/MAIN", "E-docs/Edoc_bg.png", "E-docs/E_logo.png" };
char *thms[1] =
{"themes/DEFAULT/epplets/epplets.cfg"};
char *thms[1] = { "themes/DEFAULT/epplets/epplets.cfg" };
for (i = 0; i < 3; i++)
{

View File

@ -126,8 +126,7 @@ GetNetText(char *URL)
}
time_t
GetNetFileDate(char *URL)
time_t GetNetFileDate(char *URL)
{
#ifdef AUTOUPGRADE

View File

@ -450,8 +450,7 @@ PagerUpdateTimeout(int val, void *data)
double cur_time, in;
static int calls = 0;
int y, y2, phase, ax, ay, cx, cy, ww, hh, xx, yy;
static int offsets[8] =
{0, 4, 2, 6, 1, 5, 3, 7};
static int offsets[8] = { 0, 4, 2, 6, 1, 5, 3, 7 };
p = (Pager *) data;
Esnprintf(s, sizeof(s), "__.%x", p->win);

View File

@ -37,8 +37,7 @@ static Window sc_window = 0;
static Atom sc_atom = 0;
static ImlibData *imd = NULL;
Window
SC_GetDestWin(void)
Window SC_GetDestWin(void)
{
return 0;
}

View File

@ -147,8 +147,7 @@ typedef struct _match
char *role;
char *command;
char used;
int x, y, w, h, desktop, iconified, shaded, sticky,
layer;
int x, y, w, h, desktop, iconified, shaded, sticky, layer;
}
Match;
@ -693,18 +692,14 @@ set_save_props(SmcConn smc_conn, int master_flag)
char priority = 10;
char style;
int n = 0;
SmPropValue programVal =
{0, NULL};
SmPropValue userIDVal =
{0, NULL};
SmPropValue discardVal[] =
{
SmPropValue programVal = { 0, NULL };
SmPropValue userIDVal = { 0, NULL };
SmPropValue discardVal[] = {
{0, NULL},
{0, NULL},
{0, NULL}
};
SmPropValue restartVal[] =
{
SmPropValue restartVal[] = {
{0, NULL},
{0, NULL},
{0, NULL},
@ -716,10 +711,8 @@ set_save_props(SmcConn smc_conn, int master_flag)
{0, NULL},
{0, NULL}
};
SmPropValue styleVal =
{0, NULL};
SmPropValue priorityVal =
{0, NULL};
SmPropValue styleVal = { 0, NULL };
SmPropValue priorityVal = { 0, NULL };
SmProp programProp;
SmProp userIDProp;
SmProp discardProp;

View File

@ -433,8 +433,7 @@ SetupX()
XModifierKeymap *mod;
KeyCode nl, sl;
int i;
int masks[8] =
{
int masks[8] = {
ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask,
Mod4Mask, Mod5Mask
};
@ -751,8 +750,7 @@ SetupEnv()
return;
}
Window
MakeExtInitWin(void)
Window MakeExtInitWin(void)
{
Display *d2;
Window win;

View File

@ -89,7 +89,6 @@ Esnprintf(char *str, size_t count, const char *fmt,...)
int
Esnprintf(va_alist)
va_dcl
#endif
{
#ifndef HAVE_STDARGS

View File

@ -31,8 +31,7 @@ AddEToFile(char *file)
char *s1, *s2;
char hase = 0;
char foundwm = 0;
char *wms[] =
{
char *wms[] = {
"wmaker", "afterstep", "fvwm", "fvwm2", "twm", "mwm", "vtwm", "ctwm",
"gwm",
"mlvwm", "kwm", "olwm", "wm2", "wmx", "olvwm", "9wm", "blackbox", "awm",
@ -236,8 +235,7 @@ CreateStartupDisplay(char start)
}
else
{
int k, spd, x, y, xOffset, yOffset, ty, fy, min,
speed;
int k, spd, x, y, xOffset, yOffset, ty, fy, min, speed;
/* we have this many so that we save on lines o code - eAndroid */
struct timeval timev1, timev2;

View File

@ -140,8 +140,7 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
char pq;
int *heights = NULL;
ImageClass *ic = NULL;
int cols[10] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int cols[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
EDBUG(5, "ShowToolTip");
if (!tt)
@ -680,8 +679,8 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
ic->norm.normal->im->rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->norm.
normal->im),
ic->norm.normal->
im),
Imlib_copy_mask(id,
ic->norm.normal->im),
x, y);
@ -703,12 +702,11 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
ic->norm.normal->im->rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->norm.
normal->im),
ic->norm.normal->
im),
Imlib_copy_mask(id,
ic->norm.
normal->im), x,
y);
ic->norm.normal->
im), x, y);
x += ic->norm.normal->im->rgb_width;
}
break;
@ -724,12 +722,11 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
ic->norm.normal->im->rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->norm.
normal->im),
ic->norm.normal->
im),
Imlib_copy_mask(id,
ic->norm.
normal->im), x,
y);
ic->norm.normal->
im), x, y);
x += ic->norm.normal->im->rgb_width;
}
break;
@ -745,12 +742,11 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
ic->norm.normal->im->rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->norm.
normal->im),
ic->norm.normal->
im),
Imlib_copy_mask(id,
ic->norm.
normal->im), x,
y);
ic->norm.normal->
im), x, y);
x += ic->norm.normal->im->rgb_width;
}
break;
@ -766,12 +762,11 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
ic->norm.normal->im->rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->norm.
normal->im),
ic->norm.normal->
im),
Imlib_copy_mask(id,
ic->norm.
normal->im), x,
y);
ic->norm.normal->
im), x, y);
x += ic->norm.normal->im->rgb_width;
}
break;
@ -787,12 +782,11 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
ic->norm.normal->im->rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->norm.
normal->im),
ic->norm.normal->
im),
Imlib_copy_mask(id,
ic->norm.
normal->im), x,
y);
ic->norm.normal->
im), x, y);
x += ic->norm.normal->im->rgb_width;
}
break;
@ -812,17 +806,16 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
{
Imlib_render(id, ic->norm.normal->im,
ic->norm.normal->im->rgb_width,
ic->norm.normal->
im->rgb_height);
ic->norm.normal->im->
rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->
norm.normal->
im),
ic->norm.
normal->im),
Imlib_copy_mask(id,
ic->
norm.normal->
im), x, y);
ic->norm.
normal->im), x,
y);
x += ic->norm.normal->im->rgb_width;
}
}
@ -836,17 +829,16 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
{
Imlib_render(id, ic->norm.normal->im,
ic->norm.normal->im->rgb_width,
ic->norm.normal->
im->rgb_height);
ic->norm.normal->im->
rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->
norm.normal->
im),
ic->norm.
normal->im),
Imlib_copy_mask(id,
ic->
norm.normal->
im), x, y);
ic->norm.
normal->im), x,
y);
x += ic->norm.normal->im->rgb_width;
}
}
@ -860,17 +852,16 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
{
Imlib_render(id, ic->norm.normal->im,
ic->norm.normal->im->rgb_width,
ic->norm.normal->
im->rgb_height);
ic->norm.normal->im->
rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->
norm.normal->
im),
ic->norm.
normal->im),
Imlib_copy_mask(id,
ic->
norm.normal->
im), x, y);
ic->norm.
normal->im), x,
y);
x += ic->norm.normal->im->rgb_width;
}
}
@ -884,17 +875,16 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
{
Imlib_render(id, ic->norm.normal->im,
ic->norm.normal->im->rgb_width,
ic->norm.normal->
im->rgb_height);
ic->norm.normal->im->
rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->
norm.normal->
im),
ic->norm.
normal->im),
Imlib_copy_mask(id,
ic->
norm.normal->
im), x, y);
ic->norm.
normal->im), x,
y);
x += ic->norm.normal->im->rgb_width;
}
}
@ -908,17 +898,16 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
{
Imlib_render(id, ic->norm.normal->im,
ic->norm.normal->im->rgb_width,
ic->norm.normal->
im->rgb_height);
ic->norm.normal->im->
rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->
norm.normal->
im),
ic->norm.
normal->im),
Imlib_copy_mask(id,
ic->
norm.normal->
im), x, y);
ic->norm.
normal->im), x,
y);
x += ic->norm.normal->im->rgb_width;
}
}
@ -932,17 +921,16 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
{
Imlib_render(id, ic->norm.normal->im,
ic->norm.normal->im->rgb_width,
ic->norm.normal->
im->rgb_height);
ic->norm.normal->im->
rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->
norm.normal->
im),
ic->norm.
normal->im),
Imlib_copy_mask(id,
ic->
norm.normal->
im), x, y);
ic->norm.
normal->im), x,
y);
x += ic->norm.normal->im->rgb_width;
}
}
@ -956,17 +944,16 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
{
Imlib_render(id, ic->norm.normal->im,
ic->norm.normal->im->rgb_width,
ic->norm.normal->
im->rgb_height);
ic->norm.normal->im->
rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->
norm.normal->
im),
ic->norm.
normal->im),
Imlib_copy_mask(id,
ic->
norm.normal->
im), x, y);
ic->norm.
normal->im), x,
y);
x += ic->norm.normal->im->rgb_width;
}
}
@ -980,17 +967,16 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
{
Imlib_render(id, ic->norm.normal->im,
ic->norm.normal->im->rgb_width,
ic->norm.normal->
im->rgb_height);
ic->norm.normal->im->
rgb_height);
PastePixmap(disp, tt->win,
Imlib_copy_image(id,
ic->
norm.normal->
im),
ic->norm.
normal->im),
Imlib_copy_mask(id,
ic->
norm.normal->
im), x, y);
ic->norm.
normal->im), x,
y);
x += ic->norm.normal->im->rgb_width;
}
}

View File

@ -33,10 +33,8 @@ struct _efont_color_tab
};
/*static EfontColorTable *color_tab = NULL; */
static unsigned char alpha_lut[5] =
{0, 64, 128, 192, 255};
static unsigned char bounded_palette[9] =
{0, 1, 2, 3, 4, 4, 4, 4, 4};
static unsigned char alpha_lut[5] = { 0, 64, 128, 192, 255 };
static unsigned char bounded_palette[9] = { 0, 1, 2, 3, 4, 4, 4, 4, 4 };
static TT_Raster_Map *
create_font_raster(int width, int height)

15
src/x.c
View File

@ -40,8 +40,7 @@ EFreePixmap(Display * display, Pixmap pixmap)
XFreePixmap(display, pixmap);
}
Window
ECreateWindow(Window parent, int x, int y, int w, int h, int saveunder)
Window ECreateWindow(Window parent, int x, int y, int w, int h, int saveunder)
{
EXID *xid;
Window win;
@ -587,8 +586,7 @@ DelXID(Window win)
}
}
Window
ECreateEventWindow(Window parent, int x, int y, int w, int h)
Window ECreateEventWindow(Window parent, int x, int y, int w, int h)
{
Window win;
XSetWindowAttributes attr;
@ -604,8 +602,7 @@ ECreateEventWindow(Window parent, int x, int y, int w, int h)
* create a window which will accept the keyboard focus when no other
* windows have it
*/
Window
ECreateFocusWindow(Window parent, int x, int y, int w, int h)
Window ECreateFocusWindow(Window parent, int x, int y, int w, int h)
{
Window win;
XSetWindowAttributes attr;
@ -739,8 +736,7 @@ WinExists(Window win)
EDBUG_RETURN(0);
}
Window
WindowAtXY_0(Window base, int bx, int by, int x, int y)
Window WindowAtXY_0(Window base, int bx, int by, int x, int y)
{
Window *list = NULL;
XWindowAttributes att;
@ -787,8 +783,7 @@ WindowAtXY_0(Window base, int bx, int by, int x, int y)
EDBUG_RETURN(base);
}
Window
WindowAtXY(int x, int y)
Window WindowAtXY(int x, int y)
{
Window *list = NULL;
Window child = 0, parent_win = 0, root_win = 0;