mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-25 22:35:58 +01:00
Do not delete windows on unmap
This commit is contained in:
parent
940dca6c0a
commit
09fbb1e41a
1 changed files with 4 additions and 10 deletions
|
@ -151,23 +151,17 @@ void Events::eventUnmapWindow(xcb_generic_event_t* event) {
|
|||
|
||||
RETURNIFBAR;
|
||||
|
||||
Debug::log(LOG, "Unmap called on " + std::to_string(E->window));
|
||||
|
||||
const auto PCLOSEDWINDOW = g_pWindowManager->getWindowFromDrawable(E->window);
|
||||
|
||||
if (!PCLOSEDWINDOW)
|
||||
if (!PCLOSEDWINDOW) {
|
||||
Debug::log(LOG, "Unmap called on an invalid window: " + std::to_string(E->window));
|
||||
return; // bullshit window?
|
||||
}
|
||||
|
||||
if (PCLOSEDWINDOW->getIsFloating())
|
||||
g_pWindowManager->moveWindowToUnmapped(E->window); // If it's floating, just unmap it.
|
||||
else
|
||||
g_pWindowManager->closeWindowAllChecks(E->window);
|
||||
Debug::log(LOG, "Unmap called on " + std::to_string(E->window) + " -> " + PCLOSEDWINDOW->getName());
|
||||
|
||||
// refocus on new window
|
||||
g_pWindowManager->refocusWindowOnClosed();
|
||||
|
||||
// EWMH
|
||||
EWMH::updateClientList();
|
||||
}
|
||||
|
||||
CWindow* Events::remapFloatingWindow(int windowID, int forcemonitor) {
|
||||
|
|
Loading…
Reference in a new issue