mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 00:25:59 +01:00
Inhibit fixes
This commit is contained in:
parent
8e14f3a08d
commit
7ae87a233c
4 changed files with 14 additions and 2 deletions
|
@ -367,6 +367,11 @@ SMonitor* CCompositor::getMonitorFromOutput(wlr_output* out) {
|
|||
|
||||
void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||
|
||||
if (g_pCompositor->m_sSeat.exclusiveClient) {
|
||||
Debug::log(LOG, "Disallowing setting focus to a window due to there being an active input inhibitor layer.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pWindow || !windowValidMapped(pWindow)) {
|
||||
wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat);
|
||||
return;
|
||||
|
@ -394,6 +399,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
|||
}
|
||||
|
||||
void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
|
||||
|
||||
if (m_sSeat.seat->keyboard_state.focused_surface == pSurface || (pWindowOwner && m_sSeat.seat->keyboard_state.focused_surface == g_pXWaylandManager->getWindowSurface(pWindowOwner)))
|
||||
return; // Don't focus when already focused on this.
|
||||
|
||||
|
|
|
@ -143,7 +143,8 @@ void Events::listener_commitDragIcon(void* owner, void* data) {
|
|||
|
||||
void Events::listener_InhibitActivate(wl_listener* listener, void* data) {
|
||||
Debug::log(LOG, "Activated exclusive for %x.", g_pCompositor->m_sSeat.exclusiveClient);
|
||||
|
||||
|
||||
g_pInputManager->refocus();
|
||||
g_pCompositor->m_sSeat.exclusiveClient = g_pCompositor->m_sWLRInhibitMgr->active_client;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
|||
|
||||
// first, we check if the workspace doesnt have a fullscreen window
|
||||
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
|
||||
if (PWORKSPACE->m_bHasFullscreenWindow) {
|
||||
if (PWORKSPACE->m_bHasFullscreenWindow && !foundSurface) {
|
||||
pFoundWindow = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
|
||||
|
||||
for (auto w = g_pCompositor->m_lWindows.rbegin(); w != g_pCompositor->m_lWindows.rend(); ++w) {
|
||||
|
|
|
@ -32,6 +32,11 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const xkb_keysym_t
|
|||
if (handleInternalKeybinds(key))
|
||||
return true;
|
||||
|
||||
if (g_pCompositor->m_sSeat.exclusiveClient){
|
||||
Debug::log(LOG, "Not handling keybinds due to there being an exclusive inhibited client.");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto& k : m_dKeybinds) {
|
||||
if (modmask != k.modmask)
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue