diff --git a/src/ewin-ops.c b/src/ewin-ops.c index 83cf8ec0..8ebd138e 100644 --- a/src/ewin-ops.c +++ b/src/ewin-ops.c @@ -76,6 +76,7 @@ static const WinOp winops[] = { {"no_button_grabs", 0, 1, 1, EWIN_OP_NO_BUTTON_GRABS}, {"skiplists", 4, 1, 1, EWIN_OP_SKIP_LISTS}, + {"no_app_focus", 0, 1, 1, EWIN_OP_INH_APP_FOCUS}, {"no_app_move", 0, 1, 1, EWIN_OP_INH_APP_MOVE}, {"no_app_size", 0, 1, 1, EWIN_OP_INH_APP_SIZE}, {"no_user_close", 0, 1, 1, EWIN_OP_INH_USER_CLOSE}, @@ -1424,6 +1425,9 @@ EwinMoveToArea(EWin * ewin, int ax, int ay) void EwinOpActivate(EWin * ewin, int source) { + if (source == OPSRC_APP && EwinInhGetApp(ewin, focus)) + return; + if (!ewin->state.animated && !ewin->state.iconified) DeskGotoByEwin(ewin); EwinOpRaise(ewin, source); diff --git a/src/ewin-ops.h b/src/ewin-ops.h index b056cf9a..9f6bc935 100644 --- a/src/ewin-ops.h +++ b/src/ewin-ops.h @@ -63,6 +63,7 @@ typedef enum EWIN_OP_NO_BUTTON_GRABS, EWIN_OP_SKIP_LISTS, + EWIN_OP_INH_APP_FOCUS, EWIN_OP_INH_APP_MOVE, EWIN_OP_INH_APP_SIZE, EWIN_OP_INH_USER_CLOSE, diff --git a/src/ipc.c b/src/ipc.c index 24f77a19..fd95830b 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -712,6 +712,12 @@ IPC_WinOps(const char *params, Client * c __UNUSED__) } break; + case EWIN_OP_INH_APP_FOCUS: + on = EwinInhGetApp(ewin, focus); + SetEwinBoolean(wop->name, &on, param1, 1); + EwinInhSetApp(ewin, focus, on); + break; + case EWIN_OP_INH_APP_MOVE: on = EwinInhGetApp(ewin, move); SetEwinBoolean(wop->name, &on, param1, 1); @@ -1409,7 +1415,7 @@ static const IpcItem IPCArray[] = { " : all, none, border, command, desktop, dialog, group, icon,\n" " layer, location, opacity, shade, shadow, size, sticky\n" " win_op \n" - " win_op \n" + " win_op \n" " win_op \n" " win_op \n" " win_op noshadow\n" diff --git a/src/windowmatch.c b/src/windowmatch.c index 78e2499f..e28833a7 100644 --- a/src/windowmatch.c +++ b/src/windowmatch.c @@ -750,6 +750,10 @@ WindowMatchEwinOpsAction(EWin * ewin, int op, const char *args) WINOP_SET_BOOL(ewin->props.no_button_grabs, args); break; + case EWIN_OP_INH_APP_FOCUS: + WINOP_SET_BOOL(EwinInhGetApp(ewin, focus), args); + break; + case EWIN_OP_INH_APP_MOVE: WINOP_SET_BOOL(EwinInhGetApp(ewin, move), args); break;