From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthias Clasen Newsgroups: gmane.emacs.bugs Subject: bug#23144: shrinking windows with gtk 3.20 Date: Mon, 28 Mar 2016 16:52:47 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1459261230 3126 80.91.229.3 (29 Mar 2016 14:20:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Mar 2016 14:20:30 +0000 (UTC) To: 23144@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 29 16:20:14 2016 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 1akuVC-00019o-Cf for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2016 16:20:14 +0200 Original-Received: from localhost ([::1]:47328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akuVB-0005mB-Mq for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2016 10:20:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akuV1-0005aw-51 for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 10:20:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akuV0-0006r4-52 for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 10:20:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akuV0-0006qy-0Z for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 10:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1akuUz-0006ae-To for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 10:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matthias Clasen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Mar 2016 14:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23144 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145926115025245 (code B ref -1); Tue, 29 Mar 2016 14:20:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Mar 2016 14:19:10 +0000 Original-Received: from localhost ([127.0.0.1]:43861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akuU9-0006Z6-Jd for submit@debbugs.gnu.org; Tue, 29 Mar 2016 10:19:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ake9g-0002ra-5m for submit@debbugs.gnu.org; Mon, 28 Mar 2016 16:52:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ake9a-0007TK-5o for submit@debbugs.gnu.org; Mon, 28 Mar 2016 16:52:50 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ake9a-0007TG-3H for submit@debbugs.gnu.org; Mon, 28 Mar 2016 16:52:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ake9Z-0004cF-4u for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2016 16:52:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ake9X-0007SN-W9 for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2016 16:52:49 -0400 Original-Received: from mail-ob0-x22c.google.com ([2607:f8b0:4003:c01::22c]:33383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ake9X-0007SD-Rw for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2016 16:52:47 -0400 Original-Received: by mail-ob0-x22c.google.com with SMTP id x3so40031122obt.0 for ; Mon, 28 Mar 2016 13:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=0JStkc+NbAcAwAfUWNE55jh4HryujWvo2zJTJnBnVu4=; b=xl3ifjijrn7ANfRyytr+nxjesdjUtKL1z3m94OuutsyMWszOCiKsHK44n/TnnbUPSp pyslJS+UFSq6p19jjy9NK09uX95zKgNWk3RFfYxmSNyoY87YXl7+TJuGMnzO5mbgH1uU Lgj0hlHKihxkR59iEHrtT3QYPKNdP+5vT/iq5RKXXw0fFIK9eobs+f67Q4HhEA48mYwm DS6q7vjQrGIEC8VDUt6l4EHvs8pnuTWv5kA3GcVlRgSq0KuAxiYSNhqMzvWYipWGxsNu O9rL85q3JdfVmNVOViXa8u9sUoegnsk6TWKIZNcjBVzM3X/t5qwZEInbAf1XwsfpAEkO qQyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=0JStkc+NbAcAwAfUWNE55jh4HryujWvo2zJTJnBnVu4=; b=c0YymyJHBfIFXAEtPkLwLrMwahpEyR/PBxeHxfzUhlc4/EsE1RtWAdnIPYvIfpUG7W clSKREQTKVo3AoBVQQlenH0sJ1WBuf9UAVI/fGz2xQWgBBQrfltQLOUn1+HDpo98uoX6 igyHbjVWK5Q5iTdoa8f4IyqcS3IjEo6f0DThac3FP+JoRZt0FjA1fCAkQASWyKSmTtLK FiYsOMzDLHu/ov0wGwBE5hhTE+tIRZaBmzKz609dZqY8h3CS12ZyIDlN5H15B+bPjcv4 O7I7HXtpBvhSRA8tHl8ytQ1e6OUpngqdo2P1kTTO779+PvL3tlJpP5a5z29/mymuAQCO Egrg== X-Gm-Message-State: AD7BkJKG84b8otntkqrurb2Fb/W89ymjDXZ90Nv9YjXnOjFtj7p6dLWSiPtvdKHPI8g4Qw+mR1M1mJ+41hylfA== X-Received: by 10.182.33.166 with SMTP id s6mr12906608obi.30.1459198367126; Mon, 28 Mar 2016 13:52:47 -0700 (PDT) Original-Received: by 10.157.38.185 with HTTP; Mon, 28 Mar 2016 13:52:47 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Tue, 29 Mar 2016 10:19:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:115698 Archived-At: We've observed that after https://git.gnome.org/browse/gtk+/commit/?id=67ab00e01ec06d7b05a82c3d80b235ac6c4abfd2 emacs windows shrink to a small height, after initially appearing with the expected size. For that reason, I have reverted to commit in the stable gtk 3.20 branch. But after looking a bit closer, I find that what emacs does is really unsupportable: It handles X events behind GTK+'s back, and upon seeing a map notify, it calls xg_frame_resized with -1, -1 for width and height, which makes it call gdk_window_get_geometry to obtain the current size. But at that point (before GTK+ has handled the map notify), the function still returns the initial values of 1, 1, which then leads eventually to a call of gtk_window_resize() with the small height that we're seeing the window shrink to. Therefore, I will bring back the reverted change in GTK+ master. Possible workarounds/fixes in the emacs code: 1) Recognize when gdk_window_get_geometry returns the initial size (1,1) and silently return as if the window was unmapped. 2) Just drop the xg_frame_resized call on MapNotify. Omitting it doesn't have any noticeable negative consequences.