mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix tab bars with multiple monitors
This commit is contained in:
parent
90b50d5b1a
commit
8e69c390c7
2 changed files with 6 additions and 5 deletions
|
@ -1618,14 +1618,15 @@ void Hy3Layout::renderHook(void*, std::any data) {
|
|||
auto& tab_groups = g_Hy3Layout->tab_groups;
|
||||
auto entry = tab_groups.begin();
|
||||
while (entry != tab_groups.end()) {
|
||||
if (std::find(rendered_groups.begin(), rendered_groups.end(), &*entry) == rendered_groups.end()) {
|
||||
if (entry->target_window->m_iMonitorID == g_pHyprOpenGL->m_RenderData.pMonitor->ID
|
||||
&& std::find(rendered_groups.begin(), rendered_groups.end(), &*entry) == rendered_groups.end()
|
||||
) {
|
||||
entry->renderTabBar();
|
||||
if (entry->bar.destroy) tab_groups.erase(entry++);
|
||||
}
|
||||
|
||||
entry = std::next(entry);
|
||||
}
|
||||
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -288,7 +288,7 @@ void Hy3TabGroup::renderTabBar() {
|
|||
auto* monitor = g_pHyprOpenGL->m_RenderData.pMonitor;
|
||||
auto scale = monitor->scale;
|
||||
|
||||
auto pos = this->pos.vec();
|
||||
auto pos = this->pos.vec() - monitor->vecPosition;
|
||||
auto size = this->size.vec();
|
||||
pos.y += (this->bar.vertical_pos.fl() * size.y) * (*enter_from_top ? -1 : 1);
|
||||
|
||||
|
@ -331,7 +331,7 @@ void Hy3TabGroup::renderTabBar() {
|
|||
for (auto* window: this->stencil_windows) {
|
||||
if (!g_pCompositor->windowExists(window)) continue;
|
||||
|
||||
auto wpos = window->m_vRealPosition.vec();
|
||||
auto wpos = window->m_vRealPosition.vec() - monitor->vecPosition;
|
||||
auto wsize = window->m_vRealSize.vec();
|
||||
|
||||
wlr_box window_box = { wpos.x, wpos.y, wsize.x, wsize.y };
|
||||
|
|
Loading…
Add table
Reference in a new issue