fixing lots of stuff and adding bg's to theme :)
SVN revision: 73
This commit is contained in:
parent
ecf73b991a
commit
1e9f37ebbc
6
src/E.h
6
src/E.h
|
@ -1304,7 +1304,6 @@ struct _snapshot
|
|||
char use_cmd;
|
||||
char *cmd;
|
||||
int group;
|
||||
char apply_to_all;
|
||||
int used;
|
||||
};
|
||||
|
||||
|
@ -1534,6 +1533,7 @@ struct _iconbox
|
|||
char auto_resize;
|
||||
char draw_icon_base;
|
||||
char scrollbar_hide;
|
||||
char cover_hide;
|
||||
|
||||
/* internally set stuff */
|
||||
int w, h;
|
||||
|
@ -2504,6 +2504,7 @@ void SnapshotEwinDialog(EWin * ewin);
|
|||
Snapshot *FindSnapshot(EWin * ewin);
|
||||
Snapshot *GetSnapshot(EWin * ewin);
|
||||
Snapshot *NewSnapshot(char *name);
|
||||
void ClearSnapshot(Snapshot *sn);
|
||||
void SnapshotEwinBorder(EWin * ewin);
|
||||
void SnapshotEwinDesktop(EWin * ewin);
|
||||
void SnapshotEwinSize(EWin * ewin);
|
||||
|
@ -2513,7 +2514,6 @@ void SnapshotEwinSticky(EWin * ewin);
|
|||
void SnapshotEwinIcon(EWin * ewin);
|
||||
void SnapshotEwinShade(EWin * ewin);
|
||||
void SnapshotEwinCmd(EWin * ewin);
|
||||
void SnapshotEwinAllInstances(EWin * ewin, char onoff);
|
||||
void SnapshotEwinGroup(EWin * ewin, char onoff);
|
||||
void SnapshotEwinAll(EWin * ewin);
|
||||
void UnsnapshotEwin(EWin * ewin);
|
||||
|
@ -2522,6 +2522,8 @@ void SpawnSnappedCmds(void);
|
|||
void LoadSnapInfo(void);
|
||||
void MatchEwinToSnapInfo(EWin * ewin);
|
||||
void MatchEwinToSnapInfoAfter(EWin * ewin);
|
||||
void RememberImportantInfoForEwin(EWin *ewin);
|
||||
void RememberImportantInfoForEwins(EWin *ewin);
|
||||
|
||||
void SetCoords(int x, int y, int w, int h);
|
||||
void HideCoords(void);
|
||||
|
|
9
src/TODO
9
src/TODO
|
@ -6,11 +6,10 @@ user: finer grained control on selecting icon display policy
|
|||
kainx: translucent and group window moves if move != opaque - fix :)
|
||||
kainx: new tooltip stuff doesnt saccoutn for 2x extra in calculating iconbox
|
||||
kainx: reduce need for tooltip text to have auto gened tooltips work
|
||||
raster: window groups...
|
||||
when adding to a group need group selection dialogbox
|
||||
raster: iconbox name display
|
||||
raster: tooltips fro pager names and iconbox names runs off right edge
|
||||
raster: segfault when adding 4th window to a group? why?
|
||||
raster: E doesnt remember gorups atm
|
||||
raster: add dnd to iconbox
|
||||
raster: option to turn off iconbox cover
|
||||
raster: icoify animation suport
|
||||
raster: changing virtual desktop size screws up pager content draws.
|
||||
raster: double "close sound" playing atthe moment - fix.
|
||||
|
@ -38,3 +37,5 @@ SOUND_MOVE_AREA_UP - you move to the area above
|
|||
SOUND_MOVE_AREA_DOWN - you move to the area below
|
||||
SOUND_MOVE_RESIST - sound made whenever a window resists movement
|
||||
SOUND_FOCUS_SET - when focus is set to another window...
|
||||
SOUND_GROUP_SETTINGS_ACTIVE - group dialog alreayd active
|
||||
SOUND_SETTINGS_GROUP - new group dialog
|
||||
|
|
221
src/actions.c
221
src/actions.c
|
@ -947,17 +947,7 @@ doResizeEnd(void *params)
|
|||
mode.firstlast = 0;
|
||||
params = NULL;
|
||||
ForceUpdatePagersForDesktop(desks.current);
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -1111,20 +1101,7 @@ doMoveEnd(void *params)
|
|||
FX_Pause();
|
||||
UngrabX();
|
||||
}
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if ((gwins[i]->pager) || (gwins[i]->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(gwins[i]);
|
||||
SnapshotEwinDesktop(gwins[i]);
|
||||
SnapshotEwinSize(gwins[i]);
|
||||
SnapshotEwinLocation(gwins[i]);
|
||||
SnapshotEwinLayer(gwins[i]);
|
||||
SnapshotEwinSticky(gwins[i]);
|
||||
SnapshotEwinShade(gwins[i]);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
}
|
||||
RememberImportantInfoForEwins(ewin);
|
||||
if (wasresize)
|
||||
ForceUpdatePagersForDesktop(desks.current);
|
||||
Efree(gwins);
|
||||
|
@ -1343,7 +1320,6 @@ doCleanup(void *params)
|
|||
if (lst)
|
||||
Efree(lst);
|
||||
}
|
||||
SaveSnapInfo();
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -1518,26 +1494,12 @@ doStick(void *params)
|
|||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (gwins[i]->sticky && sticky)
|
||||
{
|
||||
MakeWindowUnSticky(gwins[i]);
|
||||
}
|
||||
MakeWindowUnSticky(gwins[i]);
|
||||
else if (!gwins[i]->sticky && !sticky)
|
||||
{
|
||||
MakeWindowSticky(gwins[i]);
|
||||
}
|
||||
MakeWindowSticky(gwins[i]);
|
||||
params = NULL;
|
||||
GNOME_SetHint(gwins[i]);
|
||||
if ((gwins[i]->pager) || (gwins[i]->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(gwins[i]);
|
||||
SnapshotEwinDesktop(gwins[i]);
|
||||
SnapshotEwinSize(gwins[i]);
|
||||
SnapshotEwinLocation(gwins[i]);
|
||||
SnapshotEwinLayer(gwins[i]);
|
||||
SnapshotEwinSticky(gwins[i]);
|
||||
SnapshotEwinShade(gwins[i]);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(gwins[i]);
|
||||
}
|
||||
Efree(gwins);
|
||||
EDBUG_RETURN(0);
|
||||
|
@ -2356,17 +2318,7 @@ doShade(void *params)
|
|||
ShadeEwin(gwins[i]);
|
||||
}
|
||||
params = NULL;
|
||||
if ((gwins[i]->pager) || (gwins[i]->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(gwins[i]);
|
||||
SnapshotEwinDesktop(gwins[i]);
|
||||
SnapshotEwinSize(gwins[i]);
|
||||
SnapshotEwinLocation(gwins[i]);
|
||||
SnapshotEwinLayer(gwins[i]);
|
||||
SnapshotEwinSticky(gwins[i]);
|
||||
SnapshotEwinShade(gwins[i]);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(gwins[i]);
|
||||
}
|
||||
Efree(gwins);
|
||||
EDBUG_RETURN(0);
|
||||
|
@ -2384,17 +2336,7 @@ doMaxH(void *params)
|
|||
if (ewin)
|
||||
{
|
||||
MaxHeight(ewin, (char *)params);
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
}
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
@ -2411,17 +2353,7 @@ doMaxW(void *params)
|
|||
if (ewin)
|
||||
{
|
||||
MaxWidth(ewin, (char *)params);
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
}
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
@ -2438,17 +2370,7 @@ doMax(void *params)
|
|||
if (ewin)
|
||||
{
|
||||
MaxSize(ewin, (char *)params);
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
}
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
@ -2471,18 +2393,7 @@ doSendToNextDesk(void *params)
|
|||
ICCCM_Configure(ewin);
|
||||
ewin->sticky = 0;
|
||||
params = NULL;
|
||||
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -2504,18 +2415,7 @@ doSendToPrevDesk(void *params)
|
|||
ICCCM_Configure(ewin);
|
||||
ewin->sticky = 0;
|
||||
params = NULL;
|
||||
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -2550,6 +2450,8 @@ doSnapshot(void *params)
|
|||
SnapshotEwinIcon(ewin);
|
||||
else if (!strcmp((char *)params, "shade"))
|
||||
SnapshotEwinShade(ewin);
|
||||
else if (!strcmp((char *)params, "group"))
|
||||
SnapshotEwinGroup(ewin, 1);
|
||||
else if (!strcmp((char *)params, "dialog"))
|
||||
SnapshotEwinDialog(ewin);
|
||||
EDBUG_RETURN(0);
|
||||
|
@ -2750,17 +2652,7 @@ doSetLayer(void *params)
|
|||
}
|
||||
ewin->layer = l;
|
||||
RaiseEwin(ewin);
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -2797,17 +2689,7 @@ doMoveWinToArea(void *params)
|
|||
sscanf((char *)params, "%i %i", &dx, &dy);
|
||||
MoveEwinToArea(ewin, dx, dy);
|
||||
}
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -2831,17 +2713,7 @@ doMoveWinByArea(void *params)
|
|||
dy = ewin->area_y + dy;
|
||||
MoveEwinToArea(ewin, dx, dy);
|
||||
}
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -2903,17 +2775,7 @@ doSetWinBorder(void *params)
|
|||
MoveResizeEwin(gwins[i], gwins[i]->x, gwins[i]->y, gwins[i]->client.w,
|
||||
gwins[i]->client.h);
|
||||
}
|
||||
if ((gwins[i]->pager) || (gwins[i]->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(gwins[i]);
|
||||
SnapshotEwinDesktop(gwins[i]);
|
||||
SnapshotEwinSize(gwins[i]);
|
||||
SnapshotEwinLocation(gwins[i]);
|
||||
SnapshotEwinLayer(gwins[i]);
|
||||
SnapshotEwinSticky(gwins[i]);
|
||||
SnapshotEwinShade(gwins[i]);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(gwins[i]);
|
||||
}
|
||||
Efree(gwins);
|
||||
EDBUG_RETURN(0);
|
||||
|
@ -3047,17 +2909,7 @@ doMoveWinToLinearArea(void *params)
|
|||
sscanf((char *)params, "%i", &da);
|
||||
MoveEwinToLinearArea(ewin, da);
|
||||
}
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -3078,17 +2930,7 @@ doMoveWinByLinearArea(void *params)
|
|||
sscanf((char *)params, "%i", &da);
|
||||
MoveEwinLinearAreaBy(ewin, da);
|
||||
}
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(ewin);
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -3379,7 +3221,7 @@ doRaiseLower(void *params)
|
|||
{
|
||||
EWin *ewin;
|
||||
|
||||
EDBUG(6, "doRaise");
|
||||
EDBUG(6, "doRaiseLower");
|
||||
if (InZoom())
|
||||
EDBUG_RETURN(0);
|
||||
|
||||
|
@ -3388,21 +3230,19 @@ doRaiseLower(void *params)
|
|||
LIST_TYPE_EWIN);
|
||||
else
|
||||
ewin = GetFocusEwin();
|
||||
|
||||
if (!ewin)
|
||||
EDBUG_RETURN(0);
|
||||
|
||||
if (desks.desk[ewin->desktop].list)
|
||||
{
|
||||
if (desks.desk[0].list[0] == ewin)
|
||||
{
|
||||
AUDIO_PLAY("SOUND_RAISE");
|
||||
RaiseEwin(ewin);
|
||||
AUDIO_PLAY("SOUND_LOWER");
|
||||
LowerEwin(ewin);
|
||||
}
|
||||
else
|
||||
{
|
||||
AUDIO_PLAY("SOUND_LOWER");
|
||||
LowerEwin(ewin);
|
||||
AUDIO_PLAY("SOUND_RAISE");
|
||||
RaiseEwin(ewin);
|
||||
}
|
||||
}
|
||||
EDBUG_RETURN(0);
|
||||
|
@ -3459,18 +3299,7 @@ doShowHideGroup(void *params)
|
|||
ICCCM_MatchSize(gwins[i]);
|
||||
MoveResizeEwin(gwins[i], gwins[i]->x, gwins[i]->y, gwins[i]->client.w,
|
||||
gwins[i]->client.h);
|
||||
|
||||
if ((gwins[i]->pager) || (gwins[i]->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(gwins[i]);
|
||||
SnapshotEwinDesktop(gwins[i]);
|
||||
SnapshotEwinSize(gwins[i]);
|
||||
SnapshotEwinLocation(gwins[i]);
|
||||
SnapshotEwinLayer(gwins[i]);
|
||||
SnapshotEwinSticky(gwins[i]);
|
||||
SnapshotEwinShade(gwins[i]);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
RememberImportantInfoForEwin(gwins[i]);
|
||||
}
|
||||
Efree(gwins);
|
||||
|
||||
|
|
26
src/alert.c
26
src/alert.c
|
@ -62,7 +62,7 @@ AssignIgnoreText(char *text)
|
|||
Efree(IgnoreText);
|
||||
IgnoreText = NULL;
|
||||
IgnoreText = Emalloc(strlen(text) + 6);
|
||||
sprintf(IgnoreText, "(F1) %s", text);
|
||||
sprintf(IgnoreText, "(F1) %s", text);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ AssignRestartText(char *text)
|
|||
Efree(RestartText);
|
||||
RestartText = NULL;
|
||||
RestartText = Emalloc(strlen(text) + 6);
|
||||
sprintf(RestartText, "(F2) %s", text);
|
||||
sprintf(RestartText, "(F2) %s", text);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ AssignExitText(char *text)
|
|||
Efree(ExitText);
|
||||
ExitText = NULL;
|
||||
ExitText = Emalloc(strlen(text) + 6);
|
||||
sprintf(ExitText, "(F3) %s", text);
|
||||
sprintf(ExitText, "(F3) %s", text);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@ goto CN; \
|
|||
win = XCreateWindow(dd, DefaultRootWindow(dd), -100, -100, 1, 1, 0,
|
||||
DefaultDepth(dd, DefaultScreen(dd)), InputOutput,
|
||||
DefaultVisual(dd, DefaultScreen(dd)), mask, &att);
|
||||
|
||||
|
||||
if (sscanf(str1, "%s", line) > 0)
|
||||
{
|
||||
b1 = XCreateWindow(dd, win, -100, -100, 1, 1, 0,
|
||||
|
@ -396,7 +396,7 @@ goto CN; \
|
|||
XSelectInput(dd, b3, ButtonPressMask | ButtonReleaseMask | ExposureMask);
|
||||
}
|
||||
XSync(dd, False);
|
||||
XSelectInput(dd, win, KeyPressMask | KeyReleaseMask| ExposureMask);
|
||||
XSelectInput(dd, win, KeyPressMask | KeyReleaseMask | ExposureMask);
|
||||
|
||||
#define DRAW_ALERT \
|
||||
w = XTextWidth(xfs, title, strlen(title)); \
|
||||
|
@ -450,13 +450,13 @@ XSync(dd, False); \
|
|||
XNextEvent(dd, &ev);
|
||||
switch (ev.type)
|
||||
{
|
||||
case KeyPress:
|
||||
case KeyPress:
|
||||
key = XKeysymToKeycode(dd, XStringToKeysym("F1"));
|
||||
if (key == ev.xkey.keycode)
|
||||
{
|
||||
DRAW_BOX_IN(dd, gc, b1, 0, 0, mh + 10, fh + 10);
|
||||
XSync(dd, False);
|
||||
sleep(1);
|
||||
sleep(1);
|
||||
DRAW_BOX_OUT(dd, gc, b1, 0, 0, mh + 10, fh + 10);
|
||||
XSync(dd, False);
|
||||
AlertHandleClick(1);
|
||||
|
@ -465,10 +465,10 @@ XSync(dd, False); \
|
|||
key = XKeysymToKeycode(dd, XStringToKeysym("F2"));
|
||||
if (key == ev.xkey.keycode)
|
||||
{
|
||||
DRAW_BOX_IN(dd, gc, b1, 0, 0, mh + 10, fh + 10);
|
||||
DRAW_BOX_IN(dd, gc, b2, 0, 0, mh + 10, fh + 10);
|
||||
XSync(dd, False);
|
||||
sleep(1);
|
||||
DRAW_BOX_OUT(dd, gc, b1, 0, 0, mh + 10, fh + 10);
|
||||
sleep(1);
|
||||
DRAW_BOX_OUT(dd, gc, b2, 0, 0, mh + 10, fh + 10);
|
||||
XSync(dd, False);
|
||||
AlertHandleClick(2);
|
||||
w = 0;
|
||||
|
@ -476,10 +476,10 @@ XSync(dd, False); \
|
|||
key = XKeysymToKeycode(dd, XStringToKeysym("F3"));
|
||||
if (key == ev.xkey.keycode)
|
||||
{
|
||||
DRAW_BOX_IN(dd, gc, b1, 0, 0, mh + 10, fh + 10);
|
||||
DRAW_BOX_IN(dd, gc, b3, 0, 0, mh + 10, fh + 10);
|
||||
XSync(dd, False);
|
||||
sleep(1);
|
||||
DRAW_BOX_OUT(dd, gc, b1, 0, 0, mh + 10, fh + 10);
|
||||
sleep(1);
|
||||
DRAW_BOX_OUT(dd, gc, b3, 0, 0, mh + 10, fh + 10);
|
||||
XSync(dd, False);
|
||||
AlertHandleClick(3);
|
||||
w = 0;
|
||||
|
|
|
@ -286,3 +286,4 @@
|
|||
#define CONFIG_AUTOMATIC_RESIZE 2007
|
||||
#define CONFIG_SHOW_ICON_BASE 2008
|
||||
#define CONFIG_SCROLLBAR_AUTOHIDE 2009
|
||||
#define CONFIG_COVER_HIDE 2010
|
||||
|
|
|
@ -2803,6 +2803,10 @@ Config_Ibox(FILE * ConfigFile)
|
|||
if (ib)
|
||||
ib->scrollbar_hide = (char)atoi(s2);
|
||||
break;
|
||||
case CONFIG_COVER_HIDE: /* __COVER_HIDE [ __ON | __OFF ] */
|
||||
if (ib)
|
||||
ib->cover_hide = (char)atoi(s2);
|
||||
break;
|
||||
case CONFIG_CLOSE:
|
||||
return;
|
||||
break;
|
||||
|
@ -3839,6 +3843,7 @@ SaveUserControlConfig(FILE * autosavefile)
|
|||
fprintf(autosavefile, "2007 %i\n", (int)iblist[i]->auto_resize);
|
||||
fprintf(autosavefile, "2008 %i\n", (int)iblist[i]->draw_icon_base);
|
||||
fprintf(autosavefile, "2009 %i\n", (int)iblist[i]->scrollbar_hide);
|
||||
fprintf(autosavefile, "2010 %i\n", (int)iblist[i]->cover_hide);
|
||||
fprintf(autosavefile, "1000\n");
|
||||
}
|
||||
Efree(iblist);
|
||||
|
|
|
@ -1057,7 +1057,7 @@ HandleProperty(XEvent * ev)
|
|||
ICCCM_GetTitle(ewin, ev->xproperty.atom);
|
||||
ICCCM_GetHints(ewin, ev->xproperty.atom);
|
||||
ICCCM_GetInfo(ewin, ev->xproperty.atom);
|
||||
ICCCM_GetColormap(ewin);
|
||||
ICCCM_Cmap(ewin);
|
||||
ICCCM_GetGeoms(ewin, ev->xproperty.atom);
|
||||
SessionGetInfo(ewin, ev->xproperty.atom);
|
||||
SyncBorderToEwin(ewin);
|
||||
|
|
|
@ -175,7 +175,10 @@ ChooseGroupForEwinDialog(EWin * ewin)
|
|||
groups = (Group **) ListItemType(&num_groups, LIST_TYPE_GROUP);
|
||||
if (!groups)
|
||||
{
|
||||
DIALOG_OK("Window Group Error", "\n Currently, no groups exist. You have to start a group first. \n");
|
||||
DIALOG_OK("Window Group Error",
|
||||
"\n"
|
||||
" Currently, no groups exist. \n"
|
||||
" You have to start a group first. \n");
|
||||
/* FIXME... so we could start a group here by default...? */
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
@ -196,7 +199,7 @@ ChooseGroupForEwinDialog(EWin * ewin)
|
|||
|
||||
if ((d = FindItem("GROUP_SELECTION", 0, LIST_FINDBY_NAME, LIST_TYPE_DIALOG)))
|
||||
{
|
||||
AUDIO_PLAY("GROUP_SETTINGS_ACTIVE");
|
||||
AUDIO_PLAY("SOUND_GROUP_SETTINGS_ACTIVE");
|
||||
ShowDialog(d);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -387,6 +387,7 @@ ICCCM_Cmap(EWin * ewin)
|
|||
}
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
ICCCM_GetColormap(ewin);
|
||||
if ((ewin->client.cmap) && (mode.current_cmap != ewin->client.cmap))
|
||||
{
|
||||
XInstallColormap(disp, ewin->client.cmap);
|
||||
|
|
|
@ -494,7 +494,7 @@ IclassApply(ImageClass * iclass, Window win, int w, int h,
|
|||
if ((!iclass) || (!win))
|
||||
EDBUG_RETURN_;
|
||||
if (w < 0)
|
||||
GetWinWH(win, &w, &h);
|
||||
GetWinWH(win, (unsigned int *)&w, (unsigned int *)&h);
|
||||
if ((w < 0) || (h < 0))
|
||||
EDBUG_RETURN_;
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ IconifyEwin(EWin * ewin)
|
|||
ICCCM_Iconify(ewin);
|
||||
if (ewin == mode.focuswin)
|
||||
{
|
||||
char prev_warp;
|
||||
|
||||
char prev_warp;
|
||||
|
||||
prev_warp = mode.display_warp;
|
||||
mode.display_warp = 0;
|
||||
GetPrevFocusEwin();
|
||||
|
@ -193,6 +193,7 @@ CreateIconbox(char *name)
|
|||
ib->auto_resize = 0;
|
||||
ib->draw_icon_base = 0;
|
||||
ib->scrollbar_hide = 0;
|
||||
ib->cover_hide = 0;
|
||||
/* FIXME: need to have theme settable params for this and get them */
|
||||
ib->scroll_thickness = 12;
|
||||
ib->arrow_thickness = 12;
|
||||
|
@ -221,7 +222,7 @@ CreateIconbox(char *name)
|
|||
ib->scrollbarknob_win = ECreateWindow(ib->scrollbar_win, -20, -20, 4, 4, 0);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, 128, 32, id->x.depth);
|
||||
XSelectInput(disp, ib->icon_win, EnterWindowMask | LeaveWindowMask |
|
||||
ButtonPressMask | ButtonReleaseMask);
|
||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask);
|
||||
XSelectInput(disp, ib->scroll_win, EnterWindowMask | LeaveWindowMask |
|
||||
ButtonPressMask | ButtonReleaseMask);
|
||||
XSelectInput(disp, ib->arrow1_win, EnterWindowMask | LeaveWindowMask |
|
||||
|
@ -1639,7 +1640,8 @@ RedrawIconbox(Iconbox * ib)
|
|||
EMoveResizeWindow(disp, ib->icon_win,
|
||||
0, 0,
|
||||
ib->w - ib->scroll_thickness, ib->h);
|
||||
if ((ic = FindItem("ICONBOX_COVER_VERTICAL", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS)))
|
||||
if ((ic = FindItem("ICONBOX_COVER_VERTICAL", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS))
|
||||
&& (!(ib->cover_hide)))
|
||||
{
|
||||
EMoveResizeWindow(disp, ib->cover_win,
|
||||
0, 0,
|
||||
|
@ -1661,7 +1663,8 @@ RedrawIconbox(Iconbox * ib)
|
|||
EMoveResizeWindow(disp, ib->icon_win,
|
||||
ib->scroll_thickness, 0,
|
||||
ib->w - ib->scroll_thickness, ib->h);
|
||||
if ((ic = FindItem("ICONBOX_COVER_VERTICAL", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS)))
|
||||
if ((ic = FindItem("ICONBOX_COVER_VERTICAL", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS))
|
||||
&& (!(ib->cover_hide)))
|
||||
{
|
||||
EMoveResizeWindow(disp, ib->cover_win,
|
||||
ib->scroll_thickness, 0,
|
||||
|
@ -1686,7 +1689,7 @@ RedrawIconbox(Iconbox * ib)
|
|||
Pixmap pmap = 0, mask = 0;
|
||||
int iw, ih;
|
||||
|
||||
GetWinWH(ib->icon_win, &iw, &ih);
|
||||
GetWinWH(ib->icon_win, (unsigned int *)&iw, (unsigned int *)&ih);
|
||||
IclassApplyCopy(ic, ib->icon_win, iw, ih, 0, 0, STATE_NORMAL,
|
||||
&pmap, &mask);
|
||||
EShapeCombineMask(disp, ib->icon_win, ShapeBounding, 0, 0, mask, ShapeSet);
|
||||
|
@ -1701,7 +1704,7 @@ RedrawIconbox(Iconbox * ib)
|
|||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
GetWinWH(ib->icon_win, &iw, &ih);
|
||||
GetWinWH(ib->icon_win, (unsigned int *)&iw, (unsigned int *)&ih);
|
||||
m = ECreatePixmap(disp, ib->icon_win, iw, ih, 1);
|
||||
gc = XCreateGC(disp, m, 0, &gcv);
|
||||
XSetForeground(disp, gc, 0);
|
||||
|
@ -1764,7 +1767,8 @@ RedrawIconbox(Iconbox * ib)
|
|||
EMoveResizeWindow(disp, ib->icon_win,
|
||||
0, 0,
|
||||
ib->w, ib->h - ib->scroll_thickness);
|
||||
if ((ic = FindItem("ICONBOX_COVER_HORIZONTAL", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS)))
|
||||
if ((ic = FindItem("ICONBOX_COVER_HORIZONTAL", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS))
|
||||
&& (!(ib->cover_hide)))
|
||||
{
|
||||
EMoveResizeWindow(disp, ib->cover_win,
|
||||
0, 0,
|
||||
|
@ -1786,7 +1790,8 @@ RedrawIconbox(Iconbox * ib)
|
|||
EMoveResizeWindow(disp, ib->icon_win,
|
||||
0, ib->scroll_thickness,
|
||||
ib->w, ib->h - ib->scroll_thickness);
|
||||
if ((ic = FindItem("ICONBOX_COVER_HORIZONTAL", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS)))
|
||||
if ((ic = FindItem("ICONBOX_COVER_HORIZONTAL", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS))
|
||||
&& (!(ib->cover_hide)))
|
||||
{
|
||||
EMoveResizeWindow(disp, ib->cover_win,
|
||||
0, ib->scroll_thickness,
|
||||
|
@ -1811,7 +1816,7 @@ RedrawIconbox(Iconbox * ib)
|
|||
Pixmap pmap = 0, mask = 0;
|
||||
int iw, ih;
|
||||
|
||||
GetWinWH(ib->icon_win, &iw, &ih);
|
||||
GetWinWH(ib->icon_win, (unsigned int *)&iw, (unsigned int *)&ih);
|
||||
IclassApplyCopy(ic, ib->icon_win, iw, ih, 0, 0, STATE_NORMAL,
|
||||
&pmap, &mask);
|
||||
EShapeCombineMask(disp, ib->icon_win, ShapeBounding, 0, 0, mask, ShapeSet);
|
||||
|
@ -1826,7 +1831,7 @@ RedrawIconbox(Iconbox * ib)
|
|||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
GetWinWH(ib->icon_win, &iw, &ih);
|
||||
GetWinWH(ib->icon_win, (unsigned int *)&iw, (unsigned int *)&ih);
|
||||
m = ECreatePixmap(disp, ib->icon_win, iw, ih, 1);
|
||||
gc = XCreateGC(disp, m, 0, &gcv);
|
||||
XSetForeground(disp, gc, 0);
|
||||
|
@ -2045,7 +2050,7 @@ IconboxHandleEvent(XEvent * ev)
|
|||
|
||||
ib[i]->scrollbox_clicked = 0;
|
||||
GetWinXY(ib[i]->scrollbar_win, &x, &y);
|
||||
GetWinWH(ib[i]->scrollbar_win, &w, &h);
|
||||
GetWinWH(ib[i]->scrollbar_win, (unsigned int *)&w, (unsigned int *)&h);
|
||||
if (ev->xbutton.x < x)
|
||||
IB_Scroll(ib[i], -8);
|
||||
if (ev->xbutton.x > (x + w))
|
||||
|
@ -2160,7 +2165,60 @@ IconboxHandleEvent(XEvent * ev)
|
|||
}
|
||||
else if (ev->xany.window == ib[i]->icon_win)
|
||||
{
|
||||
if (ev->type == ButtonPress)
|
||||
static EWin *name_ewin = NULL;
|
||||
|
||||
if ((ev->type == MotionNotify) || (ev->type == EnterNotify))
|
||||
{
|
||||
EWin *ewin = NULL;
|
||||
ToolTip *tt = NULL;
|
||||
|
||||
if (ev->type == MotionNotify)
|
||||
{
|
||||
ewin = IB_FindIcon(ib[i], ev->xmotion.x, ev->xmotion.y);
|
||||
mode.x = ev->xmotion.x_root;
|
||||
mode.y = ev->xmotion.y_root;
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin = IB_FindIcon(ib[i], ev->xcrossing.x, ev->xcrossing.y);
|
||||
mode.x = ev->xcrossing.x_root;
|
||||
mode.y = ev->xcrossing.y_root;
|
||||
}
|
||||
if (ewin != name_ewin)
|
||||
{
|
||||
tt = FindItem("ICONBOX", 0, LIST_FINDBY_NAME,
|
||||
LIST_TYPE_TOOLTIP);
|
||||
if (tt)
|
||||
{
|
||||
name_ewin = ewin;
|
||||
HideToolTip(tt);
|
||||
if (ewin)
|
||||
{
|
||||
if ((ewin->client.icon_name) &&
|
||||
(strlen(ewin->client.icon_name) > 0))
|
||||
ShowToolTip(tt, ewin->client.icon_name,
|
||||
NULL, mode.x, mode.y);
|
||||
else
|
||||
ShowToolTip(tt, ewin->client.title,
|
||||
NULL, mode.x, mode.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (ev->type == LeaveNotify)
|
||||
{
|
||||
ToolTip *tt = NULL;
|
||||
|
||||
tt = FindItem("ICONBOX", 0, LIST_FINDBY_NAME,
|
||||
LIST_TYPE_TOOLTIP);
|
||||
if (tt)
|
||||
{
|
||||
HideToolTip(tt);
|
||||
name_ewin = NULL;
|
||||
}
|
||||
}
|
||||
else if (ev->type == ButtonPress)
|
||||
{
|
||||
if (ev->xbutton.button == 1)
|
||||
ib[i]->icon_clicked = 1;
|
||||
|
@ -2176,9 +2234,14 @@ IconboxHandleEvent(XEvent * ev)
|
|||
|
||||
ib[i]->icon_clicked = 0;
|
||||
ewin = IB_FindIcon(ib[i], ev->xbutton.x, ev->xbutton.y);
|
||||
|
||||
if (ewin)
|
||||
{
|
||||
ToolTip *tt = NULL;
|
||||
|
||||
tt = FindItem("ICONBOX", 0, LIST_FINDBY_NAME,
|
||||
LIST_TYPE_TOOLTIP);
|
||||
if (tt)
|
||||
HideToolTip(tt);
|
||||
gwins = ListWinGroupMembersForEwin(ewin, ACTION_ICONIFY, &num);
|
||||
iconified = ewin->iconified;
|
||||
|
||||
|
|
54
src/ipc.c
54
src/ipc.c
|
@ -1366,15 +1366,15 @@ IPC_ImageClass(char *params, Client * c)
|
|||
winptr = atword(params, 3);
|
||||
word(params, 4, state);
|
||||
win = (Window) strtol(winptr, (char **)NULL, 0);
|
||||
if (!strcasecmp(state, "hilited"))
|
||||
if (!strcmp(state, "hilited"))
|
||||
{
|
||||
st = STATE_HILITED;
|
||||
}
|
||||
else if (!strcasecmp(state, "clicked"))
|
||||
else if (!strcmp(state, "clicked"))
|
||||
{
|
||||
st = STATE_CLICKED;
|
||||
}
|
||||
else if (!strcasecmp(state, "disabled"))
|
||||
else if (!strcmp(state, "disabled"))
|
||||
{
|
||||
st = STATE_DISABLED;
|
||||
}
|
||||
|
@ -4362,32 +4362,34 @@ ButtonIPC(int val, void *data)
|
|||
*/
|
||||
|
||||
void
|
||||
IPC_ReloadMenus(char *params, Client * c) {
|
||||
/*
|
||||
* Do nothing here but call doExit, following the pattern
|
||||
* that raster/mandrake have setup 08/16/99
|
||||
*
|
||||
* Ok that wasn't nice, I forgot to deallocate menus
|
||||
* Now the way I'm doing this if any menu req's come in
|
||||
* while this is happening we're probably in la-la land
|
||||
* but i'll try this 08/17/99
|
||||
*/
|
||||
IPC_ReloadMenus(char *params, Client * c)
|
||||
{
|
||||
/*
|
||||
* Do nothing here but call doExit, following the pattern
|
||||
* that raster/mandrake have setup 08/16/99
|
||||
*
|
||||
* Ok that wasn't nice, I forgot to deallocate menus
|
||||
* Now the way I'm doing this if any menu req's come in
|
||||
* while this is happening we're probably in la-la land
|
||||
* but i'll try this 08/17/99
|
||||
*/
|
||||
|
||||
Menu *m = NULL;
|
||||
int i, not_task = 1;
|
||||
Menu *m = NULL;
|
||||
int i, not_task = 1;
|
||||
|
||||
/* Free all menustyles first (gulp) */
|
||||
for(m = FindItem(NULL, 0, LIST_FINDBY_NONE, LIST_TYPE_MENU); m;
|
||||
m = FindItem(NULL, 0, LIST_FINDBY_NONE, LIST_TYPE_MENU)) {
|
||||
for(i = 0; i < ENLIGHTENMENT_CONF_NUM_DESKTOPS; i++)
|
||||
if(m == task_menu[i])
|
||||
not_task = 0;
|
||||
if((m != desk_menu) && not_task)
|
||||
DestroyMenu(m);
|
||||
}
|
||||
/* Free all menustyles first (gulp) */
|
||||
for (m = FindItem(NULL, 0, LIST_FINDBY_NONE, LIST_TYPE_MENU); m;
|
||||
m = FindItem(NULL, 0, LIST_FINDBY_NONE, LIST_TYPE_MENU))
|
||||
{
|
||||
for (i = 0; i < ENLIGHTENMENT_CONF_NUM_DESKTOPS; i++)
|
||||
if (m == task_menu[i])
|
||||
not_task = 0;
|
||||
if ((m != desk_menu) && not_task)
|
||||
DestroyMenu(m);
|
||||
}
|
||||
|
||||
LoadConfigFile("menus.cfg");
|
||||
LoadConfigFile("menus.cfg");
|
||||
|
||||
params = NULL;
|
||||
c = NULL;
|
||||
c = NULL;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
/* initialize all the KDE Hint Atoms */
|
||||
|
||||
#if 0 /* we dont need these right now */
|
||||
#if 0 /* we dont need these right now */
|
||||
static Atom KDE_COMMAND = 0;
|
||||
static Atom KDE_ACTIVATE_WINDOW = 0;
|
||||
static Atom KDE_DO_NOT_MANAGE = 0;
|
||||
|
@ -66,6 +66,7 @@ static Atom KDE_WIN_ICONIFIED = 0;
|
|||
static Atom KDE_WIN_MAXIMIZED = 0;
|
||||
static Atom KDE_WIN_STICKY = 0;
|
||||
static Atom KDE_WIN_ICON_GEOMETRY = 0;
|
||||
|
||||
#endif
|
||||
|
||||
/* the modules I have to communicate to */
|
||||
|
|
|
@ -300,7 +300,8 @@ ShowMenu(Menu * m, char noshow)
|
|||
GetWinWH(m->items[0]->win, &w, &h);
|
||||
GetWinWH(m->win, &mw, &mh);
|
||||
|
||||
wx = 0; wy = 0;
|
||||
wx = 0;
|
||||
wy = 0;
|
||||
if (mode.menusonscreen)
|
||||
{
|
||||
if (mode.x - x - ((int)w / 2) > (int)root.w)
|
||||
|
|
|
@ -1182,9 +1182,6 @@ PagerShowMenu(Pager * p, int x, int y)
|
|||
mi = CreateMenuItem("Pager Settings...", NULL, ACTION_CONFIG, "pager", NULL);
|
||||
AddItemToMenu(p_menu, mi);
|
||||
|
||||
mi = CreateMenuItem(" ", NULL, 0, NULL, NULL);
|
||||
AddItemToMenu(p_menu, mi);
|
||||
|
||||
mi = CreateMenuItem("Snapshotting On", NULL, ACTION_SET_PAGER_SNAP, "1", NULL);
|
||||
AddItemToMenu(p_menu, mi);
|
||||
|
||||
|
@ -1193,9 +1190,6 @@ PagerShowMenu(Pager * p, int x, int y)
|
|||
|
||||
if (SNAP)
|
||||
{
|
||||
mi = CreateMenuItem(" ", NULL, 0, NULL, NULL);
|
||||
AddItemToMenu(p_menu, mi);
|
||||
|
||||
mi = CreateMenuItem("High Quality On", NULL, ACTION_SET_PAGER_HIQ, "1", NULL);
|
||||
AddItemToMenu(p_menu, mi);
|
||||
|
||||
|
|
|
@ -2513,7 +2513,7 @@ CB_BGSortFile(int val, void *data)
|
|||
RemoveItem((char *)(bglist[i]), 0, LIST_FINDBY_POINTER,
|
||||
LIST_TYPE_BACKGROUND);
|
||||
Quicksort((void **)bglist, 0, num - 1,
|
||||
(void *)BG_SortFileCompare);
|
||||
(int (*)(void *d1, void *d2))BG_SortFileCompare);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
Background *bg;
|
||||
|
@ -3015,6 +3015,7 @@ static int tmp_ib_mode;
|
|||
static char tmp_ib_auto_resize;
|
||||
static char tmp_ib_draw_icon_base;
|
||||
static char tmp_ib_scrollbar_hide;
|
||||
static char tmp_ib_cover_hide;
|
||||
|
||||
static void CB_ConfigureIconbox(int val, void *data);
|
||||
static void
|
||||
|
@ -3040,6 +3041,7 @@ CB_ConfigureIconbox(int val, void *data)
|
|||
ib->auto_resize = tmp_ib_auto_resize;
|
||||
ib->draw_icon_base = tmp_ib_draw_icon_base;
|
||||
ib->scrollbar_hide = tmp_ib_scrollbar_hide;
|
||||
ib->cover_hide = tmp_ib_cover_hide;
|
||||
IB_CompleteRedraw(ib);
|
||||
}
|
||||
autosave();
|
||||
|
@ -3076,6 +3078,7 @@ SettingsIconbox(char *name)
|
|||
tmp_ib_auto_resize = ib->auto_resize;
|
||||
tmp_ib_draw_icon_base = ib->draw_icon_base;
|
||||
tmp_ib_scrollbar_hide = ib->scrollbar_hide;
|
||||
tmp_ib_cover_hide = ib->cover_hide;
|
||||
if (tmp_ib_name)
|
||||
Efree(tmp_ib_name);
|
||||
tmp_ib_name = duplicate(name);
|
||||
|
@ -3112,6 +3115,14 @@ SettingsIconbox(char *name)
|
|||
DialogItemCheckButtonSetState(di, tmp_ib_nobg);
|
||||
DialogItemCheckButtonSetPtr(di, &tmp_ib_nobg);
|
||||
|
||||
di = DialogAddItem(table, DITEM_CHECKBUTTON);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetColSpan(di, 3);
|
||||
DialogItemCheckButtonSetText(di, "Hide border around inner Iconbox");
|
||||
DialogItemCheckButtonSetState(di, tmp_ib_cover_hide);
|
||||
DialogItemCheckButtonSetPtr(di, &tmp_ib_cover_hide);
|
||||
|
||||
di = DialogAddItem(table, DITEM_CHECKBUTTON);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
|
|
196
src/snaps.c
196
src/snaps.c
|
@ -1,5 +1,6 @@
|
|||
#include "E.h"
|
||||
|
||||
/* find a snapshot state that applies to this ewin */
|
||||
Snapshot *
|
||||
FindSnapshot(EWin * ewin)
|
||||
{
|
||||
|
@ -23,6 +24,8 @@ FindSnapshot(EWin * ewin)
|
|||
return sn;
|
||||
}
|
||||
|
||||
/* find a snapshot state that applies to this ewin Or if that doesnt exist */
|
||||
/* create a new one */
|
||||
Snapshot *
|
||||
GetSnapshot(EWin * ewin)
|
||||
{
|
||||
|
@ -33,13 +36,12 @@ GetSnapshot(EWin * ewin)
|
|||
{
|
||||
char buf[4096];
|
||||
|
||||
sn = Emalloc(sizeof(Snapshot));
|
||||
if ((ewin->client.name) && (ewin->client.class))
|
||||
Esnprintf(buf, sizeof(buf), "%s.%s", ewin->client.name, ewin->client.class);
|
||||
else if (ewin->client.title)
|
||||
Esnprintf(buf, sizeof(buf), "TITLE.%s", ewin->client.title);
|
||||
sn->name = duplicate(buf);
|
||||
AddItemEnd(sn, sn->name, 1, LIST_TYPE_SNAPSHOT);
|
||||
sn = NewSnapshot(buf);
|
||||
ListChangeItemID(LIST_TYPE_SNAPSHOT, sn, 1);
|
||||
if ((ewin->client.name) && (ewin->client.class))
|
||||
{
|
||||
sn->win_title = NULL;
|
||||
|
@ -52,34 +54,13 @@ GetSnapshot(EWin * ewin)
|
|||
sn->win_name = NULL;
|
||||
sn->win_class = NULL;
|
||||
}
|
||||
sn->border_name = NULL;
|
||||
sn->use_desktop = 0;
|
||||
sn->desktop = 0;
|
||||
sn->area_x = 0;
|
||||
sn->area_y = 0;
|
||||
sn->use_wh = 0;
|
||||
sn->w = 0;
|
||||
sn->h = 0;
|
||||
sn->use_xy = 0;
|
||||
sn->x = 0;
|
||||
sn->y = 0;
|
||||
sn->use_layer = 0;
|
||||
sn->layer = 0;
|
||||
sn->use_sticky = 0;
|
||||
sn->sticky = 0;
|
||||
sn->iclass_name = NULL;
|
||||
sn->use_shade = 0;
|
||||
sn->shade = 0;
|
||||
sn->use_cmd = 0;
|
||||
sn->cmd = NULL;
|
||||
sn->group = 0;
|
||||
sn->apply_to_all = 0;
|
||||
sn->used = 1;
|
||||
ewin->snap = sn;
|
||||
}
|
||||
return sn;
|
||||
}
|
||||
|
||||
/* create a new snapshot */
|
||||
Snapshot *
|
||||
NewSnapshot(char *name)
|
||||
{
|
||||
|
@ -111,12 +92,46 @@ NewSnapshot(char *name)
|
|||
sn->use_cmd = 0;
|
||||
sn->cmd = NULL;
|
||||
sn->group = 0;
|
||||
sn->apply_to_all = 0;
|
||||
sn->used = 0;
|
||||
AddItemEnd(sn, sn->name, 0, LIST_TYPE_SNAPSHOT);
|
||||
return sn;
|
||||
}
|
||||
|
||||
/* clear all information out of a snapshot and set its refernce use to 0 */
|
||||
void
|
||||
ClearSnapshot(Snapshot *sn)
|
||||
{
|
||||
if (sn->border_name)
|
||||
Efree(sn->border_name);
|
||||
sn->border_name = NULL;
|
||||
sn->use_desktop = 0;
|
||||
sn->desktop = 0;
|
||||
sn->area_x = 0;
|
||||
sn->area_y = 0;
|
||||
sn->use_wh = 0;
|
||||
sn->w = 0;
|
||||
sn->h = 0;
|
||||
sn->use_xy = 0;
|
||||
sn->x = 0;
|
||||
sn->y = 0;
|
||||
sn->use_layer = 0;
|
||||
sn->layer = 0;
|
||||
sn->use_sticky = 0;
|
||||
sn->sticky = 0;
|
||||
if (sn->iclass_name)
|
||||
Efree(sn->iclass_name);
|
||||
sn->iclass_name = NULL;
|
||||
sn->use_shade = 0;
|
||||
sn->shade = 0;
|
||||
sn->use_cmd = 0;
|
||||
if (sn->cmd)
|
||||
Efree(sn->cmd);
|
||||
sn->cmd = NULL;
|
||||
sn->group = 0;
|
||||
sn->used = 0;
|
||||
ListChangeItemID(LIST_TYPE_SNAPSHOT, sn, 0);
|
||||
}
|
||||
|
||||
static void CB_ApplySnapEscape(int val, void *data);
|
||||
static void
|
||||
CB_ApplySnapEscape(int val, void *data)
|
||||
|
@ -135,7 +150,6 @@ static char tmp_snap_sticky;
|
|||
static char tmp_snap_icon;
|
||||
static char tmp_snap_shade;
|
||||
static char tmp_snap_cmd;
|
||||
static char tmp_snap_all_instances;
|
||||
static char tmp_snap_group;
|
||||
|
||||
static void CB_ApplySnap(int val, void *data);
|
||||
|
@ -150,7 +164,6 @@ CB_ApplySnap(int val, void *data)
|
|||
ewin = FindItem("", tmp_snap_client, LIST_FINDBY_ID, LIST_TYPE_EWIN);
|
||||
if (ewin)
|
||||
{
|
||||
UnsnapshotEwin(ewin);
|
||||
if (tmp_snap_border)
|
||||
SnapshotEwinBorder(ewin);
|
||||
if (tmp_snap_desktop)
|
||||
|
@ -170,7 +183,6 @@ CB_ApplySnap(int val, void *data)
|
|||
if (tmp_snap_cmd)
|
||||
SnapshotEwinCmd(ewin);
|
||||
SnapshotEwinGroup(ewin, tmp_snap_group);
|
||||
SnapshotEwinAllInstances(ewin, tmp_snap_all_instances);
|
||||
if ((!tmp_snap_border) &&
|
||||
(!tmp_snap_desktop) &&
|
||||
(!tmp_snap_size) &&
|
||||
|
@ -181,7 +193,13 @@ CB_ApplySnap(int val, void *data)
|
|||
(!tmp_snap_shade) &&
|
||||
(!tmp_snap_cmd) &&
|
||||
(!tmp_snap_group))
|
||||
UnsnapshotEwin(ewin);
|
||||
{
|
||||
Snapshot *sn;
|
||||
|
||||
sn = GetSnapshot(ewin);
|
||||
ClearSnapshot(sn);
|
||||
UnsnapshotEwin(ewin);
|
||||
}
|
||||
SaveSnapInfo();
|
||||
}
|
||||
}
|
||||
|
@ -233,7 +251,6 @@ SnapshotEwinDialog(EWin * ewin)
|
|||
tmp_snap_shade = 0;
|
||||
tmp_snap_cmd = 0;
|
||||
tmp_snap_group = 0;
|
||||
tmp_snap_all_instances = 0;
|
||||
if (sn)
|
||||
{
|
||||
if (sn->border_name)
|
||||
|
@ -256,8 +273,6 @@ SnapshotEwinDialog(EWin * ewin)
|
|||
tmp_snap_cmd = 1;
|
||||
if (sn->group)
|
||||
tmp_snap_group = 1;
|
||||
if (sn->apply_to_all)
|
||||
tmp_snap_all_instances = 1;
|
||||
}
|
||||
|
||||
di = DialogAddItem(table, DITEM_SEPARATOR);
|
||||
|
@ -444,20 +459,6 @@ SnapshotEwinDialog(EWin * ewin)
|
|||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSeparatorSetOrientation(di, 0);
|
||||
|
||||
di = DialogAddItem(table, DITEM_CHECKBUTTON);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSetColSpan(di, 4);
|
||||
DialogItemCheckButtonSetText(di, "Applies to all instances of this window");
|
||||
DialogItemCheckButtonSetState(di, tmp_snap_all_instances);
|
||||
DialogItemCheckButtonSetPtr(di, &tmp_snap_all_instances);
|
||||
|
||||
di = DialogAddItem(table, DITEM_SEPARATOR);
|
||||
DialogItemSetColSpan(di, 4);
|
||||
DialogItemSetPadding(di, 2, 2, 2, 2);
|
||||
DialogItemSetFill(di, 1, 0);
|
||||
DialogItemSeparatorSetOrientation(di, 0);
|
||||
|
||||
DialogAddButton(d, "OK", CB_ApplySnap, 1);
|
||||
DialogAddButton(d, "Apply", CB_ApplySnap, 0);
|
||||
DialogAddButton(d, "Cancel", CB_ApplySnap, 1);
|
||||
|
@ -629,10 +630,13 @@ SnapshotEwinGroup(EWin * ewin, char onoff)
|
|||
}
|
||||
else
|
||||
{
|
||||
sn = GetSnapshot(gwins[i]);
|
||||
if (sn)
|
||||
if (ewin->snap)
|
||||
{
|
||||
sn->group = 0;
|
||||
sn = GetSnapshot(gwins[i]);
|
||||
if (sn)
|
||||
{
|
||||
sn->group = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -640,26 +644,6 @@ SnapshotEwinGroup(EWin * ewin, char onoff)
|
|||
Efree(gwins);
|
||||
}
|
||||
|
||||
void
|
||||
SnapshotEwinAllInstances(EWin * ewin, char onoff)
|
||||
{
|
||||
Snapshot *sn;
|
||||
EWin **lst;
|
||||
int i, num;
|
||||
|
||||
sn = GetSnapshot(ewin);
|
||||
if (!sn)
|
||||
return;
|
||||
sn->apply_to_all = onoff;
|
||||
lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
|
||||
if (lst)
|
||||
{
|
||||
for (i = 0; i < num; i++)
|
||||
MatchEwinToSnapInfoAfter(lst[i]);
|
||||
Efree(lst);
|
||||
}
|
||||
}
|
||||
|
||||
/* record ALL the ewins state info */
|
||||
void
|
||||
SnapshotEwinAll(EWin * ewin)
|
||||
|
@ -985,8 +969,10 @@ MatchEwinToSnapInfo(EWin * ewin)
|
|||
}
|
||||
if (sn->group)
|
||||
{
|
||||
Group *g = (Group *) FindItem(NULL, sn->group, LIST_FINDBY_ID, LIST_TYPE_GROUP);
|
||||
|
||||
Group *g;
|
||||
|
||||
g = (Group *) FindItem(NULL, sn->group, LIST_FINDBY_ID,
|
||||
LIST_TYPE_GROUP);
|
||||
if (!g)
|
||||
{
|
||||
BuildWindowGroup(&ewin, 1);
|
||||
|
@ -1074,4 +1060,70 @@ MatchEwinToSnapInfoAfter(EWin * ewin)
|
|||
ewin->client.h);
|
||||
}
|
||||
}
|
||||
if ((sn->group) && (!ewin->group))
|
||||
{
|
||||
Group *g;
|
||||
|
||||
g = (Group *) FindItem(NULL, sn->group, LIST_FINDBY_ID,
|
||||
LIST_TYPE_GROUP);
|
||||
if (!g)
|
||||
{
|
||||
BuildWindowGroup(&ewin, 1);
|
||||
ewin->group->index = sn->group;
|
||||
ListChangeItemID(LIST_TYPE_GROUP, ewin->group, sn->group);
|
||||
}
|
||||
else
|
||||
AddEwinToGroup(ewin, g);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RememberImportantInfoForEwin(EWin *ewin)
|
||||
{
|
||||
if ((ewin->pager) || (ewin->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(ewin);
|
||||
SnapshotEwinDesktop(ewin);
|
||||
SnapshotEwinSize(ewin);
|
||||
SnapshotEwinLocation(ewin);
|
||||
SnapshotEwinLayer(ewin);
|
||||
SnapshotEwinSticky(ewin);
|
||||
SnapshotEwinShade(ewin);
|
||||
if (ewin->group)
|
||||
SnapshotEwinGroup(ewin, 1);
|
||||
else
|
||||
SnapshotEwinGroup(ewin, 0);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RememberImportantInfoForEwins(EWin *ewin)
|
||||
{
|
||||
int i, num;
|
||||
EWin **gwins;
|
||||
|
||||
gwins = ListWinGroupMembersForEwin(ewin, ACTION_MOVE, &num);
|
||||
if (gwins)
|
||||
{
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if ((gwins[i]->pager) || (gwins[i]->ibox))
|
||||
{
|
||||
SnapshotEwinBorder(gwins[i]);
|
||||
SnapshotEwinDesktop(gwins[i]);
|
||||
SnapshotEwinSize(gwins[i]);
|
||||
SnapshotEwinLocation(gwins[i]);
|
||||
SnapshotEwinLayer(gwins[i]);
|
||||
SnapshotEwinSticky(gwins[i]);
|
||||
SnapshotEwinShade(gwins[i]);
|
||||
if (gwins[i]->group)
|
||||
SnapshotEwinGroup(gwins[i], 1);
|
||||
else
|
||||
SnapshotEwinGroup(gwins[i], 0);
|
||||
SaveSnapInfo();
|
||||
}
|
||||
}
|
||||
Efree(gwins);
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -401,6 +401,7 @@
|
|||
#define __AUTOMATIC_RESIZE 2007
|
||||
#define __SHOW_ICON_BASE 2008
|
||||
#define __SCROLLBAR_AUTOHIDE 2009
|
||||
#define __COVER_HIDE 2010
|
||||
|
||||
#define __HORIZONTAL 0
|
||||
#define __VERTICAL 1
|
||||
|
@ -793,4 +794,16 @@ __END
|
|||
|
||||
#define ADD_OVERLAY_IMAGE_ASPECT(file) \
|
||||
__FORGROUND_LAYER file 1 512 512 1024 1024
|
||||
|
||||
|
||||
#define ADD_BACKGROUND_SCALED_RETAIN_ASPECT_ALIGN_RIGHT(file)\
|
||||
__BACKGROUND_LAYER file 0 1 1024 512 0 1024
|
||||
|
||||
#define ADD_BACKGROUND_SCALED_RETAIN_ASPECT_ALIGN_LEFT(file)\
|
||||
__BACKGROUND_LAYER file 0 1 0 512 0 1024
|
||||
|
||||
#define ADD_BACKGROUND_SCALED_RETAIN_ASPECT_ALIGN_TOP(file)\
|
||||
__BACKGROUND_LAYER file 0 1 512 0 1024 0
|
||||
|
||||
#define ADD_BACKGROUND_SCALED_RETAIN_ASPECT_ALIGN_BOTTOM(file)\
|
||||
__BACKGROUND_LAYER file 0 1 512 1024 1024 0
|
||||
|
||||
|
|
4
src/x.c
4
src/x.c
|
@ -819,7 +819,7 @@ PastePixmap(Display * d, Drawable w, Pixmap p, Mask m, int x, int y)
|
|||
|
||||
if (!gc)
|
||||
gc = XCreateGC(d, w, 0, &gcv);
|
||||
GetWinWH(p, &ww, &hh);
|
||||
GetWinWH(p, (unsigned int *)&ww, (unsigned int *)&hh);
|
||||
XSetClipMask(disp, gc, m);
|
||||
XSetClipOrigin(disp, gc, x, y);
|
||||
XCopyArea(disp, p, w, gc, 0, 0, ww, hh, x, y);
|
||||
|
@ -836,7 +836,7 @@ PasteMask(Display * d, Drawable w, Pixmap p, int x, int y, int wd, int ht)
|
|||
gc = XCreateGC(d, w, 0, &gcv);
|
||||
if (p)
|
||||
{
|
||||
GetWinWH(p, &ww, &hh);
|
||||
GetWinWH(p, (unsigned int *)&ww, (unsigned int *)&hh);
|
||||
XSetClipMask(disp, gc, p);
|
||||
XSetClipOrigin(disp, gc, x, y);
|
||||
XCopyArea(disp, p, w, gc, 0, 0, ww, hh, x, y);
|
||||
|
|
Loading…
Reference in New Issue