mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-26 06:45:58 +01:00
Added a min floating size on start
This commit is contained in:
parent
b169aca415
commit
dc017c49c5
1 changed files with 6 additions and 0 deletions
|
@ -119,6 +119,12 @@ CWindow* Events::remapFloatingWindow(int windowID, int forcemonitor) {
|
||||||
window.setDefaultSize(Vector2D(g_pWindowManager->Screen->width_in_pixels / 2.f, g_pWindowManager->Screen->height_in_pixels / 2.f));
|
window.setDefaultSize(Vector2D(g_pWindowManager->Screen->width_in_pixels / 2.f, g_pWindowManager->Screen->height_in_pixels / 2.f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window.getDefaultSize().x < 20 || window.getDefaultSize().y < 20) {
|
||||||
|
// min size
|
||||||
|
window.setDefaultSize(Vector2D( std::clamp(window.getDefaultSize().x, (double)20, (double)99999),
|
||||||
|
std::clamp(window.getDefaultSize().y, (double)20, (double)99999)));
|
||||||
|
}
|
||||||
|
|
||||||
if (nextWindowCentered) {
|
if (nextWindowCentered) {
|
||||||
nextWindowCentered = false;
|
nextWindowCentered = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue