struct rectangle allocation;
struct winsize ws;
- if (width < 1)
- width = 1;
- if (height < 1)
- height = 1;
if (terminal->width == width && terminal->height == height)
return;
struct terminal *terminal = data;
int32_t columns, rows, m;
- if (width < 200)
- width = 200;
-
- if (height < 50)
- height = 50;
-
m = 2 * terminal->margin;
columns = (width - m) / (int32_t) terminal->extents.max_x_advance;
rows = (height - m) / (int32_t) terminal->extents.height;
cairo_destroy(cr);
cairo_surface_destroy(surface);
+ terminal_resize(terminal, 20, 5); /* Set minimum size first */
terminal_resize(terminal, 80, 25);
wl_list_insert(terminal_list.prev, &terminal->link);
struct wl_region *opaque_region;
char *title;
struct rectangle allocation, saved_allocation, server_allocation;
+ struct rectangle min_allocation;
struct rectangle pending_allocation;
int x, y;
int resize_edges;
window->pending_allocation.width = width;
window->pending_allocation.height = height;
+ if (window->min_allocation.width == 0)
+ window->min_allocation = window->pending_allocation;
+ if (window->pending_allocation.width < window->min_allocation.width)
+ window->pending_allocation.width = window->min_allocation.width;
+ if (window->pending_allocation.height < window->min_allocation.height)
+ window->pending_allocation.height = window->min_allocation.height;
+
window->resize_needed = 1;
window_schedule_redraw(window);
}