mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 13:35:57 +01:00
revert bullshit windows, apparently some apps create those...
This commit is contained in:
parent
a7f53b5dfa
commit
36b89e7152
1 changed files with 4 additions and 13 deletions
|
@ -100,19 +100,6 @@ CWindow* Events::remapFloatingWindow(int windowID) {
|
|||
|
||||
CWindow* Events::remapWindow(int windowID, bool wasfloating) {
|
||||
// Do the setup of the window's params and stuf
|
||||
|
||||
// For all floating windows, get their default size
|
||||
const auto GEOMETRYCOOKIE = xcb_get_geometry(g_pWindowManager->DisplayConnection, windowID);
|
||||
const auto GEOMETRY = xcb_get_geometry_reply(g_pWindowManager->DisplayConnection, GEOMETRYCOOKIE, 0);
|
||||
|
||||
if (GEOMETRY) {
|
||||
// Check if the window isn't bullshit.
|
||||
if (GEOMETRY->width < 2 || GEOMETRY->height < 2) {
|
||||
// Bullshit window. set to floating.
|
||||
return Events::remapFloatingWindow(windowID);
|
||||
}
|
||||
}
|
||||
|
||||
CWindow window;
|
||||
window.setDrawable(windowID);
|
||||
window.setIsFloating(false);
|
||||
|
@ -125,6 +112,10 @@ CWindow* Events::remapWindow(int windowID, bool wasfloating) {
|
|||
window.setWorkspaceID(g_pWindowManager->activeWorkspaces[CURRENTSCREEN]);
|
||||
window.setMonitor(CURRENTSCREEN);
|
||||
|
||||
// For all floating windows, get their default size
|
||||
const auto GEOMETRYCOOKIE = xcb_get_geometry(g_pWindowManager->DisplayConnection, windowID);
|
||||
const auto GEOMETRY = xcb_get_geometry_reply(g_pWindowManager->DisplayConnection, GEOMETRYCOOKIE, 0);
|
||||
|
||||
if (GEOMETRY) {
|
||||
window.setDefaultPosition(Vector2D(GEOMETRY->x, GEOMETRY->y));
|
||||
window.setDefaultSize(Vector2D(GEOMETRY->width, GEOMETRY->height));
|
||||
|
|
Loading…
Reference in a new issue