Compare commits
No commits in common. "2-manage-input-focus" and "main" have entirely different histories.
2-manage-i
...
main
6 changed files with 0 additions and 42 deletions
|
|
@ -46,5 +46,3 @@ target_include_directories(aswm PUBLIC ${argparse_SOURCE_DIR})
|
||||||
target_link_libraries(aswm libaswm)
|
target_link_libraries(aswm libaswm)
|
||||||
|
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
|
|
||||||
install(TARGETS aswm)
|
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,6 @@ void OnMapRequest(Aswm* aswm, const XMapRequestEvent* e) {
|
||||||
if(!stacked)
|
if(!stacked)
|
||||||
aswm_tile_window(e->display, aswm->current_desktop.tile_root, e->window);
|
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_info("Map tree:\n");
|
||||||
aswm_log_tree(aswm_info, aswm, DefaultRootWindow(aswm->display), 1);
|
aswm_log_tree(aswm_info, aswm, DefaultRootWindow(aswm->display), 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ add_executable(test_aswm
|
||||||
aswm/create_windows/multiple_resizeable.c
|
aswm/create_windows/multiple_resizeable.c
|
||||||
aswm/create_windows/single_fixed_size.c
|
aswm/create_windows/single_fixed_size.c
|
||||||
aswm/property/fix_size.c
|
aswm/property/fix_size.c
|
||||||
aswm/input_focus/init.c
|
|
||||||
)
|
)
|
||||||
target_include_directories(test_aswm PUBLIC ${unity_SOURCE_DIR}/src)
|
target_include_directories(test_aswm PUBLIC ${unity_SOURCE_DIR}/src)
|
||||||
target_link_libraries(test_aswm libaswm unity)
|
target_link_libraries(test_aswm libaswm unity)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
#include "../test_set_up.h"
|
#include "../test_set_up.h"
|
||||||
#include "create_windows.h"
|
#include "create_windows.h"
|
||||||
#include "property.h"
|
#include "property.h"
|
||||||
#include "input_focus.h"
|
|
||||||
|
|
||||||
void run_aswm(void) {
|
void run_aswm(void) {
|
||||||
int stat_loc;
|
int stat_loc;
|
||||||
|
|
@ -23,7 +22,6 @@ int main(void) {
|
||||||
RUN_TEST(create_multiple_resizeable_top_level_window);
|
RUN_TEST(create_multiple_resizeable_top_level_window);
|
||||||
RUN_TEST(create_single_fixed_size_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(fix_size_of_an_existing_single_top_level_window);
|
||||||
RUN_TEST(init_input_focus);
|
|
||||||
}
|
}
|
||||||
tear_down_test_logger();
|
tear_down_test_logger();
|
||||||
return UNITY_END();
|
return UNITY_END();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
#ifndef TEST_ASWM_INPUT_FOCUS
|
|
||||||
#define TEST_ASWM_INPUT_FOCUS
|
|
||||||
|
|
||||||
void init_input_focus(void);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -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]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue