From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Ship Mints <shipmints@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 74750@debbugs.gnu.org
Subject: bug#74750: clone-frame and make-frame pixelwise issues
Date: Sat, 14 Dec 2024 09:27:04 +0100 [thread overview]
Message-ID: <1ed054fc-4b82-47cf-8d89-4768b56b88a7@gmx.at> (raw)
In-Reply-To: <CAN+1Hbq74abEhFnXxffc9Y=5oNsQNNo+AZJGcef9P6YR1DTMuA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
> Indeed 15 is the vertical scroll bar width. This was what I reported in the
> original bug submission. You suggested a patch that would accommodate
> fringes, et.al. If you'd like me to make adjustments; e.g., resizing
> fringes or whatever, happy to do it and rerun.
I've been throwing out the child with the bathwater. Please try the
attached patch which retains an important conjunct.
> These are all ostensively calls to clone-frame. I'd expect, as I guess most
> people would, that cloning produces the precise geometry of the originating
> frame, scroll bar or not.
The major purpose of 'frame-inhibit-implied-resize' is to avoid resizes
when a frame has been tailored to fit into some arrangement of windows
on the display as, for example, with a tiling window manager. Here I
hardly ever use it. By design, it should have no effect when making a
new frame which is what the corrected patch should support. Still, it
might not work for elements like the external tool bar.
>> We can try to make it behave reasonably when
>> these values change but I am not sure whether we will succeed.
>>
>
> Let's try.
Let's.
martin
[-- Attachment #2: make-frame.diff --]
[-- Type: text/x-patch, Size: 2909 bytes --]
diff --git a/src/frame.c b/src/frame.c
index f6053fca3ef..f22bd501a8d 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -158,20 +158,16 @@ get_frame_param (struct frame *frame, Lisp_Object prop)
frame_inhibit_resize (struct frame *f, bool horizontal, Lisp_Object parameter)
{
Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
- bool inhibit
- = (f->after_make_frame
- ? (EQ (frame_inhibit_implied_resize, Qt)
- || (CONSP (frame_inhibit_implied_resize)
- && !NILP (Fmemq (parameter, frame_inhibit_implied_resize)))
- || (horizontal
- && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight))
- || (!horizontal
- && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth))
- || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
- : ((horizontal && f->inhibit_horizontal_resize)
- || (!horizontal && f->inhibit_vertical_resize)));
- return inhibit;
+ return (f->after_make_frame
+ && (EQ (frame_inhibit_implied_resize, Qt)
+ || (CONSP (frame_inhibit_implied_resize)
+ && !NILP (Fmemq (parameter, frame_inhibit_implied_resize)))
+ || (horizontal
+ && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight))
+ || (!horizontal
+ && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth))
+ || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)));
}
@@ -957,8 +953,6 @@ make_frame (bool mini_p)
f->garbaged = true;
f->can_set_window_size = false;
f->after_make_frame = false;
- f->inhibit_horizontal_resize = false;
- f->inhibit_vertical_resize = false;
f->tab_bar_redisplayed = false;
f->tab_bar_resized = false;
f->tool_bar_redisplayed = false;
@@ -3128,8 +3122,6 @@ DEFUN ("frame-after-make-frame",
{
struct frame *f = decode_live_frame (frame);
f->after_make_frame = !NILP (made);
- f->inhibit_horizontal_resize = false;
- f->inhibit_vertical_resize = false;
return made;
}
@@ -5918,7 +5910,6 @@ gui_figure_window_size (struct frame *f, Lisp_Object parms, bool tabbar_p,
xsignal1 (Qargs_out_of_range, XCDR (width));
text_width = XFIXNUM (XCDR (width));
- f->inhibit_horizontal_resize = true;
}
else if (FLOATP (width))
{
@@ -5954,7 +5945,6 @@ gui_figure_window_size (struct frame *f, Lisp_Object parms, bool tabbar_p,
xsignal1 (Qargs_out_of_range, XCDR (height));
text_height = XFIXNUM (XCDR (height));
- f->inhibit_vertical_resize = true;
}
else if (FLOATP (height))
{
diff --git a/src/frame.h b/src/frame.h
index 1d920d1a6bc..172eb5eca99 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -519,10 +519,6 @@ #define EMACS_FRAME_H
bool_bf tool_bar_redisplayed : 1;
bool_bf tool_bar_resized : 1;
- /* Inhibit implied resize before after_make_frame is set. */
- bool_bf inhibit_horizontal_resize : 1;
- bool_bf inhibit_vertical_resize : 1;
-
/* Non-zero if this frame's faces need to be recomputed. */
bool_bf face_change : 1;
next prev parent reply other threads:[~2024-12-14 8:27 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 15:51 bug#74750: clone-frame and make-frame pixelwise issues Ship Mints
2024-12-10 12:27 ` Eli Zaretskii
2024-12-10 15:56 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-10 16:24 ` Ship Mints
2024-12-11 9:37 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-11 22:41 ` Ship Mints
2024-12-12 6:05 ` Eli Zaretskii
2024-12-12 9:22 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-13 10:30 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-13 16:28 ` Ship Mints
2024-12-13 18:15 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-13 18:25 ` Ship Mints
2024-12-14 8:27 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-12-15 20:34 ` Ship Mints
2024-12-16 9:23 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 9:32 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 10:40 ` Ship Mints
2024-12-16 10:48 ` Ship Mints
2024-12-16 15:49 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 15:55 ` Ship Mints
2024-12-16 16:01 ` Ship Mints
2024-12-16 16:02 ` Ship Mints
2024-12-16 16:39 ` Ship Mints
2024-12-16 17:06 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 17:32 ` Eli Zaretskii
2024-12-16 17:51 ` Ship Mints
2024-12-16 19:10 ` Eli Zaretskii
2024-12-17 1:20 ` Ship Mints
2024-12-17 9:02 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-17 13:34 ` Eli Zaretskii
2024-12-16 19:13 ` Eli Zaretskii
2024-12-16 19:26 ` Ship Mints
2024-12-17 9:00 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-17 13:29 ` Eli Zaretskii
2024-12-18 10:05 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 16:07 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 16:41 ` Ship Mints
2024-12-16 17:06 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-16 16:07 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 15:39 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-22 12:04 ` Ship Mints
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ed054fc-4b82-47cf-8d89-4768b56b88a7@gmx.at \
--to=bug-gnu-emacs@gnu.org \
--cc=74750@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rudalics@gmx.at \
--cc=shipmints@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.