From b4ea8be61c5a672fd411ebbca0516dd25acf0777 Mon Sep 17 00:00:00 2001 From: callmejoe Date: Thu, 12 Feb 2026 17:03:59 -0500 Subject: [PATCH 1/3] window-rules: fix view-action-interface output detection logic --- .../window-rules/view-action-interface.cpp | 48 +++++++++++++++++-- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/plugins/window-rules/view-action-interface.cpp b/plugins/window-rules/view-action-interface.cpp index 8e683c77f..d65d56a41 100644 --- a/plugins/window-rules/view-action-interface.cpp +++ b/plugins/window-rules/view-action-interface.cpp @@ -525,25 +525,63 @@ void view_action_interface_t::_set_geometry_ppt(int x, int y, int w, int h) void view_action_interface_t::_start_on_output(std::string name) { - auto output = wf::get_core().output_layout->find_output(name); + auto layout = wf::get_core().output_layout.get(); + + // First try normal connector name (DP-1, HDMI-A-1, etc.) + auto output = layout->find_output(name); + + // If not found, try make + model if (!output) { - return; + for (auto wo : layout->get_outputs()) + { + if (!wo || !wo->handle) + continue; + + std::string make = wo->handle->make ? wo->handle->make : ""; + std::string model = wo->handle->model ? wo->handle->model : ""; + std::string serial = wo->handle->serial ? wo->handle->serial : ""; + + LOGD("Output detected: connector=", wo->to_string(), + " make=", make, + " model=", model, + " serial=", serial); + + // Build identifiers + std::string make_model = make + " " + model; + + std::string full_id = make_model; + if (!serial.empty()) + { + full_id += " " + serial; + } + + // Match either full ID or shorter make+model + if (full_id == name || make_model == name) + { + output = wo; + break; + } + + } } - if (_view->parent) + if (!output) { + LOGW("window-rules: No matching output found for ", name); return; } + if (_view->parent) + return; + if (_view->get_output() == output) - { return; - } move_view_to_output(_view, output, true); } + std::tuple view_action_interface_t::_validate_ws( const std::vector& args) { From 3247ad99932bec011e60d7bfffd74028f08f2708 Mon Sep 17 00:00:00 2001 From: callmejoe Date: Fri, 13 Feb 2026 10:24:36 -0500 Subject: [PATCH 2/3] Apply uncrustify formatting --- .../window-rules/view-action-interface.cpp | 38 ++++++++++--------- uncrustify | 1 + 2 files changed, 22 insertions(+), 17 deletions(-) create mode 160000 uncrustify diff --git a/plugins/window-rules/view-action-interface.cpp b/plugins/window-rules/view-action-interface.cpp index d65d56a41..43196226c 100644 --- a/plugins/window-rules/view-action-interface.cpp +++ b/plugins/window-rules/view-action-interface.cpp @@ -536,33 +536,34 @@ void view_action_interface_t::_start_on_output(std::string name) for (auto wo : layout->get_outputs()) { if (!wo || !wo->handle) + { continue; + } - std::string make = wo->handle->make ? wo->handle->make : ""; - std::string model = wo->handle->model ? wo->handle->model : ""; - std::string serial = wo->handle->serial ? wo->handle->serial : ""; + std::string make = wo->handle->make ? wo->handle->make : ""; + std::string model = wo->handle->model ? wo->handle->model : ""; + std::string serial = wo->handle->serial ? wo->handle->serial : ""; - LOGD("Output detected: connector=", wo->to_string(), + LOGD("Output detected: connector=", wo->to_string(), " make=", make, " model=", model, " serial=", serial); - // Build identifiers - std::string make_model = make + " " + model; + // Build identifiers + std::string make_model = make + " " + model; - std::string full_id = make_model; - if (!serial.empty()) - { - full_id += " " + serial; - } + std::string full_id = make_model; + if (!serial.empty()) + { + full_id += " " + serial; + } - // Match either full ID or shorter make+model - if (full_id == name || make_model == name) - { + // Match either full ID or shorter make+model + if ((full_id == name) || (make_model == name)) + { output = wo; break; - } - + } } } @@ -573,15 +574,18 @@ void view_action_interface_t::_start_on_output(std::string name) } if (_view->parent) + { return; + } if (_view->get_output() == output) + { return; + } move_view_to_output(_view, output, true); } - std::tuple view_action_interface_t::_validate_ws( const std::vector& args) { diff --git a/uncrustify b/uncrustify new file mode 160000 index 000000000..968c2132d --- /dev/null +++ b/uncrustify @@ -0,0 +1 @@ +Subproject commit 968c2132de0e44f9c99f38378a24a40ca5362212 From 0d501dd1399930f68d6a651f9b29f1fe8b9df22f Mon Sep 17 00:00:00 2001 From: callmejoe Date: Fri, 13 Feb 2026 10:29:31 -0500 Subject: [PATCH 3/3] Remove accidentally added uncrustify submodule --- uncrustify | 1 - 1 file changed, 1 deletion(-) delete mode 160000 uncrustify diff --git a/uncrustify b/uncrustify deleted file mode 160000 index 968c2132d..000000000 --- a/uncrustify +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 968c2132de0e44f9c99f38378a24a40ca5362212