From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#25851: 25.2; GTK warning when starting Emacs when desktop file has more than one frame Date: Thu, 23 Mar 2017 08:59:10 +0100 Message-ID: <58D3804E.5030109@gmx.at> References: <87a89c51qb.fsf@moondust.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1490256036 27845 195.159.176.226 (23 Mar 2017 08:00:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Mar 2017 08:00:36 +0000 (UTC) To: "N. Jackson" , 25851@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 23 09:00:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqxfK-0005V3-9V for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Mar 2017 09:00:14 +0100 Original-Received: from localhost ([::1]:54699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqxfQ-0003o8-BV for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Mar 2017 04:00:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqxfF-0003kt-8T for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 04:00:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqxf9-0000Lj-Du for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 04:00:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41889) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cqxf9-0000Lc-AX for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 04:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cqxf8-0002kT-QR for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 04:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Mar 2017 08:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25851 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25851-submit@debbugs.gnu.org id=B25851.149025597110489 (code B ref 25851); Thu, 23 Mar 2017 08:00:02 +0000 Original-Received: (at 25851) by debbugs.gnu.org; 23 Mar 2017 07:59:31 +0000 Original-Received: from localhost ([127.0.0.1]:40088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqxec-0002j7-M1 for submit@debbugs.gnu.org; Thu, 23 Mar 2017 03:59:30 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:61162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqxea-0002ip-75 for 25851@debbugs.gnu.org; Thu, 23 Mar 2017 03:59:28 -0400 Original-Received: from [192.168.1.100] ([213.162.68.47]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MKu9E-1cqxeS40fo-0000Pk; Thu, 23 Mar 2017 08:59:21 +0100 In-Reply-To: <87a89c51qb.fsf@moondust.localdomain> X-Provags-ID: V03:K0:AYqg8xj826aWnjCIwbl/a0tp7FtEfI00YWb/wgioXWF2IMGD9BC 8K3dmkCZtrzHbtnghGoYYlEe51vHaWarpEiAICnNGRKOYzSSCWrrmWX5hGcFrF1oj2McvZx QDJp7u63lcdc5NIdpw5fkbDct4eIjzticK3nXbLM0JHkd2rMUwTk9T+3LEfQ1/zlisjMlEZ stO6W6sNa3l87lC8j1N2A== X-UI-Out-Filterresults: notjunk:1;V01:K0:SZanwQf/4jI=:KlP6XYppuVdua41NZECRdK HDi66oOsIkHXHt2pTAYnl46owlnE4hJ893kL+228gPewjkl6uGs8JVkz/wQ0st/bA+u0xm9TB S+QpBDyreI3rBif8gOgmXcY6j7NRXF6BW66AT7QwvXBtTnIhsvXJsvXieflbVzctXg+/e08y/ IzO+YPjQO0dw6abDwqHr0oNvDls25a8B1AGTFabwn2QJ9jCHg1m8xdVyEbrQa3jCvhSlZkLNM QqhcumHVX34PDhh6uhMg8PLis9fKSyhWIUdI3stzQjxHtQC1bazLtiZaERg88aB3uzQf+MgO6 /od7acKIa/lodgxRn3/LnC/OPyZ5qnoKobF94muzkuAersb/PYvA8qOmfks8xEUMHr9dAPP/I ZSJw1MdTjIB3ztmHwAgqw0UV8EUboLhiri8UU7CUWOM1/C+zHdx/E7DyyESwuLK+GAtz40Tsn z41SZ7dsdC6s3NnpTMGJG2nH4yu0RnXdzLcVl+owDBPzuysXeo5kuYBtXhj/MGHGw53wrcmGv rztVVdkNCU0BtjUJLwEEBcQ9ukx4ryJVnNzY9eKYyuBU/kFJdb0KttXbNLIEgo4LGA7Ay6ggO bD2RcO0+jRm0y4TJd+2NT3HmznpzahrV2aQ6cRxG2jKhCn3Kg9yQ8pFFD+lURkOVYRnzfdRsg aFIr26D6fTZoFZRzzhhvz07ZtUYWKlu6IhXWutPGC4ThG9VG1LU1s02yGcItIRdWN7YH7mfNp 2d8tGY6hyoDHdRfYO/hlKqBHFXZYUY6Mekhw4Zu5d44s17JV/CdHWFrX+p2ZGmpWnNGzP+0P 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" Xref: news.gmane.org gmane.emacs.bugs:130834 Archived-At: > When starting Emacs from a terminal/console window, GTK emits the > following message in the terminal/console: > > Gtk-WARNING **: gtk_window_parse_geometry() called on a window > with no visible children; the window should be set up before > gtk_window_parse_geometry() is called. > > The message is emitted n - 1 times, where n is the number of > frames specified in the desktop file; with no desktop file, or > with a desktop file specifying just the one frame, no such message > is emitted. Thinking about this twice - frameset should _not_ try to restore frame positions by default. If people think they need it, they should modify `frameset-filter-alist' appropriately, but by default this option should be off. Introducing a gravity parameter might help but ISTR that most window managers don't handle gravity correctly ... > Once Emacs is up and running, creating new frames does not cause > this message to be emitted. Because IIRC restoring a frameset is the only case where Emacs tries to position frames by default. Anyway, I now introduced a variable `x-gtk-use-window-move' which, if set, should avoid the problems with bug#25851 and bug#25943. These bugs are strangely related because they can be fixed (at least here) by calling gtk_window_move, a function which apparently is capable of shelving a requested position and pass it on to the window manager when we eventually ask for mapping the frame via gtk_widget_show_all. Obviously, my fix might be silly so if anyone has a better idea please speak up. The variable is off by default. If a sufficient number of people confirm that it works, I'll set it on by default and will mark this bug as done. Note that the variable affects GTK builds only and should affect the behavior of Emacs iff you set frame positions "programmatically" - either via a geometry specification, a `left' parameter in the arguments of `make-frame' or `set-frame-parameter(s)' or via `set-frame-position'. Moving a frame by dragging its title bar is not affected. Indirectly, however, all users of the desktop feature are. So please try it. Many thanks for the forensics, martin