mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 05:25:58 +01:00
Revert "give bullshit windows 500ms to unbullshit themselves before unmanaging"
This reverts commit e886d957d9
.
This commit is contained in:
parent
154cf2ff01
commit
95d0e67f5c
5 changed files with 14 additions and 27 deletions
|
@ -175,6 +175,11 @@ CWindow* Events::remapFloatingWindow(int windowID, int forcemonitor) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (PWINDOWINARR->getClassName() == "") {
|
||||
Debug::log(WARN, "remapFloatingWindow with Error, not managing.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PWINDOWINARR->setIsFloating(true);
|
||||
PWINDOWINARR->setDirty(true);
|
||||
|
||||
|
@ -416,6 +421,12 @@ CWindow* Events::remapWindow(int windowID, bool wasfloating, int forcemonitor) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (PWINDOWINARR->getClassName() == "Error") {
|
||||
Debug::log(LOG, "Class error -> we wont manage this.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
PWINDOWINARR->setIsFloating(false);
|
||||
PWINDOWINARR->setDirty(true);
|
||||
|
||||
|
@ -624,8 +635,8 @@ void Events::eventMapWindow(xcb_generic_event_t* event) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!pNewWindow) {
|
||||
Debug::log(LOG, "Removing, NULLPTR.");
|
||||
if (!pNewWindow || pNewWindow->getClassName() == "") {
|
||||
Debug::log(LOG, "Removing, NULL.");
|
||||
g_pWindowManager->removeWindowFromVectorSafe(E->window);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#include "window.hpp"
|
||||
#include "windowManager.hpp"
|
||||
|
||||
CWindow::CWindow() { this->setRealBorderColor(0); this->setEffectiveBorderColor(0); this->setFirstOpen(true); this->setConstructed(false); this->setTransient(false); this->setLastUpdatePosition(Vector2D(0,0)); this->setLastUpdateSize(Vector2D(0,0)); this->setDock(false); this->setUnderFullscreen(false); this->setIsSleeping(true); this->setFirstAnimFrame(true); this->setIsAnimated(false); this->setDead(false); this->setMasterChildIndex(0); this->setMaster(false); this->setCanKill(false); this->setImmovable(false); this->setNoInterventions(false); this->setDirty(true); this->setFullscreen(false); this->setIsFloating(false); this->setParentNodeID(0); this->setChildNodeAID(0); this->setChildNodeBID(0); this->setName("");
|
||||
this->m_tOpenTimestamp = std::chrono::high_resolution_clock::now(); }
|
||||
CWindow::CWindow() { this->setRealBorderColor(0); this->setEffectiveBorderColor(0); this->setFirstOpen(true); this->setConstructed(false); this->setTransient(false); this->setLastUpdatePosition(Vector2D(0,0)); this->setLastUpdateSize(Vector2D(0,0)); this->setDock(false); this->setUnderFullscreen(false); this->setIsSleeping(true); this->setFirstAnimFrame(true); this->setIsAnimated(false); this->setDead(false); this->setMasterChildIndex(0); this->setMaster(false); this->setCanKill(false); this->setImmovable(false); this->setNoInterventions(false); this->setDirty(true); this->setFullscreen(false); this->setIsFloating(false); this->setParentNodeID(0); this->setChildNodeAID(0); this->setChildNodeBID(0); this->setName(""); }
|
||||
CWindow::~CWindow() { }
|
||||
|
||||
void CWindow::generateNodeID() {
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "defines.hpp"
|
||||
#include "utilities/Workspace.hpp"
|
||||
#include "utilities/Util.hpp"
|
||||
#include <chrono>
|
||||
|
||||
class CWindow {
|
||||
public:
|
||||
|
@ -39,7 +38,6 @@ public:
|
|||
EXPOSED_MEMBER(RoleName, std::string, sz);
|
||||
EXPOSED_MEMBER(Constructed, bool, b);
|
||||
EXPOSED_MEMBER(FirstOpen, bool, b);
|
||||
EXPOSED_MEMBER(OpenTimestamp, std::chrono::high_resolution_clock::time_point, t);
|
||||
|
||||
// Tells the window manager to reload the window's params
|
||||
EXPOSED_MEMBER(Dirty, bool, b);
|
||||
|
|
|
@ -2280,23 +2280,3 @@ void CWindowManager::dispatchQueuedWarp() {
|
|||
warpCursorTo(QueuedPointerWarp);
|
||||
QueuedPointerWarp = Vector2D(-1,-1);
|
||||
}
|
||||
|
||||
void CWindowManager::unmanageUnnamedWindows() {
|
||||
std::deque<int64_t> toRemove;
|
||||
|
||||
for (auto& w : windows) {
|
||||
|
||||
if (w.getClassName() == "Error" || w.getClassName() == "") {
|
||||
const auto DELTA = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - w.getOpenTimestamp()).count();
|
||||
|
||||
if (DELTA > 500) {
|
||||
Debug::log(LOG, "Class error after 500ms -> we wont manage this.");
|
||||
toRemove.push_back(w.getDrawable());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& wid : toRemove) {
|
||||
closeWindowAllChecks(wid);
|
||||
}
|
||||
}
|
|
@ -164,7 +164,6 @@ private:
|
|||
void focusOnWorkspace(const int&);
|
||||
void dispatchQueuedWarp();
|
||||
CWindow* getMasterForWorkspace(const int&);
|
||||
void unmanageUnnamedWindows();
|
||||
};
|
||||
|
||||
inline std::unique_ptr<CWindowManager> g_pWindowManager = std::make_unique<CWindowManager>();
|
||||
|
|
Loading…
Reference in a new issue