Add winop "alone" to iconify windows on desktop excexpt the selected one
(patch by Pietro Cerutti). SVN revision: 37535
This commit is contained in:
parent
50d4aebf3c
commit
d2d5df5969
|
@ -2,6 +2,7 @@
|
|||
"Close" NULL "wop * close"
|
||||
"Annihilate" NULL "wop * kill"
|
||||
"Iconify" NULL "wop * iconify"
|
||||
"Leave Alone" NULL "wop * alone"
|
||||
"Raise" NULL "wop * raise"
|
||||
"Lower" NULL "wop * lower"
|
||||
"Shade/Unshade" NULL "wop * shade"
|
||||
|
|
|
@ -45,6 +45,7 @@ static const WinOp winops[] = {
|
|||
{"close", 2, 1, 0, EWIN_OP_CLOSE},
|
||||
{"kill", 0, 1, 0, EWIN_OP_KILL},
|
||||
{"iconify", 2, 1, 1, EWIN_OP_ICONIFY},
|
||||
{"alone", 0, 1, 0, EWIN_OP_ALONE},
|
||||
{"opacity", 2, 1, 1, EWIN_OP_OPACITY},
|
||||
{"focused_opacity", 0, 1, 1, EWIN_OP_FOCUSED_OPACITY},
|
||||
{"shadow", 0, 1, 1, EWIN_OP_SHADOW}, /* Place before "shade" */
|
||||
|
@ -570,6 +571,26 @@ EwinIconify(EWin * ewin)
|
|||
call_depth--;
|
||||
}
|
||||
|
||||
void
|
||||
EwinAlone(EWin * ewin)
|
||||
{
|
||||
EWin *const *lst, *item;
|
||||
int i, num;
|
||||
|
||||
lst = EwinListGetForDesk(&num, EoGetDesk(ewin));
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
item = lst[i];
|
||||
|
||||
if (item == ewin || EwinIsTransient(item) ||
|
||||
item->state.iconified || item->props.donthide ||
|
||||
item->area_x != ewin->area_x || item->area_y != ewin->area_y)
|
||||
continue;
|
||||
EwinIconify(item);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
GetOnScreenPos(int x, int y, int w, int h, int *px, int *py)
|
||||
{
|
||||
|
@ -1334,8 +1355,8 @@ EwinsShowDesktop(int on)
|
|||
|
||||
if (on)
|
||||
{
|
||||
if (EwinIsInternal(ewin) || ewin->state.iconified
|
||||
|| ewin->props.donthide || EwinIsTransient(ewin))
|
||||
if (EwinIsTransient(ewin) ||
|
||||
ewin->state.iconified || ewin->props.donthide)
|
||||
continue;
|
||||
|
||||
ewin->state.showingdesk = 1;
|
||||
|
|
|
@ -32,6 +32,7 @@ typedef enum {
|
|||
EWIN_OP_CLOSE,
|
||||
EWIN_OP_KILL,
|
||||
EWIN_OP_ICONIFY,
|
||||
EWIN_OP_ALONE,
|
||||
EWIN_OP_SHADE,
|
||||
EWIN_OP_STICK,
|
||||
EWIN_OP_FOCUS,
|
||||
|
|
|
@ -968,6 +968,7 @@ AddInternalToFamily(Win win, const char *bname, int type,
|
|||
if (!ewin)
|
||||
goto done;
|
||||
|
||||
ewin->props.donthide = 1;
|
||||
EwinGetAttributes(ewin, win, None);
|
||||
WindowMatchEwinOps(ewin); /* Window matches */
|
||||
EwinManage(ewin);
|
||||
|
|
|
@ -400,6 +400,7 @@ void EwinMoveResizeWithGravity(EWin * ewin, int x, int y, int w,
|
|||
void EwinMoveToDesktop(EWin * ewin, Desk * d);
|
||||
void EwinMoveToDesktopAt(EWin * ewin, Desk * d, int x, int y);
|
||||
void EwinIconify(EWin * ewin);
|
||||
void EwinAlone(EWin * ewin);
|
||||
void EwinDeIconify(EWin * ewin);
|
||||
void EwinInstantShade(EWin * ewin, int force);
|
||||
void EwinInstantUnShade(EWin * ewin);
|
||||
|
|
|
@ -477,6 +477,10 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
EwinOpIconify(ewin, OPSRC_USER, on);
|
||||
break;
|
||||
|
||||
case EWIN_OP_ALONE:
|
||||
EwinAlone(ewin);
|
||||
break;
|
||||
|
||||
case EWIN_OP_SHADE:
|
||||
on = ewin->state.shaded;
|
||||
if (SetEwinBoolean(wop->name, &on, param1, 1))
|
||||
|
@ -1533,7 +1537,7 @@ static const IpcItem IPCArray[] = {
|
|||
" win_op <windowid> border <BORDERNAME>\n"
|
||||
" win_op <windowid> title <title>\n"
|
||||
" win_op <windowid> <close/kill>\n"
|
||||
" win_op <windowid> <focus/iconify/shade/stick>\n"
|
||||
" win_op <windowid> <focus/iconify/alone/shade/stick>\n"
|
||||
#if USE_COMPOSITE
|
||||
" win_op <windowid> <fade/shadow>\n"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue