mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-23 12:15:59 +03:00
bugfix: application exclusion zone was broken
This commit is contained in:
parent
e2a4ee8cdd
commit
030e06428e
16
src/main.cpp
16
src/main.cpp
@ -1,3 +1,5 @@
|
||||
#define MIR_LOG_COMPONENT "miracle-main"
|
||||
|
||||
#include <miral/set_window_management_policy.h>
|
||||
#include <miral/external_client.h>
|
||||
#include <miral/runner.h>
|
||||
@ -10,6 +12,7 @@
|
||||
#include <miral/add_init_callback.h>
|
||||
#include "miracle_window_management_policy.h"
|
||||
#include "miracle_config.h"
|
||||
#include <mir/log.h>
|
||||
|
||||
using namespace miral;
|
||||
|
||||
@ -35,14 +38,23 @@ int main(int argc, char const* argv[])
|
||||
{
|
||||
for (auto const& app : config.get_startup_apps())
|
||||
{
|
||||
external_client_launcher.launch(app);
|
||||
auto pid = external_client_launcher.launch(app);
|
||||
mir::log_info("Started external client with pid=%d", pid);
|
||||
}
|
||||
};
|
||||
|
||||
return runner.run_with(
|
||||
{
|
||||
window_managers,
|
||||
WaylandExtensions{},
|
||||
WaylandExtensions{}
|
||||
.enable(miral::WaylandExtensions::zwlr_layer_shell_v1)
|
||||
.enable(miral::WaylandExtensions::zwlr_foreign_toplevel_manager_v1)
|
||||
.enable(miral::WaylandExtensions::zxdg_output_manager_v1)
|
||||
.enable(miral::WaylandExtensions::zwp_virtual_keyboard_manager_v1)
|
||||
.enable(miral::WaylandExtensions::zwlr_virtual_pointer_manager_v1)
|
||||
.enable(miral::WaylandExtensions::zwp_input_method_manager_v2)
|
||||
.enable(miral::WaylandExtensions::zwlr_screencopy_manager_v1)
|
||||
.enable(miral::WaylandExtensions::ext_session_lock_manager_v1),
|
||||
X11Support{}.default_to_enabled(),
|
||||
config_keymap,
|
||||
external_client_launcher,
|
||||
|
@ -349,7 +349,7 @@ void MiracleWindowManagementPolicy::handle_modify_window(
|
||||
for (auto const& output : output_list)
|
||||
{
|
||||
bool found = false;
|
||||
for (auto workspace : output->screen->get_workspaces())
|
||||
for (auto& workspace : output->screen->get_workspaces())
|
||||
{
|
||||
if (workspace.tree.advise_fullscreen_window(window_info))
|
||||
{
|
||||
@ -366,7 +366,7 @@ void MiracleWindowManagementPolicy::handle_modify_window(
|
||||
for (auto const& output : output_list)
|
||||
{
|
||||
bool found = false;
|
||||
for (auto workspace : output->screen->get_workspaces())
|
||||
for (auto& workspace : output->screen->get_workspaces())
|
||||
{
|
||||
if (workspace.tree.advise_restored_window(window_info))
|
||||
{
|
||||
@ -383,7 +383,7 @@ void MiracleWindowManagementPolicy::handle_modify_window(
|
||||
for (auto const& output :output_list)
|
||||
{
|
||||
bool found = false;
|
||||
for (auto workspace : output->screen->get_workspaces())
|
||||
for (auto& workspace : output->screen->get_workspaces())
|
||||
{
|
||||
if (workspace.tree.constrain(window_info))
|
||||
{
|
||||
@ -412,7 +412,7 @@ MiracleWindowManagementPolicy::confirm_placement_on_display(
|
||||
for (auto const& output : output_list)\
|
||||
{
|
||||
bool found = false;
|
||||
for (auto workspace : output->screen->get_workspaces())
|
||||
for (auto& workspace : output->screen->get_workspaces())
|
||||
{
|
||||
if (workspace.tree.confirm_placement_on_display(window_info, new_state, modified_placement))
|
||||
{
|
||||
@ -455,7 +455,7 @@ void MiracleWindowManagementPolicy::advise_application_zone_create(miral::Zone c
|
||||
{
|
||||
for (auto const& output : output_list)
|
||||
{
|
||||
for (auto workspace : output->screen->get_workspaces())
|
||||
for (auto& workspace : output->screen->get_workspaces())
|
||||
workspace.tree.advise_application_zone_create(application_zone);
|
||||
}
|
||||
}
|
||||
@ -464,7 +464,7 @@ void MiracleWindowManagementPolicy::advise_application_zone_update(miral::Zone c
|
||||
{
|
||||
for (auto const& output : output_list)
|
||||
{
|
||||
for (auto workspace : output->screen->get_workspaces())
|
||||
for (auto& workspace : output->screen->get_workspaces())
|
||||
workspace.tree.advise_application_zone_update(updated, original);
|
||||
}
|
||||
}
|
||||
@ -473,7 +473,7 @@ void MiracleWindowManagementPolicy::advise_application_zone_delete(miral::Zone c
|
||||
{
|
||||
for (auto const& output : output_list)
|
||||
{
|
||||
for (auto workspace : output->screen->get_workspaces())
|
||||
for (auto& workspace : output->screen->get_workspaces())
|
||||
workspace.tree.advise_application_zone_delete(application_zone);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user