Add window op to enable/disable button grabs per client window.
SVN revision: 14050
This commit is contained in:
parent
b80e5d877e
commit
c5c9d01d8c
1
src/E.h
1
src/E.h
|
@ -723,6 +723,7 @@ struct _ewin
|
|||
char skipwinlist;
|
||||
char focusclick;
|
||||
char neverfocus;
|
||||
char no_button_grabs;
|
||||
char no_actions;
|
||||
void *data; /* Data hook for internal windows */
|
||||
int area_x;
|
||||
|
|
|
@ -39,6 +39,7 @@ static const WinOp winops[] = {
|
|||
{"never_use_area", 0, 1, 1, EWIN_OP_NEVER_USE_AREA},
|
||||
{"focusclick", 0, 1, 1, EWIN_OP_FOCUS_CLICK},
|
||||
{"neverfocus", 0, 1, 1, EWIN_OP_FOCUS_NEVER},
|
||||
{"no_button_grabs", 0, 1, 1, EWIN_OP_NO_BUTTON_GRABS},
|
||||
{"title", 2, 1, 1, EWIN_OP_TITLE},
|
||||
{"toggle_width", 0, 1, 0, EWIN_OP_MAX_WIDTH},
|
||||
{"tw", 2, 1, 0, EWIN_OP_MAX_WIDTH},
|
||||
|
|
|
@ -37,6 +37,7 @@ typedef enum
|
|||
EWIN_OP_NEVER_USE_AREA,
|
||||
EWIN_OP_FOCUS_CLICK,
|
||||
EWIN_OP_FOCUS_NEVER,
|
||||
EWIN_OP_NO_BUTTON_GRABS,
|
||||
EWIN_OP_TITLE,
|
||||
EWIN_OP_MAX_WIDTH,
|
||||
EWIN_OP_MAX_HEIGHT,
|
||||
|
|
27
src/ipc.c
27
src/ipc.c
|
@ -462,31 +462,41 @@ IPC_WinOps(const char *params, Client * c __UNUSED__)
|
|||
#endif
|
||||
|
||||
case EWIN_OP_SHADE:
|
||||
if (SetEwinBoolean("window shaded", &ewin->shaded, param1, 0))
|
||||
if (SetEwinBoolean("shaded", &ewin->shaded, param1, 0))
|
||||
EwinOpShade(ewin, !ewin->shaded);
|
||||
break;
|
||||
|
||||
case EWIN_OP_STICK:
|
||||
on = EoIsSticky(ewin);
|
||||
if (SetEwinBoolean("window sticky", &on, param1, 0))
|
||||
if (SetEwinBoolean("sticky", &on, param1, 0))
|
||||
EwinOpStick(ewin, !on);
|
||||
break;
|
||||
|
||||
case EWIN_OP_FIXED_POS:
|
||||
SetEwinBoolean("window fixedpos", &ewin->fixedpos, param1, 1);
|
||||
SetEwinBoolean("fixedpos", &ewin->fixedpos, param1, 1);
|
||||
break;
|
||||
|
||||
case EWIN_OP_NEVER_USE_AREA:
|
||||
SetEwinBoolean("window never_use_area", &ewin->never_use_area, param1,
|
||||
1);
|
||||
SetEwinBoolean("never_use_area", &ewin->never_use_area, param1, 1);
|
||||
break;
|
||||
|
||||
case EWIN_OP_FOCUS_CLICK:
|
||||
SetEwinBoolean("window focusclick", &ewin->focusclick, param1, 1);
|
||||
SetEwinBoolean("focusclick", &ewin->focusclick, param1, 1);
|
||||
break;
|
||||
|
||||
case EWIN_OP_FOCUS_NEVER:
|
||||
SetEwinBoolean("window neverfocus", &ewin->neverfocus, param1, 1);
|
||||
SetEwinBoolean("neverfocus", &ewin->neverfocus, param1, 1);
|
||||
break;
|
||||
|
||||
case EWIN_OP_NO_BUTTON_GRABS:
|
||||
if (SetEwinBoolean
|
||||
("no_button_grabs", &ewin->no_button_grabs, param1, 1))
|
||||
{
|
||||
if (ewin->no_button_grabs)
|
||||
UnGrabButtonGrabs(ewin);
|
||||
else
|
||||
GrabButtonGrabs(ewin);
|
||||
}
|
||||
break;
|
||||
|
||||
case EWIN_OP_TITLE:
|
||||
|
@ -498,7 +508,7 @@ IPC_WinOps(const char *params, Client * c __UNUSED__)
|
|||
}
|
||||
if (!strcmp(p, "?"))
|
||||
{
|
||||
IpcPrintf("window title: %s", ewin->icccm.wm_name);
|
||||
IpcPrintf("title: %s", ewin->icccm.wm_name);
|
||||
goto done;
|
||||
}
|
||||
_EFREE(ewin->icccm.wm_name);
|
||||
|
@ -1361,6 +1371,7 @@ IpcItem IPCArray[] = {
|
|||
" win_op <windowid> <fixedpos/never_use_area>\n"
|
||||
" win_op <windowid> <focus/focusclick/neverfocus>\n"
|
||||
" win_op <windowid> <fullscreen/iconify/shade/stick>\n"
|
||||
" win_op <windowid> no_button_grabs\n"
|
||||
" win_op <windowid> <raise/lower>\n"
|
||||
" win_op <windowid> skiplists\n"
|
||||
" win_op <windowid> snap <what>\n"
|
||||
|
|
Loading…
Reference in New Issue