Mon Apr 3 10:17:21 PDT 2000
(Mandrake) fix for iconified windows not getting focus properly when in focuslist. SVN revision: 2415
This commit is contained in:
parent
72f267cb36
commit
c4153ac2be
|
@ -4532,3 +4532,10 @@ Fri Mar 31 10:38:09 PST 2000
|
|||
(Mandrake)
|
||||
|
||||
some people have problems with this session.c (don't know why)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Mon Apr 3 10:17:21 PDT 2000
|
||||
(Mandrake)
|
||||
|
||||
fix for iconified windows not getting focus properly when in focuslist.
|
||||
|
|
7
src/E.h
7
src/E.h
|
@ -1739,13 +1739,12 @@ KMessage;
|
|||
/* only used for remember list dialog callback funcs (SettingsDialog()
|
||||
in in settings.c)... snaps are attached to windows, not a global list */
|
||||
typedef struct _remwinlist
|
||||
{
|
||||
EWin *ewin;
|
||||
char remember;
|
||||
{
|
||||
EWin *ewin;
|
||||
char remember;
|
||||
}
|
||||
RememberWinList;
|
||||
|
||||
|
||||
/* function prototypes */
|
||||
|
||||
void Efont_extents(Efont * f, char *text,
|
||||
|
|
|
@ -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;
|
||||
|
|
24
src/areas.c
24
src/areas.c
|
@ -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;
|
||||
|
|
|
@ -1227,12 +1227,12 @@ CalcEwinWinpart(EWin * ewin, int i)
|
|||
if (bottomright == -1)
|
||||
{
|
||||
ox =
|
||||
((ewin->border->
|
||||
part[i].geom.bottomright.x.percent * ewin->w) >> 10) +
|
||||
((ewin->
|
||||
border->part[i].geom.bottomright.x.percent * ewin->w) >> 10) +
|
||||
ewin->border->part[i].geom.bottomright.x.absolute;
|
||||
oy =
|
||||
((ewin->border->
|
||||
part[i].geom.bottomright.y.percent * ewin->h) >> 10) +
|
||||
((ewin->
|
||||
border->part[i].geom.bottomright.y.percent * ewin->h) >> 10) +
|
||||
ewin->border->part[i].geom.bottomright.y.absolute;
|
||||
}
|
||||
else if (bottomright >= 0)
|
||||
|
@ -2643,9 +2643,8 @@ MinShadeSize(EWin * ewin, int *mw, int *mh)
|
|||
(ewin->w - ewin->border->border.right) > rightborderwidth)
|
||||
rightborderwidth =
|
||||
(ewin->bits[i].x + ewin->bits[i].w) - (ewin->w -
|
||||
ewin->
|
||||
border->border.
|
||||
right);
|
||||
ewin->border->
|
||||
border.right);
|
||||
}
|
||||
}
|
||||
ewin->w = rightborderwidth + leftborderwidth;
|
||||
|
@ -2671,9 +2670,8 @@ MinShadeSize(EWin * ewin, int *mw, int *mh)
|
|||
bottomborderwidth)
|
||||
bottomborderwidth =
|
||||
(ewin->bits[i].y + ewin->bits[i].h) - (ewin->h -
|
||||
ewin->
|
||||
border->border.
|
||||
bottom);
|
||||
ewin->border->
|
||||
border.bottom);
|
||||
}
|
||||
}
|
||||
ewin->h = bottomborderwidth + topborderwidth;
|
||||
|
|
33
src/dialog.c
33
src/dialog.c
|
@ -1193,8 +1193,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;
|
||||
|
@ -1470,12 +1470,13 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
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,
|
||||
|
@ -1483,12 +1484,13 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
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 -
|
||||
|
@ -1998,7 +2000,8 @@ 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;
|
||||
}
|
||||
|
|
|
@ -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)) /
|
||||
|
@ -2513,13 +2515,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]);
|
||||
|
|
|
@ -263,8 +263,7 @@ cp(char *s, char *ss)
|
|||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
time_t
|
||||
moddate(char *s)
|
||||
time_t moddate(char *s)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
|
|
232
src/ipc.c
232
src/ipc.c
|
@ -566,8 +566,7 @@ IPCStruct IPCArray[] = {
|
|||
"usage:\n"
|
||||
" list_remember [full]\n"
|
||||
" Retrieve a list of remembered windows. with full, the list\n"
|
||||
" includes the window's remembered attributes."
|
||||
}
|
||||
" includes the window's remembered attributes."}
|
||||
};
|
||||
|
||||
/* the functions */
|
||||
|
@ -1780,8 +1779,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),
|
||||
|
@ -5380,117 +5379,134 @@ IPC_MemDebug(char *params, Client * c)
|
|||
c = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
IPC_RememberList(char *params, Client * c)
|
||||
{
|
||||
Snapshot **lst;
|
||||
int i, j, num, f;
|
||||
char buf[FILEPATH_LEN_MAX*2], /* hope 2x doesn't break anything */
|
||||
buf2[FILEPATH_LEN_MAX],
|
||||
fullstr[FILEPATH_LEN_MAX],
|
||||
nstr[]="null";
|
||||
Snapshot **lst;
|
||||
int i, j, num, f;
|
||||
char buf[FILEPATH_LEN_MAX * 2], /* hope 2x doesn't break anything */
|
||||
buf2[FILEPATH_LEN_MAX],
|
||||
fullstr[FILEPATH_LEN_MAX], nstr[] = "null";
|
||||
|
||||
buf[0]=0; buf2[0]=0; fullstr[0]=0; f=0; j=0;
|
||||
buf[0] = 0;
|
||||
buf2[0] = 0;
|
||||
fullstr[0] = 0;
|
||||
f = 0;
|
||||
j = 0;
|
||||
|
||||
if (params) {
|
||||
word(params,1,fullstr);
|
||||
if (fullstr&&!strncmp(fullstr,"full", 5)) {
|
||||
f++;
|
||||
}
|
||||
}
|
||||
if (params)
|
||||
{
|
||||
word(params, 1, fullstr);
|
||||
if (fullstr && !strncmp(fullstr, "full", 5))
|
||||
{
|
||||
f++;
|
||||
}
|
||||
}
|
||||
|
||||
lst = (Snapshot**) ListItemType(&num, LIST_TYPE_SNAPSHOT);
|
||||
if (!num) {
|
||||
Esnprintf(buf, sizeof(buf), "Error: no remembered windows\n");
|
||||
} else {
|
||||
if (f) {
|
||||
for (i=0; i<num; i++) {
|
||||
if (!lst[i]||(lst[i]&&!lst[i]->used)) j++;
|
||||
}
|
||||
Esnprintf(buf, sizeof(buf), "Number of remembered windows: %d\n",
|
||||
num-j);
|
||||
}
|
||||
/* strncat(buf, buf2, sizeof(buf)); */
|
||||
for (i=0; i<num; i++) {
|
||||
if (lst[i]&&lst[i]->used) {
|
||||
if (!f) {
|
||||
Esnprintf(buf2, sizeof(buf2), "%s\n",
|
||||
lst[i]->name?lst[i]->name:nstr);
|
||||
} else {
|
||||
Esnprintf(buf2, sizeof(buf2),
|
||||
" Name: %s\n"
|
||||
" Window Title: %s\n"
|
||||
" Window Name: %s\n"
|
||||
" Window Class: %s\n"
|
||||
" Border Name: %s\n"
|
||||
/*" Used: %s\n"*/
|
||||
" use_desktop: %d\n"
|
||||
" desktop: %d\n"
|
||||
" area (x, y): %d, %d\n"
|
||||
" use_wh: %d\n"
|
||||
" (w, h): %d, %d\n"
|
||||
" use_xy: %d\n"
|
||||
" (x, y): %d, %d\n"
|
||||
" use_layer: %d\n"
|
||||
" layer: %d\n"
|
||||
" use_sticky: %d\n"
|
||||
" sticky: %d\n"
|
||||
" use_shade: %d\n"
|
||||
" shade: %d\n"
|
||||
" use_command: %d\n"
|
||||
" command: %s\n"
|
||||
" use_skipwinlist: %d\n"
|
||||
" skipwinlist: %d\n"
|
||||
" use_skiplists: %d\n"
|
||||
" skiptask: %d\n"
|
||||
" skipfocus: %d\n"
|
||||
" use_neverfocus: %d\n"
|
||||
" neverfocus: %d\n",
|
||||
lst[i]->name?lst[i]->name:nstr,
|
||||
lst[i]->win_title?lst[i]->win_title:nstr,
|
||||
lst[i]->win_name?lst[i]->win_name:nstr,
|
||||
lst[i]->win_class?lst[i]->win_class:nstr,
|
||||
lst[i]->border_name?lst[i]->border_name:nstr,
|
||||
/*lst[i]->used?"yes":"no",*/
|
||||
lst = (Snapshot **) ListItemType(&num, LIST_TYPE_SNAPSHOT);
|
||||
if (!num)
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf), "Error: no remembered windows\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (f)
|
||||
{
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (!lst[i] || (lst[i] && !lst[i]->used))
|
||||
j++;
|
||||
}
|
||||
Esnprintf(buf, sizeof(buf), "Number of remembered windows: %d\n",
|
||||
num - j);
|
||||
}
|
||||
/* strncat(buf, buf2, sizeof(buf)); */
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (lst[i] && lst[i]->used)
|
||||
{
|
||||
if (!f)
|
||||
{
|
||||
Esnprintf(buf2, sizeof(buf2), "%s\n",
|
||||
lst[i]->name ? lst[i]->name : nstr);
|
||||
}
|
||||
else
|
||||
{
|
||||
Esnprintf(buf2, sizeof(buf2),
|
||||
" Name: %s\n"
|
||||
" Window Title: %s\n"
|
||||
" Window Name: %s\n"
|
||||
" Window Class: %s\n"
|
||||
" Border Name: %s\n"
|
||||
/*" Used: %s\n" */
|
||||
" use_desktop: %d\n"
|
||||
" desktop: %d\n"
|
||||
" area (x, y): %d, %d\n"
|
||||
" use_wh: %d\n"
|
||||
" (w, h): %d, %d\n"
|
||||
" use_xy: %d\n"
|
||||
" (x, y): %d, %d\n"
|
||||
" use_layer: %d\n"
|
||||
" layer: %d\n"
|
||||
" use_sticky: %d\n"
|
||||
" sticky: %d\n"
|
||||
" use_shade: %d\n"
|
||||
" shade: %d\n"
|
||||
" use_command: %d\n"
|
||||
" command: %s\n"
|
||||
" use_skipwinlist: %d\n"
|
||||
" skipwinlist: %d\n"
|
||||
" use_skiplists: %d\n"
|
||||
" skiptask: %d\n"
|
||||
" skipfocus: %d\n"
|
||||
" use_neverfocus: %d\n"
|
||||
" neverfocus: %d\n",
|
||||
lst[i]->name ? lst[i]->name : nstr,
|
||||
lst[i]->win_title ? lst[i]->win_title : nstr,
|
||||
lst[i]->win_name ? lst[i]->win_name : nstr,
|
||||
lst[i]->win_class ? lst[i]->win_class : nstr,
|
||||
lst[i]->border_name ? lst[i]->
|
||||
border_name : nstr,
|
||||
/*lst[i]->used?"yes":"no", */
|
||||
lst[i]->use_desktop,
|
||||
lst[i]->desktop,
|
||||
lst[i]->area_x, lst[i]->area_y,
|
||||
lst[i]->use_wh,
|
||||
lst[i]->w, lst[i]->h,
|
||||
lst[i]->use_xy,
|
||||
lst[i]->x, lst[i]->y,
|
||||
lst[i]->use_layer,
|
||||
lst[i]->layer,
|
||||
lst[i]->use_sticky,
|
||||
lst[i]->sticky,
|
||||
lst[i]->use_shade,
|
||||
lst[i]->shade,
|
||||
lst[i]->use_cmd,
|
||||
lst[i]->cmd ? lst[i]->cmd : nstr,
|
||||
lst[i]->use_skipwinlist,
|
||||
lst[i]->skipwinlist,
|
||||
lst[i]->use_skiplists,
|
||||
lst[i]->skiptask,
|
||||
lst[i]->skipfocus,
|
||||
lst[i]->use_neverfocus, lst[i]->neverfocus);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* null snapshot or unused: argh hot grits, hot grits!!! :) */
|
||||
buf2[0] = 0;
|
||||
}
|
||||
|
||||
lst[i]->use_desktop,
|
||||
lst[i]->desktop,
|
||||
lst[i]->area_x, lst[i]->area_y,
|
||||
lst[i]->use_wh,
|
||||
lst[i]->w, lst[i]->h,
|
||||
lst[i]->use_xy,
|
||||
lst[i]->x, lst[i]->y,
|
||||
lst[i]->use_layer,
|
||||
lst[i]->layer,
|
||||
lst[i]->use_sticky,
|
||||
lst[i]->sticky,
|
||||
lst[i]->use_shade,
|
||||
lst[i]->shade,
|
||||
lst[i]->use_cmd,
|
||||
lst[i]->cmd?lst[i]->cmd:nstr,
|
||||
lst[i]->use_skipwinlist,
|
||||
lst[i]->skipwinlist,
|
||||
lst[i]->use_skiplists,
|
||||
lst[i]->skiptask,
|
||||
lst[i]->skipfocus,
|
||||
lst[i]->use_neverfocus,
|
||||
lst[i]->neverfocus
|
||||
);
|
||||
}
|
||||
} else {
|
||||
/* null snapshot or unused: argh hot grits, hot grits!!! :) */
|
||||
buf2[0]=0;
|
||||
}
|
||||
|
||||
if (strlen(buf)+strlen(buf2)>sizeof(buf)) {
|
||||
CommsSend(c, buf);
|
||||
buf[0]=0;
|
||||
}
|
||||
strncat(buf, buf2, sizeof(buf));
|
||||
}
|
||||
}
|
||||
if (strlen(buf) + strlen(buf2) > sizeof(buf))
|
||||
{
|
||||
CommsSend(c, buf);
|
||||
buf[0] = 0;
|
||||
}
|
||||
strncat(buf, buf2, sizeof(buf));
|
||||
}
|
||||
}
|
||||
|
||||
if (buf)
|
||||
CommsSend(c, buf);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -287,7 +287,8 @@ ShowMenu(Menu * m, char noshow)
|
|||
* * * * * * * * * * *
|
||||
* * * * * * * * * * * *
|
||||
* * * * * * * * * * * * *
|
||||
* * * * * * * * * * * * * * from appearing offscreen */
|
||||
* * * * * * * * * * * * * *
|
||||
* * * * * * * * * * * * * * * from appearing offscreen */
|
||||
unsigned int w, h, mw, mh;
|
||||
|
||||
EDBUG(5, "ShowMenu");
|
||||
|
|
|
@ -126,8 +126,7 @@ GetNetText(char *URL)
|
|||
|
||||
}
|
||||
|
||||
time_t
|
||||
GetNetFileDate(char *URL)
|
||||
time_t GetNetFileDate(char *URL)
|
||||
{
|
||||
|
||||
#ifdef AUTOUPGRADE
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
369
src/settings.c
369
src/settings.c
|
@ -4192,7 +4192,6 @@ SettingsDefaultGroupControl(void)
|
|||
ShowDialog(d);
|
||||
}
|
||||
|
||||
|
||||
/* lsit of remembered items for the remember dialog -- it's either
|
||||
_anotyer_ glboal var, or i wrapper struct to pass data to the
|
||||
callback funcs besides the dialog itself -- this is much easier */
|
||||
|
@ -4201,205 +4200,225 @@ static RememberWinList **rd_ewin_list;
|
|||
void
|
||||
CB_ApplyRemember(int val, void *data)
|
||||
{
|
||||
Snapshot *sn;
|
||||
int i;
|
||||
Snapshot *sn;
|
||||
int i;
|
||||
|
||||
if (val<2 && rd_ewin_list) {
|
||||
for (i=0; rd_ewin_list[i]; i++) {
|
||||
if (rd_ewin_list[i]) {
|
||||
if (rd_ewin_list[i]->ewin && !rd_ewin_list[i]->remember) {
|
||||
UnsnapshotEwin(rd_ewin_list[i]->ewin);
|
||||
rd_ewin_list[i]->ewin = 0;
|
||||
/* would this be a better way to do things? */
|
||||
/* sn = FindSnapshot(rd_ewin_list[i]->ewin); */
|
||||
/* ClearSnapshot(sn); */
|
||||
/* rd_ewin_list[i]->ewin->snap = 0; */
|
||||
}
|
||||
}
|
||||
}
|
||||
/* save snapshot info to disk */
|
||||
SaveSnapInfo();
|
||||
}
|
||||
if (val < 2 && rd_ewin_list)
|
||||
{
|
||||
for (i = 0; rd_ewin_list[i]; i++)
|
||||
{
|
||||
if (rd_ewin_list[i])
|
||||
{
|
||||
if (rd_ewin_list[i]->ewin && !rd_ewin_list[i]->remember)
|
||||
{
|
||||
UnsnapshotEwin(rd_ewin_list[i]->ewin);
|
||||
rd_ewin_list[i]->ewin = 0;
|
||||
/* would this be a better way to do things? */
|
||||
/* sn = FindSnapshot(rd_ewin_list[i]->ewin); */
|
||||
/* ClearSnapshot(sn); */
|
||||
/* rd_ewin_list[i]->ewin->snap = 0; */
|
||||
}
|
||||
}
|
||||
}
|
||||
/* save snapshot info to disk */
|
||||
SaveSnapInfo();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CB_ApplyRememberEscape(int val, void *data)
|
||||
{
|
||||
int i;
|
||||
DialogClose((Dialog *) data);
|
||||
val = 0;
|
||||
Efree(rd_ewin_list);
|
||||
int i;
|
||||
|
||||
DialogClose((Dialog *) data);
|
||||
val = 0;
|
||||
Efree(rd_ewin_list);
|
||||
}
|
||||
|
||||
void
|
||||
CB_RememberWindowSettings(int va, void *data)
|
||||
{
|
||||
EWin *ewin;
|
||||
EWin *ewin;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
ewin = (EWin*) data;
|
||||
SnapshotEwinDialog(ewin);
|
||||
if (!data)
|
||||
return;
|
||||
ewin = (EWin *) data;
|
||||
SnapshotEwinDialog(ewin);
|
||||
}
|
||||
|
||||
void
|
||||
SettingsRemember()
|
||||
{
|
||||
Dialog *d;
|
||||
DItem *table, *di;
|
||||
EWin **lst, *ewin;
|
||||
int i, ri, num, g_desc, verbose;
|
||||
Dialog *d;
|
||||
DItem *table, *di;
|
||||
EWin **lst, *ewin;
|
||||
int i, ri, num, g_desc, verbose;
|
||||
|
||||
/* show as little infor as possible -- good for small screens
|
||||
where the hell should i put this option? */
|
||||
verbose = 1;
|
||||
/* show as little infor as possible -- good for small screens
|
||||
* where the hell should i put this option? */
|
||||
verbose = 1;
|
||||
|
||||
/* init remember window */
|
||||
if ((d=FindItem("REMEMBER_WINDOW",0,LIST_FINDBY_NAME,LIST_TYPE_DIALOG))) {
|
||||
ShowDialog(d);
|
||||
return;
|
||||
}
|
||||
d = CreateDialog("REMEMBER_WINDOW");
|
||||
DialogSetTitle(d, "Remembered Window Settings");
|
||||
table = DialogInitItem(d);
|
||||
DialogItemTableSetOptions(table, 4, 0, 0, 0);
|
||||
/* init remember window */
|
||||
if ((d = FindItem("REMEMBER_WINDOW", 0, LIST_FINDBY_NAME, LIST_TYPE_DIALOG)))
|
||||
{
|
||||
ShowDialog(d);
|
||||
return;
|
||||
}
|
||||
d = CreateDialog("REMEMBER_WINDOW");
|
||||
DialogSetTitle(d, "Remembered Window Settings");
|
||||
table = DialogInitItem(d);
|
||||
DialogItemTableSetOptions(table, 4, 0, 0, 0);
|
||||
|
||||
/* theres a much more efficient way of doing this, but this'll work
|
||||
for now */
|
||||
lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
|
||||
if (rd_ewin_list) {
|
||||
for (i=0; rd_ewin_list[i]; i++)
|
||||
Efree(rd_ewin_list[i]);
|
||||
Efree(rd_ewin_list);
|
||||
rd_ewin_list = 0;
|
||||
}
|
||||
rd_ewin_list = Emalloc(sizeof(RememberWinList*)*num+1);
|
||||
ri = 0;
|
||||
if ((lst) && (num > 0)) {
|
||||
for (i = 0; i < num; i++) {
|
||||
ewin = lst[i];
|
||||
if (!ewin || !FindSnapshot(ewin) ||
|
||||
!(ewin->client.title||ewin->client.name||ewin->client.class)) {
|
||||
/* fprintf(stderr,"Skipping window #%d \"%s\".\n",
|
||||
i, ewin->client.title?ewin->client.title:"null"); */
|
||||
} else {
|
||||
rd_ewin_list[ri] = Emalloc(sizeof(RememberWinList));
|
||||
rd_ewin_list[ri]->ewin = ewin;
|
||||
rd_ewin_list[ri]->remember = 1;
|
||||
/* fprintf(stderr," Window #%d \"%s\" is remembered (ri==%d)\n",
|
||||
i, ewin->client.title?ewin->client.title:"null", ri);
|
||||
fprintf(stderr," title:\t%s\n name:\t%s\n class:\t%s\n command:\t%s\n",
|
||||
ewin->client.title?ewin->client.title:"null",
|
||||
ewin->client.name?ewin->client.name:"null",
|
||||
ewin->client.class?ewin->client.class:"null",
|
||||
ewin->client.command?ewin->client.command:"null"
|
||||
); */
|
||||
/* theres a much more efficient way of doing this, but this'll work
|
||||
* for now */
|
||||
lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
|
||||
if (rd_ewin_list)
|
||||
{
|
||||
for (i = 0; rd_ewin_list[i]; i++)
|
||||
Efree(rd_ewin_list[i]);
|
||||
Efree(rd_ewin_list);
|
||||
rd_ewin_list = 0;
|
||||
}
|
||||
rd_ewin_list = Emalloc(sizeof(RememberWinList *) * num + 1);
|
||||
ri = 0;
|
||||
if ((lst) && (num > 0))
|
||||
{
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
ewin = lst[i];
|
||||
if (!ewin || !FindSnapshot(ewin) ||
|
||||
!(ewin->client.title || ewin->client.name
|
||||
|| ewin->client.class))
|
||||
{
|
||||
/* fprintf(stderr,"Skipping window #%d \"%s\".\n",
|
||||
* i, ewin->client.title?ewin->client.title:"null"); */
|
||||
}
|
||||
else
|
||||
{
|
||||
rd_ewin_list[ri] = Emalloc(sizeof(RememberWinList));
|
||||
rd_ewin_list[ri]->ewin = ewin;
|
||||
rd_ewin_list[ri]->remember = 1;
|
||||
/* fprintf(stderr," Window #%d \"%s\" is remembered (ri==%d)\n",
|
||||
* i, ewin->client.title?ewin->client.title:"null", ri);
|
||||
* fprintf(stderr," title:\t%s\n name:\t%s\n class:\t%s\n command:\t%s\n",
|
||||
* ewin->client.title?ewin->client.title:"null",
|
||||
* ewin->client.name?ewin->client.name:"null",
|
||||
* ewin->client.class?ewin->client.class:"null",
|
||||
* ewin->client.command?ewin->client.command:"null"
|
||||
* ); */
|
||||
|
||||
di = DialogAddItem(table, DITEM_CHECKBUTTON);
|
||||
DialogItemSetColSpan(di, 2);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemCheckButtonSetText(di, _("Remember this window"));
|
||||
DialogItemCheckButtonSetState(di, rd_ewin_list[ri]->remember);
|
||||
DialogItemCheckButtonSetPtr(di, &(rd_ewin_list[ri]->remember));
|
||||
di = DialogAddItem(table, DITEM_CHECKBUTTON);
|
||||
DialogItemSetColSpan(di, 2);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemCheckButtonSetText(di, _("Remember this window"));
|
||||
DialogItemCheckButtonSetState(di, rd_ewin_list[ri]->remember);
|
||||
DialogItemCheckButtonSetPtr(di,
|
||||
&(rd_ewin_list[ri]->remember));
|
||||
|
||||
di = DialogAddItem(table, DITEM_BUTTON);
|
||||
DialogItemSetColSpan(di, 2);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemButtonSetText(di, _("Remembered Settings..."));
|
||||
DialogItemSetCallback(di, CB_RememberWindowSettings,
|
||||
0, (char*)ewin);
|
||||
|
||||
g_desc = 0;
|
||||
if (ewin->client.title && strlen(ewin->client.title) &&
|
||||
strncmp(ewin->client.title, "0", 1)) {
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemTextSetText(di, "Title:");
|
||||
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetColSpan(di, 3);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemTextSetText(di, ewin->client.title);
|
||||
g_desc = 1;
|
||||
}
|
||||
di = DialogAddItem(table, DITEM_BUTTON);
|
||||
DialogItemSetColSpan(di, 2);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemButtonSetText(di, _("Remembered Settings..."));
|
||||
DialogItemSetCallback(di, CB_RememberWindowSettings,
|
||||
0, (char *)ewin);
|
||||
|
||||
if (ewin->client.name && strlen(ewin->client.name) &&
|
||||
strncmp(ewin->client.name, "0", 1) && (verbose||!g_desc)) {
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemTextSetText(di, "Name:");
|
||||
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetColSpan(di, 3);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemTextSetText(di, ewin->client.name);
|
||||
g_desc = 1;
|
||||
}
|
||||
|
||||
if (ewin->client.class && strlen(ewin->client.class) &&
|
||||
strncmp(ewin->client.class, "0", 1) && (verbose||!g_desc)) {
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemTextSetText(di, "Class:");
|
||||
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetColSpan(di, 3);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemTextSetText(di, ewin->client.class);
|
||||
}
|
||||
|
||||
if (ewin->client.command && strlen(ewin->client.command) &&
|
||||
strncmp(ewin->client.command, "0", 1)) {
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemTextSetText(di, "Command:");
|
||||
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetColSpan(di, 3);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemTextSetText(di, ewin->client.command);
|
||||
}
|
||||
g_desc = 0;
|
||||
if (ewin->client.title && strlen(ewin->client.title) &&
|
||||
strncmp(ewin->client.title, "0", 1))
|
||||
{
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemTextSetText(di, "Title:");
|
||||
|
||||
di = DialogAddItem(table, DITEM_SEPARATOR);
|
||||
DialogItemSetColSpan(di, 4);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSeparatorSetOrientation(di, 0);
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetColSpan(di, 3);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemTextSetText(di, ewin->client.title);
|
||||
g_desc = 1;
|
||||
}
|
||||
|
||||
ri++;
|
||||
}
|
||||
}
|
||||
Efree(lst);
|
||||
rd_ewin_list[ri]=0;
|
||||
}
|
||||
if (ewin->client.name && strlen(ewin->client.name) &&
|
||||
strncmp(ewin->client.name, "0", 1) && (verbose
|
||||
|| !g_desc))
|
||||
{
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemTextSetText(di, "Name:");
|
||||
|
||||
/* finish remember window */
|
||||
DialogAddButton(d, _("OK"), CB_ApplyRemember, 1);
|
||||
DialogAddButton(d, _("Apply"), CB_ApplyRemember, 0);
|
||||
DialogAddButton(d, _("Cancel"), CB_ApplyRemember, 1);
|
||||
DialogSetExitFunction(d, CB_ApplyRemember, 2, d);
|
||||
DialogBindKey(d, "Escape", CB_ApplyRememberEscape, 0, d);
|
||||
DialogBindKey(d, "Return", CB_ApplyRemember, 0, d);
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetColSpan(di, 3);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemTextSetText(di, ewin->client.name);
|
||||
g_desc = 1;
|
||||
}
|
||||
|
||||
ShowDialog(d);
|
||||
if (ewin->client.class && strlen(ewin->client.class) &&
|
||||
strncmp(ewin->client.class, "0", 1) && (verbose
|
||||
|| !g_desc))
|
||||
{
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemTextSetText(di, "Class:");
|
||||
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetColSpan(di, 3);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemTextSetText(di, ewin->client.class);
|
||||
}
|
||||
|
||||
if (ewin->client.command && strlen(ewin->client.command) &&
|
||||
strncmp(ewin->client.command, "0", 1))
|
||||
{
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 0, 512);
|
||||
DialogItemTextSetText(di, "Command:");
|
||||
|
||||
di = DialogAddItem(table, DITEM_TEXT);
|
||||
DialogItemSetColSpan(di, 3);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetAlign(di, 1024, 512);
|
||||
DialogItemTextSetText(di, ewin->client.command);
|
||||
}
|
||||
|
||||
di = DialogAddItem(table, DITEM_SEPARATOR);
|
||||
DialogItemSetColSpan(di, 4);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSeparatorSetOrientation(di, 0);
|
||||
|
||||
ri++;
|
||||
}
|
||||
}
|
||||
Efree(lst);
|
||||
rd_ewin_list[ri] = 0;
|
||||
}
|
||||
|
||||
/* finish remember window */
|
||||
DialogAddButton(d, _("OK"), CB_ApplyRemember, 1);
|
||||
DialogAddButton(d, _("Apply"), CB_ApplyRemember, 0);
|
||||
DialogAddButton(d, _("Cancel"), CB_ApplyRemember, 1);
|
||||
DialogSetExitFunction(d, CB_ApplyRemember, 2, d);
|
||||
DialogBindKey(d, "Escape", CB_ApplyRememberEscape, 0, d);
|
||||
DialogBindKey(d, "Return", CB_ApplyRemember, 0, d);
|
||||
|
||||
ShowDialog(d);
|
||||
}
|
||||
|
|
|
@ -751,7 +751,8 @@ SetupEnv()
|
|||
return;
|
||||
}
|
||||
|
||||
Window MakeExtInitWin(void)
|
||||
Window
|
||||
MakeExtInitWin(void)
|
||||
{
|
||||
Display *d2;
|
||||
Window win;
|
||||
|
|
169
src/tooltips.c
169
src/tooltips.c
|
@ -679,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);
|
||||
|
@ -702,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;
|
||||
|
@ -723,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;
|
||||
|
@ -744,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;
|
||||
|
@ -765,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;
|
||||
|
@ -786,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;
|
||||
|
@ -811,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;
|
||||
}
|
||||
}
|
||||
|
@ -835,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;
|
||||
}
|
||||
}
|
||||
|
@ -859,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;
|
||||
}
|
||||
}
|
||||
|
@ -883,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;
|
||||
}
|
||||
}
|
||||
|
@ -907,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;
|
||||
}
|
||||
}
|
||||
|
@ -931,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;
|
||||
}
|
||||
}
|
||||
|
@ -955,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;
|
||||
}
|
||||
}
|
||||
|
@ -979,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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -198,9 +198,9 @@ WarpFocusFinish(void)
|
|||
ewin = NULL;
|
||||
if (ewin)
|
||||
{
|
||||
FocusToEWin(ewin);
|
||||
if (mode.warpiconified && ewin->iconified)
|
||||
DeIconifyEwin(ewin);
|
||||
FocusToEWin(ewin);
|
||||
if (mode.warp_after_next_focus || mode.warp_on_next_focus)
|
||||
{
|
||||
XWarpPointer(disp, None, ewin->win, 0, 0, 0, 0, ewin->w / 2,
|
||||
|
|
15
src/x.c
15
src/x.c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue