aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11.c')
-rw-r--r--src/x11.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/x11.c b/src/x11.c
index 6ac7b90..57dbea5 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -303,8 +303,8 @@ puglRealize(PuglView* const view)
}
// Set the size to the default if it has not already been set
- if (view->frame.width == 0.0 && view->frame.height == 0.0) {
- if (view->defaultWidth == 0.0 || view->defaultHeight == 0.0) {
+ if (view->frame.width <= 0.0 && view->frame.height <= 0.0) {
+ if (view->defaultWidth <= 0.0 || view->defaultHeight <= 0.0) {
return PUGL_BAD_CONFIGURATION;
}
@@ -313,7 +313,7 @@ puglRealize(PuglView* const view)
}
// Center top-level windows if a position has not been set
- if (!view->parent && view->frame.x == 0.0 && view->frame.y == 0.0) {
+ if (!view->parent && view->frame.x <= 0.0 && view->frame.y <= 0.0) {
const int screenWidth = DisplayWidth(display, screen);
const int screenHeight = DisplayHeight(display, screen);