@@ -1100,25 +1100,30 @@ _meta_window_shared_new (MetaDisplay *display,
11001100 /* avoid tons of stack updates */
11011101 meta_stack_freeze (window -> display -> stack );
11021102
1103- window -> rect .x = attrs -> x ;
1104- window -> rect .y = attrs -> y ;
1105- window -> rect .width = attrs -> width ;
1106- window -> rect .height = attrs -> height ;
1107-
1108- /* size_hints are the "request" */
1109- window -> size_hints .x = attrs -> x ;
1110- window -> size_hints .y = attrs -> y ;
1111- window -> size_hints .width = attrs -> width ;
1112- window -> size_hints .height = attrs -> height ;
1113- /* initialize the remaining size_hints as if size_hints.flags were zero */
1114- meta_set_normal_hints (window , NULL );
1115-
1116- /* And this is our unmaximized size */
1117- window -> saved_rect = window -> rect ;
1118- window -> unconstrained_rect = window -> rect ;
1119-
1120- window -> depth = attrs -> depth ;
1121- window -> xvisual = attrs -> visual ;
1103+ if (attrs -> width != 1 &&
1104+ attrs -> height != 1 )
1105+ {
1106+ window -> rect .x = attrs -> x ;
1107+ window -> rect .y = attrs -> y ;
1108+ window -> rect .width = attrs -> width ;
1109+ window -> rect .height = attrs -> height ;
1110+
1111+ /* size_hints are the "request" */
1112+ window -> size_hints .x = attrs -> x ;
1113+ window -> size_hints .y = attrs -> y ;
1114+ window -> size_hints .width = attrs -> width ;
1115+ window -> size_hints .height = attrs -> height ;
1116+
1117+ /* initialize the remaining size_hints as if size_hints.flags were zero */
1118+ meta_set_normal_hints (window , NULL );
1119+
1120+ /* And this is our unmaximized size */
1121+ window -> saved_rect = window -> rect ;
1122+ window -> unconstrained_rect = window -> rect ;
1123+
1124+ window -> depth = attrs -> depth ;
1125+ window -> xvisual = attrs -> visual ;
1126+ }
11221127
11231128 window -> title = NULL ;
11241129 window -> icon = NULL ;
0 commit comments