mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-23 12:15:59 +03:00
bugfix: non-tiling windows should NOT be placed at all
This commit is contained in:
parent
aebb8465ea
commit
0a491d50a7
@ -247,6 +247,7 @@ auto MiracleWindowManagementPolicy::place_new_window(
|
||||
const miral::ApplicationInfo &app_info,
|
||||
const miral::WindowSpecification &requested_specification) -> miral::WindowSpecification
|
||||
{
|
||||
// TODO: This can happen before we have a single screen!
|
||||
return active_output->screen->get_active_tree().allocate_position(requested_specification);
|
||||
}
|
||||
|
||||
|
@ -51,9 +51,12 @@ miral::WindowSpecification WindowTree::allocate_position(const miral::WindowSpec
|
||||
|
||||
void WindowTree::advise_new_window(miral::WindowInfo const& window_info)
|
||||
{
|
||||
if (!window_helpers::is_tileable(window_info) && window_info.state() == MirWindowState::mir_window_state_attached)
|
||||
if (!window_helpers::is_tileable(window_info))
|
||||
{
|
||||
tools.select_active_window(window_info.window());
|
||||
if (window_info.state() == MirWindowState::mir_window_state_attached)
|
||||
{
|
||||
tools.select_active_window(window_info.window());
|
||||
}
|
||||
non_tiling_window_list.push_back(window_info.window());
|
||||
return;
|
||||
}
|
||||
@ -182,18 +185,6 @@ bool WindowTree::select_window_from_point(int x, int y)
|
||||
return true;
|
||||
}
|
||||
|
||||
for (auto const& window : non_tiling_window_list)
|
||||
{
|
||||
auto rectangle = geom::Rectangle{window.top_left(), window.size()};
|
||||
if (rectangle.contains(geom::Point(x, y)))
|
||||
{
|
||||
tools.select_active_window(window);
|
||||
active_window = nullptr;
|
||||
is_active_window_fullscreen = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
auto node = root_lane->find_where([&](std::shared_ptr<Node> const& node)
|
||||
{
|
||||
return node->is_window() && node->get_logical_area().contains(geom::Point(x, y));
|
||||
|
Loading…
Reference in New Issue
Block a user