compositor: Configurable behavior when window to be focused conflicts with fullscreen (#12033)
Renames `misc:new_window_takes_over_fullscreen` into `misc:on_focus_under_fullscreen` and implements the following behavior: - By default, when a tiling window is being focused on a workspace where a fullscreen/maximized window exists, respect the `misc:on_focus_under_fullscreen` config variable.
This commit is contained in:
parent
1c1746de61
commit
40d8fa8491
51 changed files with 1003 additions and 694 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include "../managers/HookSystemManager.hpp"
|
||||
#include "../render/Renderer.hpp"
|
||||
#include "../render/OpenGL.hpp"
|
||||
#include "../desktop/state/FocusState.hpp"
|
||||
#include "SeatManager.hpp"
|
||||
#include "../helpers/time/Time.hpp"
|
||||
#include <cstring>
|
||||
|
|
@ -799,7 +800,7 @@ void CPointerManager::warpAbsolute(Vector2D abs, SP<IHID> dev) {
|
|||
|
||||
auto outputMappedArea = [&mappedArea](const std::string& output) {
|
||||
if (output == "current") {
|
||||
if (const auto PLASTMONITOR = g_pCompositor->m_lastMonitor.lock(); PLASTMONITOR)
|
||||
if (const auto PLASTMONITOR = Desktop::focusState()->monitor(); PLASTMONITOR)
|
||||
return PLASTMONITOR->logicalBox();
|
||||
} else if (const auto PMONITOR = g_pCompositor->getMonitorFromString(output); PMONITOR)
|
||||
return PMONITOR->logicalBox();
|
||||
|
|
@ -927,7 +928,7 @@ void CPointerManager::attachPointer(SP<IPointer> pointer) {
|
|||
listener->frame = pointer->m_pointerEvents.frame.listen([] {
|
||||
bool shouldSkip = false;
|
||||
if (!g_pSeatManager->m_mouse.expired() && g_pInputManager->isLocked()) {
|
||||
auto PMONITOR = g_pCompositor->m_lastMonitor.get();
|
||||
auto PMONITOR = Desktop::focusState()->monitor().get();
|
||||
shouldSkip = PMONITOR && PMONITOR->shouldSkipScheduleFrameOnMouseEvent();
|
||||
}
|
||||
g_pSeatManager->m_isPointerFrameSkipped = shouldSkip;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue