mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 14:45:59 +01:00
foreign-toplevel: bypass no activate focus checks
ref #5939 those are used by focus switchers so they should bypass stuff like focus_on_activate = false
This commit is contained in:
parent
57a12476de
commit
5e7925eaeb
3 changed files with 6 additions and 7 deletions
|
@ -1274,7 +1274,7 @@ std::unordered_map<std::string, std::string> CWindow::getEnv() {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWindow::activate() {
|
void CWindow::activate(bool force) {
|
||||||
static auto PFOCUSONACTIVATE = CConfigValue<Hyprlang::INT>("misc:focus_on_activate");
|
static auto PFOCUSONACTIVATE = CConfigValue<Hyprlang::INT>("misc:focus_on_activate");
|
||||||
|
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"urgent", std::format("{:x}", (uintptr_t)this)});
|
g_pEventManager->postEvent(SHyprIPCEvent{"urgent", std::format("{:x}", (uintptr_t)this)});
|
||||||
|
@ -1282,7 +1282,7 @@ void CWindow::activate() {
|
||||||
|
|
||||||
m_bIsUrgent = true;
|
m_bIsUrgent = true;
|
||||||
|
|
||||||
if (!*PFOCUSONACTIVATE || (m_eSuppressedEvents & SUPPRESS_ACTIVATE_FOCUSONLY) || (m_eSuppressedEvents & SUPPRESS_ACTIVATE))
|
if (!force && (!*PFOCUSONACTIVATE || (m_eSuppressedEvents & SUPPRESS_ACTIVATE_FOCUSONLY) || (m_eSuppressedEvents & SUPPRESS_ACTIVATE)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_bIsFloating)
|
if (m_bIsFloating)
|
||||||
|
|
|
@ -422,7 +422,7 @@ class CWindow {
|
||||||
bool visibleOnMonitor(CMonitor* pMonitor);
|
bool visibleOnMonitor(CMonitor* pMonitor);
|
||||||
int workspaceID();
|
int workspaceID();
|
||||||
bool onSpecialWorkspace();
|
bool onSpecialWorkspace();
|
||||||
void activate();
|
void activate(bool force = false);
|
||||||
|
|
||||||
int getRealBorderSize();
|
int getRealBorderSize();
|
||||||
void updateSpecialRenderData();
|
void updateSpecialRenderData();
|
||||||
|
|
|
@ -17,10 +17,9 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHand
|
||||||
if (!PWINDOW)
|
if (!PWINDOW)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (PWINDOW->m_eSuppressedEvents & SUPPRESS_ACTIVATE)
|
// these requests bypass the config'd stuff cuz it's usually like
|
||||||
return;
|
// window switchers and shit
|
||||||
|
PWINDOW->activate(true);
|
||||||
PWINDOW->activate();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
resource->setSetFullscreen([this](CZwlrForeignToplevelHandleV1* p, wl_resource* output) {
|
resource->setSetFullscreen([this](CZwlrForeignToplevelHandleV1* p, wl_resource* output) {
|
||||||
|
|
Loading…
Reference in a new issue