Do focus windows to be manually placed

Broken by ebe82a7bbb, see
https://phab.enlightenment.org/T8973
This commit is contained in:
Kim Woelders 2021-12-21 06:47:29 +01:00
parent 4eeed36acd
commit 9c6cd28436
4 changed files with 7 additions and 7 deletions

View File

@ -376,7 +376,7 @@ typedef struct {
} move;
struct {
signed char enable_features;
char doing_manual;
EWin *doing_manual;
} place;
struct {
int w_old;

View File

@ -983,7 +983,7 @@ AddToFamily(EWin * ewin, EX_Window xwin, XWindowAttributes * pxwa, int startup)
EoSetFloating(ewin, 1); /* Causes reparenting to root */
EwinOpFloatAt(ewin, OPSRC_USER, x, y);
EwinShow(ewin);
Mode.place.doing_manual = 1;
Mode.place.doing_manual = ewin;
MoveResizeMoveStart(ewin, 0, 0, 0);
}
else if (doslide)

View File

@ -129,6 +129,9 @@ FocusEwinValidNew(EWin * ewin)
if (Conf.focus.all_new_windows_get_focus)
ok = 1;
else if (Mode.place.doing_manual == ewin)
ok = 1;
else if (Conf.focus.new_windows_get_focus_if_group_focused &&
Mode.focuswin &&
EwinGetWindowGroup(ewin) == EwinGetWindowGroup(Mode.focuswin))
@ -416,9 +419,6 @@ doFocusToEwin(EWin * ewin, int why)
if (!ewin)
return;
if (Mode.place.doing_manual)
goto check_focus_new;
if (ewin->props.focus_when_mapped)
goto check_focus_new;

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2004-2020 Kim Woelders
* Copyright (C) 2004-2021 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -193,7 +193,7 @@ _MoveResizeMoveEnd(EWin * ewin)
done:
Mode.mode = MODE_NONE;
Mode.move.swap = 0;
Mode.place.doing_manual = 0;
Mode.place.doing_manual = NULL;
Mode_mr.ewin = NULL;
if (Mode_mr.grab_server)