Skip to content

Commit

Permalink
Revert "Merge #1129" (#1202)
Browse files Browse the repository at this point in the history
* Revert "miral: Add window resize tests"

This reverts commit abab614

* Revert "BasicWindowManager::modify_window(): respect size constraints"

This reverts commit e14dd13

(cherry picked from commit 514352b)
  • Loading branch information
AlanGriffiths committed Jan 15, 2020
1 parent 9653d45 commit 3e1f055
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 241 deletions.
18 changes: 10 additions & 8 deletions src/miral/basic_window_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1095,14 +1095,16 @@ void miral::BasicWindowManager::modify_window(WindowInfo& window_info, WindowSpe

Point new_pos = modifications.top_left().is_set() ? modifications.top_left().value() : window.top_left();

if (modifications.size().is_set() ||
modifications.min_width().is_set() || modifications.min_height().is_set() ||
modifications.max_width().is_set() || modifications.max_height().is_set() ||
modifications.width_inc().is_set() || modifications.height_inc().is_set())
{
Size new_size = modifications.size().is_set() ?
modifications.size().value() :
window.size();
if (modifications.size().is_set())
{
place_and_size(window_info, new_pos, modifications.size().value());
}
else if (modifications.min_width().is_set() || modifications.min_height().is_set() ||
modifications.max_width().is_set() || modifications.max_height().is_set() ||
modifications.width_inc().is_set() || modifications.height_inc().is_set())
{
Size new_size = window.size();

window_info.constrain_resize(new_pos, new_size);
place_and_size(window_info, new_pos, new_size);
}
Expand Down
1 change: 0 additions & 1 deletion tests/miral/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ mir_add_wrapped_executable(miral-test-internal NOINSTALL
modify_window_specification.cpp
display_reconfiguration.cpp
raise_tree.cpp
resize_window.cpp
static_display_config.cpp
client_mediated_gestures.cpp
test_window_manager_tools.cpp test_window_manager_tools.h
Expand Down
232 changes: 0 additions & 232 deletions tests/miral/resize_window.cpp

This file was deleted.

0 comments on commit 3e1f055

Please sign in to comment.