diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-11-07 17:36:34 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2013-11-07 17:36:34 +0100 |
commit | 671c25c36f9737f2ebab916c9de38bd0c9c88724 (patch) | |
tree | 1c7f0667c505103fa342d40536e5d971f40dc906 | |
parent | b61207757c3d5d4ba0a12d1bf5fc6af46ef51514 (diff) |
Add --snap-size parameter
If --snap-size is given, we enable resize snapping to next cell-size. If
not given, we take any size the user wants.
Disable it by default. It's annoying!
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r-- | src/wlterm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wlterm.c b/src/wlterm.c index 411b042..a20960c 100644 --- a/src/wlterm.c +++ b/src/wlterm.c @@ -73,6 +73,7 @@ struct term { }; static gboolean show_dirty; +static gboolean snap_size; static void err(const char *format, ...) { @@ -154,7 +155,7 @@ static void term_set_geometry(struct term *term) geometry.min_height = geometry.base_height; hints = GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE; - if (term->adjust_size) + if (snap_size && term->adjust_size) hints |= GDK_HINT_RESIZE_INC; gtk_window_set_geometry_hints(GTK_WINDOW(term->window), term->tarea, @@ -528,6 +529,7 @@ static void term_hide(struct term *term) static GOptionEntry opts[] = { { "show-dirty", 0, 0, G_OPTION_ARG_NONE, &show_dirty, "Mark dirty cells during redraw", NULL }, + { "snap-size", 0, 0, G_OPTION_ARG_NONE, &snap_size, "Snap to next cell-size when resizing", NULL }, { NULL } }; |