From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Help with partial line needed (was: Bad resizing upon detaching/reattaching GTK toolbar) Date: Sat, 12 Feb 2005 21:56:49 +0100 Message-ID: <420E6D91.9070205@swipnet.se> References: <420BC387.3000503@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1108243798 9171 80.91.229.2 (12 Feb 2005 21:29:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 Feb 2005 21:29:58 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Emacs-Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 12 22:29:57 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D04pi-0003xb-NP for ged-emacs-devel@m.gmane.org; Sat, 12 Feb 2005 22:29:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D054v-0004Ux-J7 for ged-emacs-devel@m.gmane.org; Sat, 12 Feb 2005 16:45:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D04rd-0006RI-56 for emacs-devel@gnu.org; Sat, 12 Feb 2005 16:31:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D04rM-0006JS-EX for emacs-devel@gnu.org; Sat, 12 Feb 2005 16:31:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D04rG-0006GI-4w; Sat, 12 Feb 2005 16:31:18 -0500 Original-Received: from [195.54.107.70] (helo=mxfep01.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D04Kd-0006tU-AJ; Sat, 12 Feb 2005 15:57:35 -0500 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep01.bredband.com with ESMTP id <20050212205733.QSCD17717.mxfep01.bredband.com@coolsville.localdomain>; Sat, 12 Feb 2005 21:57:33 +0100 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: David Kastrup In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:33314 gmane.emacs.pretest.bugs:5845 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33314 There is definitly some bug in fluxbox, it sends the most crazy configure notify events to Emacs when the tool bar is detached. It usually sends three, two correct ones and one that is off by about 5 pixels. It is those missing 5 pixels that shrinks the window (i.e. Emacs rounds it to an even line). There should only be one configure notify. Emacs is special in the way it handles (or rather the GTK version) detaching and attaching of the tool bar. It tries to keep the same lines as before, thus the resizing and the configure notify events. I see that other applications instead keeps the total pixel size, so then no configure notify is sent (the frame size is kept). I can change to that behaviour, but since the tool bar height may not be a multiple of the line height (as it is in other Emacs ports), there will most probably be a partial line. And that partial line is the minibuffer. It would be better if that partial line was in a non-minibuffer. Does anybody know how to achive that (I just call change_frame_size)? There are another race condition involving configure notify and tool bar attach/detach, but they happen very seldom, and usually ends up growing the Emacs frame rather than shrink it. The fluxbox behaviour is not changed by fixing that race condition. I haven't checked in the fix for the race condition. If there is a way to force the partial line to a non-minibuffer I think I'll go with that solution instead. Sorry I couldn't help. Jan D. David Kastrup wrote: >"Jan D." writes: > > > >>David Kastrup wrote: >> >> >> >>>This bug report will be sent to the Free Software Foundation, >>>not to your local site managers! >>>Please write in English if possible, because the Emacs maintainers >>>usually do not have translators to read other languages for them. >>> >>>Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. >>> >>>Please describe exactly what actions triggered the bug >>>and the precise symptoms of the bug: >>> >>>When one detaches and reattaches the toolbar by dragging on its >>>handle, each time the total size of the Emacs window shrinks. This is >>>particularly noisome since it is not easy to reattach the toolbar >>>without the state attached/detached flickering a few times, and each >>>time one line of the window is gone. >>> >>> >>I can not reproduce this, what window manager are you running? >> >> > >Fluxbox. > > > >>Do you get the same behaviour if you disable and enable >>tool-bar-mode? >> >> > >First I get a backtrace. Sigh. > >Debugger entered--Lisp error: (wrong-type-argument keymapp nil) > signal(wrong-type-argument (keymapp nil)) > define-key-after(nil [customize] (menu-item "customize" customize :image (image :type xpm :file "/usr/local/emacs-21/share/emacs/21.3.50/lisp/toolbar/preferences.xpm") :help "Edit preferences (customize)")) > tool-bar-local-item("preferences" customize customize nil :help "Edit preferences (customize)") > apply(tool-bar-local-item "preferences" customize customize nil (:help "Edit preferences (customize)")) > tool-bar-add-item("preferences" customize customize :help "Edit preferences (customize)") > tool-bar-setup() > tool-bar-mode(toggle) > call-interactively(tool-bar-mode) > execute-extended-command(nil) > call-interactively(execute-extended-command) > >Then the frame gets oversized (namely, the text window size does not >shrink to accommodate the toolbar size, and consequently the >minibuffer gets off-screen). If I disable the toolbar again, the >frame shrinks to normal size again, as the window size stays the same. >However, this first toggling is "neutral" only because of the back >trace, apparently (I have debug-on-error set to t). > >The next time I call tool-bar-mode (no backtrace this time), the >window-size _adapts_ to the reduced space. Disabling tool-bar-mode >again, the window does _not_ adapt to the additional space again. > >After that, enabling the toolbar makes the size adapt, so the frame >size stays more or less the same while the window size shrinks, and >disabling the toolbar lets the window size stay the same, thus causing >the frame to shrink. > >The same happens when detaching and reattaching the toolbar: detach >the toolbar, and the window does not grow in spite of the additional >space, attach it again, and the window shrinks. > >Maybe this is an effect of the combination of my line height and the >size of the toolbar? I use 10x20 as my normal font, and the startup >geometry is 80x35. > >My X resources contain Emacs.toolBar: 0, so I don't have a toolbar on >startup normally. > > >