kwin/autotests/integration
Martin Flöser 2ea5153e1c Don't crash if the cursor theme fails to create
Summary:
If the cursor theme failed to create KWin crashed due to an endless
recursion. There are two reasons for this fault:
1) When the physical size does not exist we perform a division by 0
which results in an invalid size going into wl_cursor_theme_load
2) We emit the signal that the cursor theme changed even if it didn't
change thus creating an endless recursion

This change addresses both problems: it checks that the size is not 0
and changes the handling for theme update to only destroy the previous
theme if the new theme could be created and only emits the signal if
things change.

BUG: 390314
FIXED-IN: 5.12.3

Test Plan: Added a new test case which crashed with old code

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10549
2018-03-04 09:42:27 +01:00
..
data
effects
helper
scripting
activities_test.cpp
CMakeLists.txt Don't crash if the cursor theme fails to create 2018-03-04 09:42:27 +01:00
colorcorrect_nightcolor_test.cpp
debug_console_test.cpp
decoration_input_test.cpp
desktop_window_x11_test.cpp
dont_crash_aurorae_destroy_deco.cpp
dont_crash_cancel_animation.cpp
dont_crash_cursor_physical_size_empty.cpp Don't crash if the cursor theme fails to create 2018-03-04 09:42:27 +01:00
dont_crash_empty_deco.cpp
dont_crash_glxgears.cpp
dont_crash_no_border.cpp
dont_crash_useractions_menu.cpp
generic_scene_opengl_test.cpp
generic_scene_opengl_test.h
globalshortcuts_test.cpp
idle_inhibition_test.cpp
input_stacking_order.cpp
internal_window.cpp
keyboard_layout_test.cpp
keymap_creation_failure_test.cpp
kwin_wayland_test.cpp
kwin_wayland_test.h
kwinbindings_test.cpp
lockscreen.cpp
maximize_test.cpp
modifier_only_shortcut_test.cpp
move_resize_window_test.cpp
no_xdg_runtime_dir_test.cpp
plasma_surface_test.cpp
plasmawindow_test.cpp
platformcursor.cpp
pointer_constraints_test.cpp
pointer_input.cpp
quick_tiling_test.cpp
scene_opengl_es_test.cpp
scene_opengl_test.cpp
scene_qpainter_test.cpp
screen_changes_test.cpp
screenedge_client_show_test.cpp
shade_test.cpp
shell_client_rules_test.cpp
shell_client_test.cpp
showing_desktop_test.cpp
start_test.cpp
struts_test.cpp
tabbox_test.cpp
test_helpers.cpp
touch_input_test.cpp
transient_no_input_test.cpp
transient_placement.cpp
virtual_desktop_test.cpp
window_rules_test.cpp
window_selection_test.cpp
x11_client_test.cpp
xclipboardsync_test.cpp
xwayland_input_test.cpp