kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=9c6cd28436d929d4fb0ee6a8ea40f70caf697359
commit 9c6cd28436d929d4fb0ee6a8ea40f70caf697359 Author: Kim Woelders <[email protected]> Date: Tue Dec 21 06:47:29 2021 +0100 Do focus windows to be manually placed Broken by ebe82a7bbba9acd29375e7afb271275b8e26706f, see https://phab.enlightenment.org/T8973 --- src/E.h | 2 +- src/ewins.c | 2 +- src/focus.c | 6 +++--- src/moveresize.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/E.h b/src/E.h index 0fa3275b..314ca7a7 100644 --- a/src/E.h +++ b/src/E.h @@ -376,7 +376,7 @@ typedef struct { } move; struct { signed char enable_features; - char doing_manual; + EWin *doing_manual; } place; struct { int w_old; diff --git a/src/ewins.c b/src/ewins.c index bd633dbc..30065e89 100644 --- a/src/ewins.c +++ b/src/ewins.c @@ -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) diff --git a/src/focus.c b/src/focus.c index 7dff4c03..487f6edc 100644 --- a/src/focus.c +++ b/src/focus.c @@ -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; diff --git a/src/moveresize.c b/src/moveresize.c index 1aa0659c..fdf8fa70 100644 --- a/src/moveresize.c +++ b/src/moveresize.c @@ -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) --
