Skip to content

Commit

Permalink
do not change z order if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
UjinT34 committed Jul 17, 2024
1 parent f412e11 commit 05de4f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Compositor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "Compositor.hpp"
#include "debug/Log.hpp"
#include "helpers/Splashes.hpp"
#include "config/ConfigValue.hpp"
#include "managers/CursorManager.hpp"
Expand Down Expand Up @@ -1278,6 +1279,9 @@ void CCompositor::changeWindowZOrder(PHLWINDOW pWindow, bool top) {
if (!validMapped(pWindow))
return;

if (pWindow == (top ? m_vWindows.back() : m_vWindows.front()))
return;

auto moveToZ = [&](PHLWINDOW pw, bool top) -> void {
if (top) {
for (auto it = m_vWindows.begin(); it != m_vWindows.end(); ++it) {
Expand Down

0 comments on commit 05de4f3

Please sign in to comment.