diff --git a/src/core/window.c b/src/core/window.c index 4edee7b75..3739518e1 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -1100,25 +1100,30 @@ _meta_window_shared_new (MetaDisplay *display, /* avoid tons of stack updates */ meta_stack_freeze (window->display->stack); - window->rect.x = attrs->x; - window->rect.y = attrs->y; - window->rect.width = attrs->width; - window->rect.height = attrs->height; - - /* size_hints are the "request" */ - window->size_hints.x = attrs->x; - window->size_hints.y = attrs->y; - window->size_hints.width = attrs->width; - window->size_hints.height = attrs->height; - /* initialize the remaining size_hints as if size_hints.flags were zero */ - meta_set_normal_hints (window, NULL); - - /* And this is our unmaximized size */ - window->saved_rect = window->rect; - window->unconstrained_rect = window->rect; - - window->depth = attrs->depth; - window->xvisual = attrs->visual; + if (attrs->width != 1 && + attrs->height != 1) + { + window->rect.x = attrs->x; + window->rect.y = attrs->y; + window->rect.width = attrs->width; + window->rect.height = attrs->height; + + /* size_hints are the "request" */ + window->size_hints.x = attrs->x; + window->size_hints.y = attrs->y; + window->size_hints.width = attrs->width; + window->size_hints.height = attrs->height; + + /* initialize the remaining size_hints as if size_hints.flags were zero */ + meta_set_normal_hints (window, NULL); + + /* And this is our unmaximized size */ + window->saved_rect = window->rect; + window->unconstrained_rect = window->rect; + + window->depth = attrs->depth; + window->xvisual = attrs->visual; + } window->title = NULL; window->icon = NULL; diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 4c3d4054b..28460ff55 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -3817,10 +3817,14 @@ meta_window_x11_configure_notify (MetaWindow *window, g_assert (window->override_redirect); g_assert (window->frame == NULL); - window->rect.x = event->x; - window->rect.y = event->y; - window->rect.width = event->width; - window->rect.height = event->height; + if (event->width != 1 && + event->height != 1) + { + window->rect.x = event->x; + window->rect.y = event->y; + window->rect.width = event->width; + window->rect.height = event->height; + } priv->client_rect = window->rect; window->buffer_rect = window->rect;