From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Tabs Date: Mon, 14 Oct 2019 20:02:57 +0200 Message-ID: <2282f22a-048f-aa06-067d-c29b2cef9a2d@gmx.at> References: <20191008160038.6xvnytnoruzphzd6@Ergus> <83zhibw6qn.fsf@gnu.org> <20191008164048.bnad4wdkcbatqepp@Ergus> <83v9szw4o4.fsf@gnu.org> <20191008234350.ahxt4zcylxqludoc@Ergus> <837e5ewc0a.fsf@gnu.org> <20191009103936.qjdwuidqnowswojw@Ergus> <83wodeup6a.fsf@gnu.org> <20191009120534.ud6st2xvrv3rv6iy@Ergus> <83o8yqumdl.fsf@gnu.org> <20191009135539.c2i6ob52td6p34ab@Ergus> <83k19euhic.fsf@gnu.org> <8736g1bl4y.fsf@mail.linkov.net> <83zhi9rqcb.fsf@gnu.org> <877e5cmdpk.fsf@mail.linkov.net> <659acba7-a633-2bf8-1579-b83f5cf2bb68@gmx.at> <87blul37sd.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2B463ED8C326E4659BCF2FAD" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="165928"; mail-complaints-to="usenet@blaine.gmane.org" Cc: michael_heerdegen@web.de, Eli Zaretskii , spacibba@aol.com, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 14 20:04:55 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iK4iF-000h2N-1d for ged-emacs-devel@m.gmane.org; Mon, 14 Oct 2019 20:04:55 +0200 Original-Received: from localhost ([::1]:55164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK4iD-00009A-C5 for ged-emacs-devel@m.gmane.org; Mon, 14 Oct 2019 14:04:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54298) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK4gd-0007yp-Pa for emacs-devel@gnu.org; Mon, 14 Oct 2019 14:03:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iK4gc-0001fl-Dy for emacs-devel@gnu.org; Mon, 14 Oct 2019 14:03:15 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:40557) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iK4gZ-0001eW-O4; Mon, 14 Oct 2019 14:03:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1571076180; bh=57RksHiIC0sDAuPQ6sy0XNnZ13VMN9ypgIo19k3ouLk=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=D1XoH6WfDFzBwHiBv+vL0I3ug/L0JUlU/gXJQSrtPc4M/G98r5LJ/JRuY+5sUrhr9 mxZ6SywKJuP2VFkU7uiuuNhVj5y1doRGSzpkH/fuG0bNfVmB6GuiDzZvW5LBuGAdiH gUaDtdPebyThpTyEcIJyZDEk1pCNh68OfBHvXsAQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.84]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MUGeB-1iTjiZ1bil-00RLBU; Mon, 14 Oct 2019 20:03:00 +0200 In-Reply-To: Content-Language: de-AT X-Provags-ID: V03:K1:QVU53Is5ASt5Ou5kBubC311zRnN9YbDcykR7mnetzo3FIQJIP/w LwuFq3tEr4QB7T/4meamPi/e3RY+/ecLNFcmd9LDBpe9umr02pKCtd1UJEoiLuOiJUQi4F5 zUDvoXnGpOODnFD/nsRZI5FL28bxUbHrMEsyBSeowzHMakMRoj2K66YlmbgsOfBFHG4kk2N xQdBdYTP69K06DqCI4gXw== X-UI-Out-Filterresults: notjunk:1;V03:K0:YsrRiHbcZqc=:pQHZJNhnlzbedn0mZ7qa8t 5mGtpE3jCfurYtNES/xjSobyQSDJ75pAhSNhL+gK/6P65tNdjxP1LtJ10dsNfLF6o8jdHEz7k fYviOsaMw82myBeb4bZfHKKv0RZ+ZkKABRzBGYw6kEBSRQRYuweZTrQsrQCZMxIZ2llTLxZQV zoy9hhaAve4r1nHayo41xt9SMyA1MIdLcheKPFaF2F6LnCjRMqCC47yva9oXJ23hxD8pQAh0I WaidKrOB7+1QCshV6u3vSCfIkVaaFQnI2+alkkcAiAGFAeyUQOYz3cS3GcmVgDozibQPOhAho yGkjoyFRtRZuQaTpOeQyYspybgJDE/JCyIKWoH61aLo8joq8C2MToeZBL5VdkWnuFJZyfZWD+ kMeU3uOwysXddS7ooZ1T0Y6zbBqFFcBircDBh+f1/0yNF+pWZUkO0B6sSMBuytwT9lPvHFLo/ wb163691wnVlsX9QSLl5QAs1OUQgnXDVyVV6FRAohpcmdzA0ayZuN+82F2Bue8VyIZWqoJeTP 7povnM6M0665GEctqgEvt3VLrQgXpAWP1U7xiaMfDQnev+UaXsjT/1GBX51VEnNL0BtUGea7C xQ/qPYX0YwuguW1hyg+bRas2IUJf7PjGH/mnCzwdNLd67REducyNovfqlD8bUBykgZAANxS6e FLVuQXPxF60rTCB6Q7tpWwVMwBuyPIfnKzP2XczHBJRS4fjQXxyzU3L1d21orq6D8KJ16Eykg QR10l6ajJcAOEaTsZf/twt37ZcXWgU30DGYXXk7nVXahSihDvXgoyxDBO7oHKIXk2DcFMw9+ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241014 Archived-At: This is a multi-part message in MIME format. --------------2B463ED8C326E4659BCF2FAD Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > This will require some surgery, so don't expect a fix in a few days. > > And I have no idea yet whether and how this could affect GTK builds. The forensics (informal): (1) Suppose you have a frame with a visible tab-bar (and no other pseudo window) and save its window configuration. In the saved configuration, the root window is at a line 3. (2) You disable the tab-bar. The root window is now at line 0. (3) You restore the configuration saved in (1). The root window is at line 2 again. Now adjust_frame_size kicks in. And this one had the optimization to do almost nothing in the most frequent case where && new_text_width == old_text_width && new_text_height == old_text_height && new_windows_width == old_windows_width && new_windows_height == old_windows_height && new_pixel_width == old_pixel_width && new_pixel_height == old_pixel_height && new_cols == old_cols && new_lines == old_lines) /* No change. Sanitize window sizes and return. */ hold. Unfortunately, in our case all of these miraculously do hold, apparently nothing changed. The reason for this is the 'frame-inhibit-implied-resize' nil setting. When (2) removes the tab bar from the frame this sets all these sizes (which later here appear as old_...) to the sizes of the saved window configuration (which appear here as new_...) and we have a frame where the root window remains at line 3 and its bottom is cut off. I attach a patch for this. Please carefully check all builds with 'frame-inhibit-implied-resize' nil for whether they DTRT now (and obviously the GTK build is affected too since the tab-bar is now its first internal window). martin PS: I noticed two annoying things about tab-bar - it (1) usurpates my private binding even after I turned it off and (2) apparently turns off 'truncate-lines' (always t here) in the buffer from where I invoked it. Finally, I can't make tab-bar work on Windows any more always getting something like Debugger entered--Lisp error: (wrong-type-argument sequencep #) #f(compiled-function (tab) #)((current-tab (name . #))) mapcan(#f(compiled-function (tab) #) ((current-tab (name . #)))) tab-bar-make-keymap-1() tab-bar-make-keymap(ignore) redisplay_internal\ \(C\ function\)() redisplay() sit-for(2) execute-extended-command(nil "tab-bar-mode" "tab-bar-mode") funcall-interactively(execute-extended-command nil "tab-bar-mode" "tab-bar-mode") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) Any ideas? --------------2B463ED8C326E4659BCF2FAD Content-Type: text/plain; charset=UTF-8; name="adjust_frame_size.diffs" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="adjust_frame_size.diffs" ZGlmZiAtLWdpdCBhL3NyYy9mcmFtZS5jIGIvc3JjL2ZyYW1lLmMKaW5kZXggZjdlNjViZTcy Ny4uNGRkMTgxZjZhOSAxMDA2NDQKLS0tIGEvc3JjL2ZyYW1lLmMKKysrIGIvc3JjL2ZyYW1l LmMKQEAgLTcwNCwxOCArNzA0LDE3IEBAIGFkanVzdF9mcmFtZV9zaXplIChzdHJ1Y3QgZnJh bWUgKmYsIGludCBuZXdfd2lkdGgsIGludCBuZXdfaGVpZ2h0LCBpbnQgaW5oaWJpdCwKIAkJ aW5oaWJpdF92ZXJ0aWNhbCA/IFF0IDogUW5pbCkpOwogCiAgICAgICBpZiAoRlJBTUVfVEVS TUlOQUwgKGYpLT5zZXRfd2luZG93X3NpemVfaG9vaykKLSAgICAgICAgRlJBTUVfVEVSTUlO QUwgKGYpLT5zZXRfd2luZG93X3NpemVfaG9vayAoZiwKLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwKLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X3RleHRfd2lkdGgsCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld190ZXh0X2hl aWdodCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgMSk7CisgICAgICAgIEZSQU1FX1RFUk1JTkFMIChmKS0+c2V0X3dpbmRvd19zaXplX2hv b2sKKwkgIChmLCAwLCBuZXdfdGV4dF93aWR0aCwgbm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AoZiwgLTEsIC0x LCA0LCBmYWxzZSwgUXNldF93aW5kb3dfY29uZmlndXJhdGlvbik7CiAKICAgICAgIGFkanVz dF9mcmFtZV9nbHlwaHMgKGYpOwogICAgICAgdW5ibG9ja19pbnB1dCAoKTsKCg== --------------2B463ED8C326E4659BCF2FAD--