From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56538: 29.0.50; [PATCH] Colored highlight in Lucid backend Date: Thu, 14 Jul 2022 18:34:43 +0800 Message-ID: <87k08goud8.fsf@yahoo.com> References: <87wnch16as.fsf@elite.giraud> <87k08gtsz0.fsf@yahoo.com> <87cze8t4i9.fsf@elite.giraud> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24606"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 56538@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 14 12:36:21 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBwCi-0006Dl-NU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 12:36:20 +0200 Original-Received: from localhost ([::1]:56994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBwCh-0007wH-4N for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 06:36:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBwCQ-0007vx-M5 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 06:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBwCQ-0002xW-EF for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 06:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBwCQ-0004Dp-9q for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 06:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2022 10:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56538 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 56538-submit@debbugs.gnu.org id=B56538.165779490616157 (code B ref 56538); Thu, 14 Jul 2022 10:36:02 +0000 Original-Received: (at 56538) by debbugs.gnu.org; 14 Jul 2022 10:35:06 +0000 Original-Received: from localhost ([127.0.0.1]:48991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBwBV-0004CV-Ux for submit@debbugs.gnu.org; Thu, 14 Jul 2022 06:35:06 -0400 Original-Received: from sonic312-23.consmr.mail.ne1.yahoo.com ([66.163.191.204]:40643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBwBS-0004Br-I2 for 56538@debbugs.gnu.org; Thu, 14 Jul 2022 06:35:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657794895; bh=8ujucH3Sr2zfl8Flmek8mqBl/8p6dQLeUpk0X8OmkMs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=mnPpX6L3Wq+X5bqGDsW6K0iZFLNjlYq7VXbq+sexwawzxmAL6J8RrWL1z9tpCgHtmYNgbVIVhLwdPy1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hrYmitESpm2Wn7zJ4K6MRKpuO_1fC1ZV7prVabKYbNeEig4OXZAxscfnUDoulaf JAbiyMTx6ZsYeRQzpYFhbaaNNgju5gijOImxzoMcysaKryF0NqCnwtFc.ds2OaDULhRnfnNvgAmg 27cnzIeMSthGfrCoeAzXy1VvRQ3dunthvBwq4USk4HwZALokWSL_agBwtvhQfPxZqV_rFWTRcpDZ RiZTAC_puX5f6B6Kcwskeolf1tXtiaKajlYU9bWJp8zBVEACNhb3i2yGMM1wxLBcswghRnWY6acs P1Uxzo87snlxmw46CW3kZuHX4CMhop0R5Twn4rqvLSpw6gv3KTDeGJ.HZ5G9D2eZz2WxWrx8YGxO bYpZSd6pUKQm98JdFm2d2LwGKDYZJR7AkTKeZE7E89ryQgFR3kQlbkmVH3gkJMhMl2r2rfjvBtgF jb2JvRq7M42f.MSeRF0SlTan7GO8GLjdcg33lm1DuAcOPmNM1ktf7SlB40UvaMC2avhJ4nIE68Uz syRuk3Th.MM1ttYVVunyEXAaF0nVD8fEGNFIdkfwSL X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ne1.yahoo.com with HTTP; Thu, 14 Jul 2022 10:34:55 +0000 Original-Received: by hermes--canary-production-sg3-67975bbd4b-5klrh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 246a032e3a9212f463373ec0454e39d0; Thu, 14 Jul 2022 10:34:51 +0000 (UTC) In-Reply-To: <87cze8t4i9.fsf@elite.giraud> (Manuel Giraud's message of "Thu, 14 Jul 2022 11:42:06 +0200") X-Mailer: WebService/1.1.20407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236981 Archived-At: Manuel Giraud writes: > I have attached a new version of my patch taking your remarks into > account but I did not remove this comment. I think it could be useful > to understand that "top_gc = something_bottom_gc" is not a typo here. We have the same general pattern (random_gc = random_opposite_gc) in most of the X code, so it is redundant IMHO. But I won't insist. > I have also done the following testing with Xft/cairo/PseudoColor > combinations: > > |-------------+-----------------+-----------------+-----------------+---------------------| > | | Xft + cairo | Xft only | cairo only | None | > |-------------+-----------------+-----------------+-----------------+---------------------| > | X Truecolor | ok | ok | ok | ok but with a | > | | | | | default tiny face | > |-------------+-----------------+-----------------+-----------------+---------------------| > | Xephyr | ok but color | ok but color | ok but color | ok, colors ok, but | > | Pseudocolor | not quite right | not quite right | not quite right | with a default tiny | > | | around each | around menu | around each | face [fn:2] | > | | glyph [fn:1] | labels [fn:2] | glyph [fn:1] | | > |-------------+-----------------+-----------------+-----------------+---------------------| > > * Footnotes > [fn:1] Aside from the Lucid widget, the emacs buffer is completly > blank. Yes, that isn't expected to work, because Cairo is broken. Also, you can't build Emacs with both Xft and Cairo, since they're mutually exclusive. > [fn:2] This time the emacs buffer is here. tool-bar icons are ugly. Could you please describe how the colors are "not quite right"? One last nit: > +static void > +draw_highlight (XlwMenuWidget mw, > + Window window, > + int x, > + int y, > + int width, > + int height) [...] > static void > -make_shadow_gcs (XlwMenuWidget mw) > +compute_shadow_colors (XlwMenuWidget mw, > + Pixel *top_color, > + Pixel *bottom_color, > + Boolean *free_top_p, > + Boolean *free_bottom_p, > + Pixmap *top_pixmap, > + Pixmap *bottom_pixmap, > + Pixel fore_color, > + Pixel back_color) Here and elsewhere new functions are added, the argument list should be reformatted to not place each argument on its own line. Thanks.