bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35062: [PATCH 3/4] min_cols/rows is always 0, don't check for it


From: Konstantin Kharlamov
Subject: bug#35062: [PATCH 3/4] min_cols/rows is always 0, don't check for it
Date: Tue, 02 Apr 2019 03:09:14 +0300



В Пн, апр 1, 2019 at 18:37, Noam Postavsky <address@hidden> написал:
Konstantin Kharlamov <address@hidden> writes:

 * src/gtkutil.c: remove unnecessary comparison

@@ -1401,7 +1401,7 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)

 -  int min_rows = 0, min_cols = 0;
 +  const int min_rows = 0, min_cols = 0;

- if (min_cols > 0) --min_cols; /* We used one col in base_width = ... 1); */ - if (min_rows > 0) --min_rows; /* We used one row in base_height = ... 1); */
 -
    size_hints.base_width = base_width;
    size_hints.base_height = base_height;
size_hints.min_width = base_width + min_cols * FRAME_COLUMN_WIDTH (f);

If min_cols is always 0, then what use is the
    "+ min_cols * FRAME_COLUMN_WIDTH (f)"?

(and a similar question arises for min_cols and min_rows in
update_wm_hints of widget.c)

Good point. I did some digging in git-log/git-blame: once upon a time there was a check_frame_size (f, &min_cols, &min_rows, 0) call. Then in commit 3477e27021dbe9366c3c1aaba80feb72f1138b29 for some reason this call was removed. Reason is unclear because the description only says multiple times "remove check_frame_size", and the commit itself is so *GIGANTIC* that when I held PgDown, it took me 9 seconds just to scroll it to the bottom on a 1366×768 display. But the commit is dated by 2014, so given it's still there, let's hope it's correct.

Then I guess, it makes sense to remove the multiplication by zero, because it's a noop anyway. I gonna make changes in gtkutil.c in some minutes, but what do I do with widget.c? Do I just send the patch here? I'm asking because Emacs has unusual workflow regarding patches sending. E.g. in other mailing-list based projects I'd just resend the series. In gitlab/github it's much simpler: I just push the new commit. But in Emacs one has to create a debbugs report, then send patches there; and I already have this "report" so I'm confused.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]