parent
8207d1f098
commit
1fe494a8eb
8
src/E.h
8
src/E.h
|
@ -1201,10 +1201,8 @@ typedef struct
|
|||
char all_new_windows_get_focus;
|
||||
char new_transients_get_focus;
|
||||
char new_transients_get_focus_if_group_focused;
|
||||
char raise_on_next_focus;
|
||||
char raise_after_next_focus;
|
||||
char warp_on_next_focus;
|
||||
char warp_after_next_focus;
|
||||
char raise_on_focus;
|
||||
char warp_on_focus;
|
||||
} focus;
|
||||
struct
|
||||
{
|
||||
|
@ -1252,6 +1250,8 @@ typedef struct
|
|||
char warpshaded;
|
||||
char warpiconified;
|
||||
char warpfocused;
|
||||
char raise_on_select;
|
||||
char warp_on_select;
|
||||
} warplist;
|
||||
#if USE_IMLIB2
|
||||
struct
|
||||
|
|
|
@ -1301,6 +1301,7 @@ AdoptInternal(Window win, Border * border, int type)
|
|||
switch (type)
|
||||
{
|
||||
case EWIN_TYPE_DIALOG:
|
||||
ewin->layer = 6;
|
||||
break;
|
||||
case EWIN_TYPE_MENU:
|
||||
ewin->layer = 99;
|
||||
|
|
18
src/config.c
18
src/config.c
|
@ -759,19 +759,19 @@ Config_Control(FILE * ConfigFile)
|
|||
Conf.place.ignore_struts = i2;
|
||||
break;
|
||||
case CONTROL_RAISE_ON_NEXT_FOCUS:
|
||||
Conf.focus.raise_on_next_focus = i2;
|
||||
Conf.focus.raise_on_focus = i2;
|
||||
break;
|
||||
case CONTROL_RAISE_AFTER_NEXT_FOCUS:
|
||||
Conf.focus.raise_after_next_focus = i2;
|
||||
Conf.warplist.raise_on_select = i2;
|
||||
break;
|
||||
case CONTROL_DISPLAY_WARP:
|
||||
Conf.warplist.enable = i2;
|
||||
break;
|
||||
case CONTROL_WARP_ON_NEXT_FOCUS:
|
||||
Conf.focus.warp_on_next_focus = i2;
|
||||
Conf.focus.warp_on_focus = i2;
|
||||
break;
|
||||
case CONTROL_WARP_AFTER_NEXT_FOCUS:
|
||||
Conf.focus.warp_after_next_focus = i2;
|
||||
Conf.warplist.warp_on_select = i2;
|
||||
break;
|
||||
case CONTROL_PAGER_SCANSPEED:
|
||||
Conf.pagers.scanspeed = i2;
|
||||
|
@ -3898,8 +3898,8 @@ SaveUserControlConfig(FILE * autosavefile)
|
|||
fprintf(autosavefile, "3360 %i\n",
|
||||
(int)Conf.place.manual_mouse_pointer);
|
||||
fprintf(autosavefile, "3361 %i\n", (int)Conf.place.ignore_struts);
|
||||
fprintf(autosavefile, "344 %i\n", (int)Conf.focus.raise_on_next_focus);
|
||||
fprintf(autosavefile, "345 %i\n", (int)Conf.focus.warp_on_next_focus);
|
||||
fprintf(autosavefile, "344 %i\n", (int)Conf.focus.raise_on_focus);
|
||||
fprintf(autosavefile, "345 %i\n", (int)Conf.focus.warp_on_focus);
|
||||
fprintf(autosavefile, "346 %i\n", (int)Conf.edge_flip_resistance);
|
||||
fprintf(autosavefile, "347 %i\n", (int)Conf.pagers.enable);
|
||||
fprintf(autosavefile, "348 %i\n", (int)Conf.pagers.hiq);
|
||||
|
@ -3917,11 +3917,9 @@ SaveUserControlConfig(FILE * autosavefile)
|
|||
fprintf(autosavefile, "1350 %i\n", (int)Conf.backgrounds.user);
|
||||
fprintf(autosavefile, "1351 %i\n", (int)Conf.pagers.zoom);
|
||||
fprintf(autosavefile, "1352 %i\n", (int)Conf.pagers.title);
|
||||
fprintf(autosavefile, "1353 %i\n",
|
||||
(int)Conf.focus.raise_after_next_focus);
|
||||
fprintf(autosavefile, "1353 %i\n", (int)Conf.warplist.raise_on_select);
|
||||
fprintf(autosavefile, "1354 %i\n", (int)Conf.warplist.enable);
|
||||
fprintf(autosavefile, "1355 %i\n",
|
||||
(int)Conf.focus.warp_after_next_focus);
|
||||
fprintf(autosavefile, "1355 %i\n", (int)Conf.warplist.warp_on_select);
|
||||
fprintf(autosavefile, "1356 %i\n", (int)Conf.pagers.scanspeed);
|
||||
fprintf(autosavefile, "1358 %i\n", (int)Conf.group_config.set_border);
|
||||
fprintf(autosavefile, "1359 %i\n", (int)Conf.group_config.kill);
|
||||
|
|
|
@ -186,6 +186,8 @@ FocusEwinSetGrabs(EWin * ewin)
|
|||
static void
|
||||
FocusEwinSetActive(EWin * ewin, int active)
|
||||
{
|
||||
Eprintf("FocusEwinSetActive %#lx %s active=%d\n", ewin->client.win,
|
||||
EwinGetTitle(ewin), active);
|
||||
ewin->active = active;
|
||||
EwinBorderUpdateState(ewin);
|
||||
|
||||
|
@ -330,12 +332,10 @@ FocusToEWin(EWin * ewin, int why)
|
|||
ewin->client.win, NULL);
|
||||
}
|
||||
|
||||
if ((Conf.focus.raise_on_next_focus && (why == FOCUS_NEXT)) ||
|
||||
(Conf.focus.raise_after_next_focus && (why == FOCUS_WARP_DONE)))
|
||||
if (Conf.focus.raise_on_focus)
|
||||
RaiseEwin(ewin);
|
||||
|
||||
if ((Conf.focus.warp_on_next_focus && (why == FOCUS_NEXT)) ||
|
||||
(Conf.focus.warp_after_next_focus && (why == FOCUS_WARP_DONE)))
|
||||
if (Conf.focus.warp_on_focus)
|
||||
{
|
||||
if (ewin != Mode.mouse_over_ewin)
|
||||
XWarpPointer(disp, None, ewin->win, 0, 0, 0, 0, ewin->w / 2,
|
||||
|
|
40
src/ipc.c
40
src/ipc.c
|
@ -1831,15 +1831,15 @@ IPC_AdvancedFocus(const char *params, Client * c)
|
|||
{
|
||||
if (!strcmp(param2, "on"))
|
||||
{
|
||||
Conf.focus.raise_on_next_focus = 1;
|
||||
Conf.focus.raise_on_focus = 1;
|
||||
}
|
||||
else if (!strcmp(param2, "off"))
|
||||
{
|
||||
Conf.focus.raise_on_next_focus = 0;
|
||||
Conf.focus.raise_on_focus = 0;
|
||||
}
|
||||
else if (!strcmp(param2, "?"))
|
||||
{
|
||||
if (Conf.focus.raise_on_next_focus)
|
||||
if (Conf.focus.raise_on_focus)
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf),
|
||||
"raise_on_keyboard_focus_switch: on");
|
||||
|
@ -1859,15 +1859,15 @@ IPC_AdvancedFocus(const char *params, Client * c)
|
|||
{
|
||||
if (!strcmp(param2, "on"))
|
||||
{
|
||||
Conf.focus.raise_after_next_focus = 1;
|
||||
Conf.warplist.raise_on_select = 1;
|
||||
}
|
||||
else if (!strcmp(param2, "off"))
|
||||
{
|
||||
Conf.focus.raise_after_next_focus = 0;
|
||||
Conf.warplist.raise_on_select = 0;
|
||||
}
|
||||
else if (!strcmp(param2, "?"))
|
||||
{
|
||||
if (Conf.focus.raise_after_next_focus)
|
||||
if (Conf.warplist.raise_on_select)
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf),
|
||||
"raise_after_keyboard_focus_switch: on");
|
||||
|
@ -1913,15 +1913,15 @@ IPC_AdvancedFocus(const char *params, Client * c)
|
|||
{
|
||||
if (!strcmp(param2, "on"))
|
||||
{
|
||||
Conf.focus.warp_on_next_focus = 1;
|
||||
Conf.focus.warp_on_focus = 1;
|
||||
}
|
||||
else if (!strcmp(param2, "off"))
|
||||
{
|
||||
Conf.focus.warp_on_next_focus = 0;
|
||||
Conf.focus.warp_on_focus = 0;
|
||||
}
|
||||
else if (!strcmp(param2, "?"))
|
||||
{
|
||||
if (Conf.focus.warp_on_next_focus)
|
||||
if (Conf.focus.warp_on_focus)
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf),
|
||||
"pointer_to_keyboard_focus_window: on");
|
||||
|
@ -1941,15 +1941,15 @@ IPC_AdvancedFocus(const char *params, Client * c)
|
|||
{
|
||||
if (!strcmp(param2, "on"))
|
||||
{
|
||||
Conf.focus.warp_after_next_focus = 1;
|
||||
Conf.warplist.warp_on_select = 1;
|
||||
}
|
||||
else if (!strcmp(param2, "off"))
|
||||
{
|
||||
Conf.focus.warp_after_next_focus = 0;
|
||||
Conf.warplist.warp_on_select = 0;
|
||||
}
|
||||
else if (!strcmp(param2, "?"))
|
||||
{
|
||||
if (Conf.focus.warp_after_next_focus)
|
||||
if (Conf.warplist.warp_on_select)
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf),
|
||||
"pointer_after_keyboard_focus_window: on");
|
||||
|
@ -5481,12 +5481,12 @@ IPC_ControlsSet(const char *s, Client * c __UNUSED__)
|
|||
else if (!strcmp(w, "RAISE_ON_NEXT_FOCUS:"))
|
||||
{
|
||||
word(s, wd, w);
|
||||
Conf.focus.raise_on_next_focus = atoi(w);
|
||||
Conf.focus.raise_on_focus = atoi(w);
|
||||
}
|
||||
else if (!strcmp(w, "RAISE_AFTER_NEXT_FOCUS:"))
|
||||
{
|
||||
word(s, wd, w);
|
||||
Conf.focus.raise_after_next_focus = atoi(w);
|
||||
Conf.warplist.raise_on_select = atoi(w);
|
||||
}
|
||||
else if (!strcmp(w, "DISPLAY_WARP:"))
|
||||
{
|
||||
|
@ -5496,12 +5496,12 @@ IPC_ControlsSet(const char *s, Client * c __UNUSED__)
|
|||
else if (!strcmp(w, "WARP_ON_NEXT_FOCUS:"))
|
||||
{
|
||||
word(s, wd, w);
|
||||
Conf.focus.warp_on_next_focus = atoi(w);
|
||||
Conf.focus.warp_on_focus = atoi(w);
|
||||
}
|
||||
else if (!strcmp(w, "WARP_AFTER_NEXT_FOCUS:"))
|
||||
{
|
||||
word(s, wd, w);
|
||||
Conf.focus.warp_after_next_focus = atoi(w);
|
||||
Conf.warplist.warp_on_select = atoi(w);
|
||||
}
|
||||
else if (!strcmp(w, "EDGE_FLIP_RESISTANCE:"))
|
||||
{
|
||||
|
@ -5601,10 +5601,10 @@ IPC_ControlsGet(const char *s __UNUSED__, Client * c)
|
|||
Conf.focus.new_transients_get_focus,
|
||||
Conf.focus.new_transients_get_focus_if_group_focused,
|
||||
Conf.place.manual, Conf.place.manual_mouse_pointer,
|
||||
Conf.focus.raise_on_next_focus,
|
||||
Conf.focus.raise_after_next_focus, Conf.warplist.enable,
|
||||
Conf.focus.warp_on_next_focus,
|
||||
Conf.focus.warp_after_next_focus, Conf.edge_flip_resistance);
|
||||
Conf.focus.raise_on_focus,
|
||||
Conf.warplist.raise_on_select, Conf.warplist.enable,
|
||||
Conf.focus.warp_on_focus,
|
||||
Conf.warplist.warp_on_select, Conf.edge_flip_resistance);
|
||||
CommsSend(c, buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -370,11 +370,11 @@ CB_ConfigureFocus(int val, void *data)
|
|||
Conf.focus.new_transients_get_focus = tmp_popup_focus;
|
||||
Conf.focus.new_transients_get_focus_if_group_focused =
|
||||
tmp_owner_popup_focus;
|
||||
Conf.focus.raise_on_next_focus = tmp_raise_focus;
|
||||
Conf.focus.warp_on_next_focus = tmp_warp_focus;
|
||||
Conf.focus.raise_on_focus = tmp_raise_focus;
|
||||
Conf.focus.warp_on_focus = tmp_warp_focus;
|
||||
#ifdef WITH_TARTY_WARP
|
||||
Conf.focus.warp_after_next_focus = tmp_warp_after_focus;
|
||||
Conf.focus.raise_after_next_focus = tmp_raise_after_focus;
|
||||
Conf.warplist.warp_on_select = tmp_warp_after_focus;
|
||||
Conf.warplist.raise_on_select = tmp_raise_after_focus;
|
||||
Conf.warplist.enable = tmp_display_warp;
|
||||
Conf.warplist.warpsticky = tmp_warpsticky;
|
||||
Conf.warplist.warpshaded = tmp_warpshaded;
|
||||
|
@ -406,11 +406,11 @@ SettingsFocus(void)
|
|||
tmp_new_focus = Conf.focus.all_new_windows_get_focus;
|
||||
tmp_popup_focus = Conf.focus.new_transients_get_focus;
|
||||
tmp_owner_popup_focus = Conf.focus.new_transients_get_focus_if_group_focused;
|
||||
tmp_raise_focus = Conf.focus.raise_on_next_focus;
|
||||
tmp_warp_focus = Conf.focus.warp_on_next_focus;
|
||||
tmp_raise_focus = Conf.focus.raise_on_focus;
|
||||
tmp_warp_focus = Conf.focus.warp_on_focus;
|
||||
#ifdef WITH_TARTY_WARP
|
||||
tmp_raise_after_focus = Conf.focus.raise_after_next_focus;
|
||||
tmp_warp_after_focus = Conf.focus.warp_after_next_focus;
|
||||
tmp_raise_after_focus = Conf.warplist.raise_on_select;
|
||||
tmp_warp_after_focus = Conf.warplist.warp_on_select;
|
||||
tmp_display_warp = Conf.warplist.enable;
|
||||
tmp_warpsticky = Conf.warplist.warpsticky;
|
||||
tmp_warpshaded = Conf.warplist.warpshaded;
|
||||
|
|
|
@ -427,10 +427,10 @@ SetupX(void)
|
|||
Conf.focus.all_new_windows_get_focus = 0;
|
||||
Conf.focus.new_transients_get_focus = 0;
|
||||
Conf.focus.new_transients_get_focus_if_group_focused = 1;
|
||||
Conf.focus.raise_on_next_focus = 1;
|
||||
Conf.focus.raise_after_next_focus = 1;
|
||||
Conf.focus.warp_on_next_focus = 0;
|
||||
Conf.focus.warp_after_next_focus = 0;
|
||||
Conf.focus.raise_on_focus = 1;
|
||||
Conf.focus.warp_on_focus = 0;
|
||||
Conf.warplist.raise_on_select = 1;
|
||||
Conf.warplist.warp_on_select = 0;
|
||||
Conf.group_config.iconify = 1;
|
||||
Conf.group_config.kill = 0;
|
||||
Conf.group_config.move = 1;
|
||||
|
|
15
src/warp.c
15
src/warp.c
|
@ -131,9 +131,12 @@ WarpFocus(int delta)
|
|||
ewin = lst[warpFocusIndex];
|
||||
if (!FindItem((char *)ewin, 0, LIST_FINDBY_POINTER, LIST_TYPE_EWIN))
|
||||
ewin = NULL;
|
||||
if (ewin && Conf.warplist.warpfocused)
|
||||
FocusToEWin(ewin, FOCUS_WARP_NEXT);
|
||||
WarpFocusShowTitle(ewin);
|
||||
if (ewin)
|
||||
{
|
||||
if (Conf.warplist.warpfocused)
|
||||
FocusToEWin(ewin, FOCUS_WARP_NEXT);
|
||||
WarpFocusShowTitle(ewin);
|
||||
}
|
||||
Efree(lst);
|
||||
}
|
||||
|
||||
|
@ -160,6 +163,12 @@ WarpFocusFinish(void)
|
|||
{
|
||||
if (Conf.warplist.warpiconified && ewin->iconified)
|
||||
DeIconifyEwin(ewin);
|
||||
if (Conf.warplist.raise_on_select)
|
||||
RaiseEwin(ewin);
|
||||
if (Conf.warplist.warp_on_select)
|
||||
if (ewin != Mode.mouse_over_ewin)
|
||||
XWarpPointer(disp, None, ewin->win, 0, 0, 0, 0,
|
||||
ewin->w / 2, ewin->h / 2);
|
||||
FocusToEWin(ewin, FOCUS_WARP_DONE);
|
||||
}
|
||||
Efree(lst);
|
||||
|
|
Loading…
Reference in New Issue