mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-26 06:45:58 +01:00
fixed a fatal error with default floating windows
This commit is contained in:
parent
36b89e7152
commit
a92ec9a44e
2 changed files with 5 additions and 2 deletions
|
@ -84,7 +84,7 @@ CWindow* Events::remapFloatingWindow(int windowID) {
|
|||
// Add to arr
|
||||
g_pWindowManager->addWindowToVectorSafe(window);
|
||||
|
||||
Debug::log(LOG, "Created a new window! X: " + std::to_string(window.getPosition().x) + ", Y: " + std::to_string(window.getPosition().y) + ", W: " + std::to_string(window.getSize().x) + ", H:" + std::to_string(window.getSize().y) + " ID: " + std::to_string(windowID));
|
||||
Debug::log(LOG, "Created a new floating window! X: " + std::to_string(window.getPosition().x) + ", Y: " + std::to_string(window.getPosition().y) + ", W: " + std::to_string(window.getSize().x) + ", H:" + std::to_string(window.getSize().y) + " ID: " + std::to_string(windowID));
|
||||
|
||||
// Set map values
|
||||
g_pWindowManager->Values[0] = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_FOCUS_CHANGE;
|
||||
|
@ -183,7 +183,7 @@ CWindow* Events::remapWindow(int windowID, bool wasfloating) {
|
|||
// Add to arr
|
||||
g_pWindowManager->addWindowToVectorSafe(window);
|
||||
|
||||
Debug::log(LOG, "Created a new window! X: " + std::to_string(window.getPosition().x) + ", Y: " + std::to_string(window.getPosition().y) + ", W: " + std::to_string(window.getSize().x) + ", H:" + std::to_string(window.getSize().y) + " ID: " + std::to_string(windowID));
|
||||
Debug::log(LOG, "Created a new tiled window! X: " + std::to_string(window.getPosition().x) + ", Y: " + std::to_string(window.getPosition().y) + ", W: " + std::to_string(window.getSize().x) + ", H:" + std::to_string(window.getSize().y) + " ID: " + std::to_string(windowID));
|
||||
|
||||
// Set map values
|
||||
g_pWindowManager->Values[0] = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_FOCUS_CHANGE;
|
||||
|
|
|
@ -619,6 +619,9 @@ void CWindowManager::calculateNewFloatingWindow(CWindow* pWindow) {
|
|||
pWindow->setPosition(pWindow->getDefaultPosition());
|
||||
pWindow->setSize(pWindow->getDefaultSize());
|
||||
|
||||
pWindow->setEffectivePosition(pWindow->getDefaultPosition());
|
||||
pWindow->setEffectiveSize(pWindow->getDefaultSize());
|
||||
|
||||
Values[0] = XCB_STACK_MODE_ABOVE;
|
||||
xcb_configure_window(DisplayConnection, pWindow->getDrawable(), XCB_CONFIG_WINDOW_STACK_MODE, Values);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue