diff --git a/CMakeLists.txt b/CMakeLists.txt index ddeecac..afdda79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,5 +46,3 @@ target_include_directories(aswm PUBLIC ${argparse_SOURCE_DIR}) target_link_libraries(aswm libaswm) add_subdirectory(test) - -install(TARGETS aswm) diff --git a/src/aswm/event_handlers/map.c b/src/aswm/event_handlers/map.c index b3063d4..a4f43e5 100644 --- a/src/aswm/event_handlers/map.c +++ b/src/aswm/event_handlers/map.c @@ -26,8 +26,6 @@ void OnMapRequest(Aswm* aswm, const XMapRequestEvent* e) { if(!stacked) aswm_tile_window(e->display, aswm->current_desktop.tile_root, e->window); - XSetInputFocus(e->display, e->window, RevertToParent, CurrentTime); - aswm_info("Map tree:\n"); aswm_log_tree(aswm_info, aswm, DefaultRootWindow(aswm->display), 1); } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f7d9db2..c7a8b9d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -14,7 +14,6 @@ add_executable(test_aswm aswm/create_windows/multiple_resizeable.c aswm/create_windows/single_fixed_size.c aswm/property/fix_size.c - aswm/input_focus/init.c ) target_include_directories(test_aswm PUBLIC ${unity_SOURCE_DIR}/src) target_link_libraries(test_aswm libaswm unity) diff --git a/test/aswm/aswm.c b/test/aswm/aswm.c index d7282a0..30a0791 100644 --- a/test/aswm/aswm.c +++ b/test/aswm/aswm.c @@ -4,7 +4,6 @@ #include "../test_set_up.h" #include "create_windows.h" #include "property.h" -#include "input_focus.h" void run_aswm(void) { int stat_loc; @@ -23,7 +22,6 @@ int main(void) { RUN_TEST(create_multiple_resizeable_top_level_window); RUN_TEST(create_single_fixed_size_top_level_window); RUN_TEST(fix_size_of_an_existing_single_top_level_window); - RUN_TEST(init_input_focus); } tear_down_test_logger(); return UNITY_END(); diff --git a/test/aswm/input_focus.h b/test/aswm/input_focus.h deleted file mode 100644 index 373a804..0000000 --- a/test/aswm/input_focus.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef TEST_ASWM_INPUT_FOCUS -#define TEST_ASWM_INPUT_FOCUS - -void init_input_focus(void); - -#endif diff --git a/test/aswm/input_focus/init.c b/test/aswm/input_focus/init.c deleted file mode 100644 index 5f2debe..0000000 --- a/test/aswm/input_focus/init.c +++ /dev/null @@ -1,29 +0,0 @@ -#include "../../test_set_up.h" -#include "../../utils.h" - -void init_input_focus() { - const int N = 3; - Window windows[N]; - Window children[N]; - - for(auto i = 0; i < N; i++) { - windows[i] = XCreateSimpleWindow(test_display, test_root, - 10 /*x*/, 10 /*y*/, 128 /*w*/, 128 /*h*/, - 0 /*TODO: border width*/, CopyFromParent /*depth*/, blue(((float) i+1)/N).pixel /* background */); - // The top level windows might have children. Those must **not** be - // altered by the Window Manager - children[i] = XCreateSimpleWindow(test_display, windows[i], - 0, 0, 25, 30, - 0, CopyFromParent, red(1).pixel); - XMapWindow(test_display, children[i]); - XMapWindow(test_display, windows[i]); - - Window input_focus; - int revert_to; - wait_visibility(test_display, windows[i]); - - XGetInputFocus(test_display, &input_focus, &revert_to); - - TEST_ASSERT_EQUAL(input_focus, windows[i]); - } -}