w = ec->w, h = ec->h;
}
else
- w = h = 0;
+ {
+ // Width and Height are -1 means that we don't consider size value
+ w = h = -1;
+ }
ec->comp_data->shell.configure_send(ec->comp_data->shell.surface,
edges * e_comp_wl->resize.edges,
&states);
wl_array_release(&states);
+
+ // clear toplevel's pending size
+ toplevel->pending.size.w = 0;
+ toplevel->pending.size.h = 0;
+
return;
err:
toplevel->pending.state.maximized = !!ec->maximized;
toplevel->pending.state.resizing = !!edges;
toplevel->pending.edges = edges;
- toplevel->pending.size.w = width;
- toplevel->pending.size.h = height;
+ if ((width != -1) && (height != -1))
+ {
+ /* NOTE:
+ * Width and Height are -1 means that the configure event doesn't consider size value.
+ * So, we update pending size if the size are not -1.
+ */
+ toplevel->pending.size.w = width;
+ toplevel->pending.size.h = height;
+ }
if ((toplevel->pending.state.maximized) ||
(toplevel->pending.state.fullscreen))