diff -Nur -x '*.orig' -x '*~' metacity-2.23.21/src/core/display.c metacity-2.23.21.new/src/core/display.c --- metacity-2.23.21/src/core/display.c 2008-05-25 04:10:24.000000000 +0100 +++ metacity-2.23.21.new/src/core/display.c 2008-06-03 19:26:52.000000000 +0100 @@ -1819,6 +1819,7 @@ { switch (meta_prefs_get_focus_mode ()) { + case META_FOCUS_MODE_STRICT: case META_FOCUS_MODE_SLOPPY: case META_FOCUS_MODE_MOUSE: display->mouse_mode = TRUE; diff -Nur -x '*.orig' -x '*~' metacity-2.23.21/src/core/prefs.c metacity-2.23.21.new/src/core/prefs.c --- metacity-2.23.21/src/core/prefs.c 2008-04-03 22:08:41.000000000 +0100 +++ metacity-2.23.21.new/src/core/prefs.c 2008-06-03 19:26:52.000000000 +0100 @@ -180,6 +180,7 @@ { META_FOCUS_MODE_CLICK, "click" }, { META_FOCUS_MODE_SLOPPY, "sloppy" }, { META_FOCUS_MODE_MOUSE, "mouse" }, + { META_FOCUS_MODE_STRICT, "strict" }, { 0, NULL }, }; diff -Nur -x '*.orig' -x '*~' metacity-2.23.21/src/core/window.c metacity-2.23.21.new/src/core/window.c --- metacity-2.23.21/src/core/window.c 2008-05-25 04:10:25.000000000 +0100 +++ metacity-2.23.21.new/src/core/window.c 2008-06-03 19:26:52.000000000 +0100 @@ -2267,7 +2267,7 @@ if (window->showing_for_first_time) { window->showing_for_first_time = FALSE; - if (takes_focus_on_map) + if (takes_focus_on_map && meta_prefs_get_focus_mode () != META_FOCUS_MODE_STRICT) { meta_window_focus (window, timestamp); } diff -Nur -x '*.orig' -x '*~' metacity-2.23.21/src/core/workspace.c metacity-2.23.21.new/src/core/workspace.c --- metacity-2.23.21/src/core/workspace.c 2008-05-03 04:14:50.000000000 +0100 +++ metacity-2.23.21.new/src/core/workspace.c 2008-06-03 19:26:52.000000000 +0100 @@ -823,7 +823,8 @@ } else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_SLOPPY) focus_ancestor_or_mru_window (workspace, not_this_one, timestamp); - else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE) + else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE || + meta_prefs_get_focus_mode () == META_FOCUS_MODE_STRICT) { meta_topic (META_DEBUG_FOCUS, "Setting focus to no_focus_window, since no valid " diff -Nur -x '*.orig' -x '*~' metacity-2.23.21/src/include/common.h metacity-2.23.21.new/src/include/common.h --- metacity-2.23.21/src/include/common.h 2008-03-04 04:20:16.000000000 +0000 +++ metacity-2.23.21.new/src/include/common.h 2008-06-03 19:26:52.000000000 +0100 @@ -161,7 +161,8 @@ { META_FOCUS_MODE_CLICK, META_FOCUS_MODE_SLOPPY, - META_FOCUS_MODE_MOUSE + META_FOCUS_MODE_MOUSE, + META_FOCUS_MODE_STRICT } MetaFocusMode; typedef enum