From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: RFC: flicker-free double-buffered Emacs under X11 Date: Mon, 24 Oct 2016 14:43:50 -0400 Message-ID: <5252D639-4062-4B28-AD0C-0F27A6A48B79@raeburn.org> References: <9e8ad090-a6a0-c807-95ae-7ec7c3f391cb@dancol.org> <83k2d2rssf.fsf@gnu.org> <831sz9sime.fsf@gnu.org> <83y41hqz94.fsf@gnu.org> <838tte5fzq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1477336756 21303 195.159.176.226 (24 Oct 2016 19:19:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2016 19:19:16 +0000 (UTC) Cc: Daniel Colascione , Emacs-Devel devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 24 21:19:12 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bykla-0000qK-6x for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2016 21:18:38 +0200 Original-Received: from localhost ([::1]:49231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byklc-0003G7-Bw for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2016 15:18:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bykE2-0000db-P4 for emacs-devel@gnu.org; Mon, 24 Oct 2016 14:43:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bykDx-0001sR-QH for emacs-devel@gnu.org; Mon, 24 Oct 2016 14:43:58 -0400 Original-Received: from mail-qt0-x22f.google.com ([2607:f8b0:400d:c0d::22f]:37754) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bykDx-0001rb-Jg for emacs-devel@gnu.org; Mon, 24 Oct 2016 14:43:53 -0400 Original-Received: by mail-qt0-x22f.google.com with SMTP id r21so2829639qtr.4 for ; Mon, 24 Oct 2016 11:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3fKvD6n3+16AUWPaz6ypAuDfrC9f4g0LbPrp6iRc9bY=; b=ytSm8FYKr6N0f6A2kXkA8ew4tWTTTkW4z4PibFa99J4+8d4F9Ddxv8cDqplX0LeBb4 MogpCzDlUdIBhRmPg0uq07xlxVTf8sgKkiXq5zMuZjc8HOSoBmlJh63PH33ZP9VSikM2 qro6QZnXNoDSYp6VUfwjvAfYrvpo/EMtv/mTfbRZbZ63SAMMQUFtYyBALlprkUaNXyXM t+S/wnNtL9hcDBWhE04zoZb3tQYvg3ALwZoTcNPQkm2deW6bgVFHr1S9U/fZ7CHEYYUc kJ/aF5GY/eofPcvjzHIVlMgg8DW7oCCb6x7nVEVUpgyYuKm5FFmY2ntU0DrNOB3WQko1 0tnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3fKvD6n3+16AUWPaz6ypAuDfrC9f4g0LbPrp6iRc9bY=; b=RRa501S6MJ0dSXSi2xUPtmXv4PwL77lvAUkE8Zfd8VdilFDrj5OjUUBjC5a/2l5GUm LnqZYZAQuqg8RHFYrKbqpoYFVIB+JL+QUz0fowKEeRlRzuBbmlCfaCj+wvX3yetDdv+0 9fhi2Y2PZ30s0pxROL3lPLG//s+ltyxaTo1Sup71dcx/mDERbr7EoabK0k6C1hjiCy9e SFzLLZqPaiWLKH/olxlRBW4C/+JnaBoSQlGyTHmEFFbPeCQPx/uXAfuu5/k72FVefTly UNbkD9NIVOVs9KW3qlff8AMhCPFNIKIy2e0tepUY57p1NajdumxRUhHACOa9/OA2rDfM HosQ== X-Gm-Message-State: ABUngvfbNFVBUNG9dODCF3znxdPtQr2SWnzDT4aKq3kDYNdjg9DBj8EthxlO0gqRjdL3Mw== X-Received: by 10.200.35.33 with SMTP id a30mr16412142qta.25.1477334632231; Mon, 24 Oct 2016 11:43:52 -0700 (PDT) Original-Received: from [192.168.23.52] (c-50-138-183-136.hsd1.ma.comcast.net. [50.138.183.136]) by smtp.gmail.com with ESMTPSA id k74sm9041940qkl.14.2016.10.24.11.43.51 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Oct 2016 11:43:51 -0700 (PDT) In-Reply-To: <838tte5fzq.fsf@gnu.org> X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:208737 Archived-At: >=20 >> By the way: aren't most calls to x_catch_errors already buggy? = AFAICT, >> they don't generally call x_sync first. The purpose of this = mechanism >> is to run a section of code in such a way that Emacs doesn't die if >> something goes wrong in Xlib, but since Xlib error reporting is >> asynchronous anyway, use of x_catch_errors without a preceding x_sync >> (as I have in my code) can silently swallow X errors that we _do_ = want >> to kill Emacs. >=20 > That's for some X expert to answer, I really don't know enough about > this stuff. Ken, can you comment on this? x_catch_errors itself starts with an XSync call to ensure errors on = previous requests are processed with the default handler. Then = x_uncatch_errors does another at the end of the region to make sure any = errors generated by requests within the catching region are processed. = There=E2=80=99s also x_uncatch_errors_after_check, which I added = specifically for cases where x_uncatch_errors was being called = immediately after x_check_errors, which also does an XSync, so we could = drop one round-trip (which was a performance issue for me in certain = cases).=