From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19972: 24.4; Font size change doesn't update (window-total-width) Date: Mon, 02 Mar 2015 16:04:59 +0200 Message-ID: <834mq3sdf8.fsf@gnu.org> References: <874mq5o3di.fsf@fastmail.fm> <54F32CDE.9080308@gmx.at> <83pp8sspn2.fsf@gnu.org> <87zj7wmysq.fsf@fastmail.fm> <83lhjgsj96.fsf@gnu.org> <87y4ngmoso.fsf@fastmail.fm> <83k2z0rs8o.fsf@gnu.org> <87d24srqw2.fsf@fastmail.fm> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1425305186 29255 80.91.229.3 (2 Mar 2015 14:06:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2015 14:06:26 +0000 (UTC) Cc: 19972@debbugs.gnu.org To: Joost Kremers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 02 15:06:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YSQz9-0001g7-7q for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Mar 2015 15:06:15 +0100 Original-Received: from localhost ([::1]:57256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSQz8-0004k1-Ht for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Mar 2015 09:06:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSQyz-0004dM-Ui for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2015 09:06:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSQyw-0004L0-Ii for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2015 09:06:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSQyw-0004JF-5u for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2015 09:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YSQyv-0002o1-KO for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2015 09:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Mar 2015 14:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19972 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19972-submit@debbugs.gnu.org id=B19972.142530512210724 (code B ref 19972); Mon, 02 Mar 2015 14:06:01 +0000 Original-Received: (at 19972) by debbugs.gnu.org; 2 Mar 2015 14:05:22 +0000 Original-Received: from localhost ([127.0.0.1]:33933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YSQyH-0002mr-7F for submit@debbugs.gnu.org; Mon, 02 Mar 2015 09:05:22 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:60936) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YSQyC-0002mY-RV for 19972@debbugs.gnu.org; Mon, 02 Mar 2015 09:05:18 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NKL0070089NK900@a-mtaout22.012.net.il> for 19972@debbugs.gnu.org; Mon, 02 Mar 2015 16:05:10 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NKL007VV8GL50B0@a-mtaout22.012.net.il>; Mon, 02 Mar 2015 16:05:10 +0200 (IST) In-reply-to: <87d24srqw2.fsf@fastmail.fm> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99953 Archived-At: > From: Joost Kremers > Cc: rudalics@gmx.at, 19972@debbugs.gnu.org > Date: Mon, 02 Mar 2015 04:59:25 +0100 > > > I asked about values returned by window-width in this scenario, can > > you provide them? > > Sorry, forgot that. `window-width' doesn't have the same issue. On my > system, with a maximised Emacs frame (Emacs version 25.0.50.1), it > returns 236 before `custom-push-theme' + `face-spec-recalc', and 188 > after it, even without doing `C-x 3' followed by `C-x 1'. In that case, I guess if you call (window-total-width 'round), you will see the correct value even before "C-x 3", right? Also, what does frame-total-cols return during your recipe? Martin, I show below a backtrace that explains how face-spec-recalc causes the frame to be resized, I hope this will help you see what's going on. My guess is that immediately after resizing the frame, as shown below in the backtrace, we get some X event from the window manager telling us to size the frame back, but we either don't interpret that event correctly, or delay its handling. This second resize doesn't happen on my system, so I cannot show more information about it. Joost, could you find out where does w->pixel_size change in your recipe (where 'w' is the pointer to the window displaying *scratch*)? If my guess is correct, it should change twice: once as shown below in the backtrace I produced, and then once more, where it changes back to the dimensions of your display. We are interested to know where is that second time, and who calls that code. One way of finding this out is to put a watchpoint in GDB on w->pixel_size. Let me know if you need more detailed instructions for how to do it. Here's the backtrace from the code that resizes the frame as result of face-spec-recalc: 0x0109bc93 in resize_frame_windows (f=0x17d7a30 , size=833, horflag=true, pixelwise=true) at window.c:4192 4192 r->pixel_width = new_pixel_size; (gdb) bt #0 0x0109bc93 in resize_frame_windows (f=0x17d7a30 , size=833, horflag=true, pixelwise=true) at window.c:4192 #1 0x01011f3e in adjust_frame_size (f=0x17d7a30 , new_width=800, new_height=700, inhibit=5, pretend=false, parameter=8064) at frame.c:524 #2 0x0100f0cc in change_frame_size_1 (f=0x17d7a30 , new_width=800, new_height=700, pretend=false, delay=false, safe=false, pixelwise=true) at dispnew.c:5501 #3 0x0100f12a in change_frame_size (f=0x17d7a30 , new_width=800, new_height=700, pretend=false, delay=false, safe=false, pixelwise=true) at dispnew.c:5533 #4 0x0100eeb8 in do_pending_window_change (safe=false) at dispnew.c:5459 #5 0x0123f29d in x_set_window_size (f=0x17d7a30 , change_gravity=false, width=800, height=700, pixelwise=true) at w32term.c:6194 #6 0x01011e7e in adjust_frame_size (f=0x17d7a30 , new_width=800, new_height=700, inhibit=3, pretend=false, parameter=14464) at frame.c:490 #7 0x0123e411 in x_new_font (f=0x17d7a30 , font_object=98909453, fontset=23) at w32term.c:5858 #8 0x0101b3b4 in x_set_font (f=0x17d7a30 , arg=101384204, oldval=98121716) at frame.c:3611 #9 0x01019339 in x_set_frame_parameters (f=0x17d7a30 , alist=0) at frame.c:3140 #10 0x010186e3 in Fmodify_frame_parameters (frame=25000501, alist=8969667) at frame.c:2663 #11 0x010fab62 in set_font_frame_param (frame=25000501, lface=25182821) at xfaces.c:3321 #12 0x010fa43c in Finternal_set_lisp_face_attribute (face=10592, attr=1792, value=514, frame=25000501) at xfaces.c:3135 #13 0x011a23f2 in Ffuncall (nargs=5, args=0x88df24) at eval.c:2729 #14 0x011e5ffb in exec_byte_code (bytestr=19792668, vector=19792685, maxdepth=30, args_template=0, nargs=0, args=0x0) at bytecode.c:919 #15 0x011a306d in funcall_lambda (fun=19792629, nargs=4, arg_vector=0x12e032d ) at eval.c:2951 #16 0x011a25dd in Ffuncall (nargs=5, args=0x88e250) at eval.c:2767 #17 0x011a182c in Fapply (nargs=4, args=0x88e388) at eval.c:2337 #18 0x011a2235 in Ffuncall (nargs=5, args=0x88e384) at eval.c:2698 #19 0x011e5ffb in exec_byte_code (bytestr=19801932, vector=19801949, maxdepth=26, args_template=0, nargs=0, args=0x0) at bytecode.c:919 #20 0x011a306d in funcall_lambda (fun=19801893, nargs=3, arg_vector=0x12e275d ) at eval.c:2951 #21 0x011a25dd in Ffuncall (nargs=4, args=0x88e6b4) at eval.c:2767 #22 0x011e5ffb in exec_byte_code (bytestr=19801788, vector=19801805, maxdepth=22, args_template=0, nargs=0, args=0x0) at bytecode.c:919 #23 0x011a306d in funcall_lambda (fun=19801765, nargs=2, arg_vector=0x12e26cd ) at eval.c:2951 #24 0x011a2918 in apply_lambda (fun=19801765, args=98601339, count=13) at eval.c:2826 #25 0x011a1118 in eval_sub (form=98601363) at eval.c:2226 #26 0x011a069d in Feval (form=98601363, lexical=0) at eval.c:1996 #27 0x011a2376 in Ffuncall (nargs=3, args=0x88eb9c) at eval.c:2721 #28 0x011e5ffb in exec_byte_code (bytestr=20304908, vector=20304925, maxdepth=22, args_template=1030, nargs=1, args=0x88eed0) at bytecode.c:919 #29 0x011a2c42 in funcall_lambda (fun=20304885, nargs=1, arg_vector=0x88eecc) at eval.c:2885 #30 0x011a25dd in Ffuncall (nargs=2, args=0x88eec8) at eval.c:2767 #31 0x011e5ffb in exec_byte_code (bytestr=20305284, vector=20305301, maxdepth=18, args_template=1030, nargs=1, args=0x88f2dc) at bytecode.c:919 #32 0x011a2c42 in funcall_lambda (fun=20305253, nargs=1, arg_vector=0x88f2d8) at eval.c:2885 #33 0x011a25dd in Ffuncall (nargs=2, args=0x88f2d4) at eval.c:2767 #34 0x011990dc in Ffuncall_interactively (nargs=2, args=0x88f2d4) at callint.c:252 #35 0x011a2235 in Ffuncall (nargs=3, args=0x88f2d0) at eval.c:2698 #36 0x0119b2b5 in Fcall_interactively (function=-10501392, record_flag=0, keys=22605245) at callint.c:849 #37 0x011a23ae in Ffuncall (nargs=4, args=0x88f55c) at eval.c:2725 #38 0x011e5ffb in exec_byte_code (bytestr=19977892, vector=19977909, maxdepth=54, args_template=4102, nargs=1, args=0x88f8a0) at bytecode.c:919 #39 0x011a2c42 in funcall_lambda (fun=19977869, nargs=1, arg_vector=0x88f89c) at eval.c:2885 #40 0x011a25dd in Ffuncall (nargs=2, args=0x88f898) at eval.c:2767 #41 0x011a1e40 in call1 (fn=9184, arg1=-10501392) at eval.c:2573 #42 0x0110b3b3 in command_loop_1 () at keyboard.c:1521 #43 0x0119ee3b in internal_condition_case (bfun=0x110ab87 , handlers=12224, hfun=0x110a281 ) at eval.c:1348 #44 0x0110a7c2 in command_loop_2 (ignore=0) at keyboard.c:1139 #45 0x0119e376 in internal_catch (tag=31904, func=0x110a797 , arg=0) at eval.c:1108 #46 0x0110a761 in command_loop () at keyboard.c:1118 #47 0x01109de1 in recursive_edit_1 () at keyboard.c:728 #48 0x01109fd3 in Frecursive_edit () at keyboard.c:799 #49 0x01107f3d in main (argc=2, argv=0xca1f38) at emacs.c:1607 Lisp Backtrace: "internal-set-lisp-face-attribute" (0x88df28) "set-face-attribute" (0x88e254) "apply" (0x88e388) "face-spec-set-2" (0x88e6b8) "face-spec-recalc" (0x88e940) "eval" (0x88eba0) "elisp--eval-last-sexp" (0x88eecc) "eval-last-sexp" (0x88f2d8) "funcall-interactively" (0x88f2d4) "call-interactively" (0x88f560) "command-execute" (0x88f89c)