From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: grischka Newsgroups: gmane.emacs.devel Subject: GTK frame changes Date: Thu, 02 Jul 2009 14:53:31 +0200 Message-ID: <4A4CADCB.8000304@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1246539400 7664 80.91.229.12 (2 Jul 2009 12:56:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jul 2009 12:56:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 02 14:56:33 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MMLq5-0006i5-7b for ged-emacs-devel@m.gmane.org; Thu, 02 Jul 2009 14:56:33 +0200 Original-Received: from localhost ([127.0.0.1]:48841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMLq4-0006i9-M4 for ged-emacs-devel@m.gmane.org; Thu, 02 Jul 2009 08:56:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MMLnI-0002uW-Pe for emacs-devel@gnu.org; Thu, 02 Jul 2009 08:53:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMLnE-0002na-UJ for emacs-devel@gnu.org; Thu, 02 Jul 2009 08:53:40 -0400 Original-Received: from [199.232.76.173] (port=46912 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMLnE-0002nT-PC for emacs-devel@gnu.org; Thu, 02 Jul 2009 08:53:36 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:44537) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MMLnE-0000wn-3s for emacs-devel@gnu.org; Thu, 02 Jul 2009 08:53:36 -0400 Original-Received: (qmail invoked by alias); 02 Jul 2009 12:53:33 -0000 Original-Received: from p57A0813F.dip0.t-ipconnect.de (EHLO [192.168.1.2]) [87.160.129.63] by mail.gmx.net (mp067) with SMTP; 02 Jul 2009 14:53:33 +0200 X-Authenticated: #18588216 X-Provags-ID: V01U2FsdGVkX1/2W44S0JX22734MRMrHE+2jzSD3bKeIVCKDl+6AL V+DM1cJSaHUhmv User-Agent: Thunderbird 2.0.0.18 (X11/20081125) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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 Xref: news.gmane.org gmane.emacs.devel:111907 Archived-At: Jan Djärv wrote in Changelog: > xg_frame_set_char_size): Do not set pixel width/height here or > call change_frame_size. Just call flush_and_sync. > (flush_and_sync): Reintroduced. Nice work and the idea is right IMO, just the problem remains that "flush_and_sync()" does not guarantee that the resize request was actually handled, i.e. that a ConfigureNotify was received before flush_and_sync() returns. In my tests in ~70% of runs this is not the case. It might be somehow tricky to get there though. What it needs is probably some modal event-loop that returns once ConfigureNotify has arrived and in between handles other important events to make sure it doesn't freeze. It probably also needs some timeout, as for example with resizing invisible (not-mapped) frames the ConfigureNotify might never arrive. There is a similar modal loop in emacs in the context of X selections (in x_get_foreign_selection where it says TRACE1 (" Start waiting %d secs for SelectionNotify", secs). So maybe there are some ideas or code to copy from. "secs" here may sound somewhat scary however in the case of ConfigureNotify it should arrive really quickly. Just not quickly enough that "flush_and_sync()" already sees it, --- grischka