From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#52705: 29.0.50; Flashing popups when x-gtk-use-system-tooltips is nil in pgtk Date: Fri, 24 Dec 2021 17:03:13 +0100 Message-ID: References: <87pmpq7zc7.fsf@posteo.org> <87pmpobt9v.fsf@gnus.org> <87lf0ae87l.fsf_-_@yahoo.com> <6a538437-5c84-577b-d17f-93b02831c163@gmx.at> <87h7aye45g.fsf@yahoo.com> <08a8dbe2-c7ee-2b41-b554-d4fb82f0532d@gmx.at> <87zgoqcmnx.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8383"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 52705@debbugs.gnu.org, Aleksandr Vityazev To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 24 17:04:31 2021 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 1n0n3X-000236-Dk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Dec 2021 17:04:31 +0100 Original-Received: from localhost ([::1]:41670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0n3V-000606-AW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Dec 2021 11:04:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0n35-0005zm-QV for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 11:04:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54621) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0n33-0001SB-MY for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 11:04:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0n33-0000OD-Jy for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 11:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Dec 2021 16:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52705 X-GNU-PR-Package: emacs Original-Received: via spool by 52705-submit@debbugs.gnu.org id=B52705.16403618081420 (code B ref 52705); Fri, 24 Dec 2021 16:04:01 +0000 Original-Received: (at 52705) by debbugs.gnu.org; 24 Dec 2021 16:03:28 +0000 Original-Received: from localhost ([127.0.0.1]:37934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0n2W-0000Mp-Fo for submit@debbugs.gnu.org; Fri, 24 Dec 2021 11:03:28 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:40817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0n2T-0000MQ-RI for 52705@debbugs.gnu.org; Fri, 24 Dec 2021 11:03:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1640361795; bh=TWEaxYaC5QWC55GHb/PeZ95QixoN9BVQaBJIrxjQRnI=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=D1PqhDN+jARQIpE5WV59HthzgDaTsLNxe8wlPllwSdJ0emzScimz70H1r0N2QavNr B4OhOOyvgUP+Q5NyI8zbnV5fci7CIzmrYcHTrD3AkYkvZakBHgHx2EfRjaF3k4/Y7p JHSZE8Kig/bXBSCEGyYzHx5uRkj1KArzUunk0X0U= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.102] ([46.125.249.31]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MPokN-1mnoKO2SCB-00Mq5m; Fri, 24 Dec 2021 17:03:15 +0100 In-Reply-To: <87zgoqcmnx.fsf@yahoo.com> Content-Language: en-US X-Provags-ID: V03:K1:v39upNQ3/Pi1atpm3SQop4K5O2tR10qeWIx9MajGMtzYS/rTxYK eBu0eVvYwKewibf84kaMXnNn+1jVezlCaqTvZTF6LFEdTfpZASW5f1iUkiEurkkfAPnzkf3 Pdn9uVkLbUmLd80dP7TQLyQzYlmzWcmdep6jST4Hd/XyD0yMVwZJpsvxdDOf/8/jhOgmTJ/ O/4lE/5c399qtriyyEhUA== X-UI-Out-Filterresults: notjunk:1;V03:K0:7HNVbJGjBaA=:yoFCHCUVXNHOodGAvi4k0p dJWCviIUSnWnwrF3cVh+kJXblhR3lg9+wJufScmqOirIJPsw9QlRBSDhs1gl/m5OEjB0wxiF6 MdjGdsLbTTSh66nzB/pwtrxB5Jt3uT0XaMuqMTDsi3LR+L1v8xFk0de6Bgk1zZuSnZAJpbIT/ hDN+irW78icZl7IlyIR9i0TvyUkgDyk/vHWxQqEhITgxsFN+9uGVL1BCM8QwiUbRJ7UFSMyQE zeJudr3+EeQc5RRJVdw2ATECtfFmRUfUP4f0LcuRm/6RFPg1WEq3JAkZeZEqq9XiHt0X3xgfm 6OQp2bhzzRhALsRrVj5Ksc/r5ng+lCo0rH3LDHZ5Q9/+YqTgFsDLg7RVX0cNzOEHQbVAy7+3X comAYRPxZwmWf704n+ilkA/1rCdTqnfe1HlLFCFsfe34HrDxWFR4agVZutrr6vfFL6KJq42UJ CADK+AmttV5ajeHQ1jUugmSG49AavUHZjp3warJsx4BUwJYzQ6tpxM9iLp4n0kbnhmeBYB9gI RQmsr0CcU/TuvjTU1zjVGBrDkDrtdgLNjHZo6Ajf4cKknvWDo0xGulhYD0B1sUZ8WYID4gosH V/E6/shsyixIsWUJCphWnrhQk84fDoR17WrkLKlVKKJp9TUTj9udyfGwp0g0zBF/kSHitGfSn dQmMa4+4ZY7pIMa4kSPJxW9I1LewqW1uxuljT2Qj/bkCNQQBzhDgcr6H6zmr0iLRxYffg8Xzx nre5YhjzuZMiy2/l1rA95T81pdu4juYANydPfEHhGDfnqjL5+SK9laFFASCqjWmDUwHwB5P+ 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:223061 Archived-At: > Thanks, I'm beginning to understand the problem. > > Try removing this part of `x_create_tip_frame' in pgtkfns.c: > > gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); > > > And adding `gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (tip_f))' to > this part of x-show-tip in that file: > > /* Show tooltip frame. */ > block_input (); > gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (tip_f)), width, height); > gtk_window_move (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (tip_f)), root_x, root_y); > unblock_input (); I did diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 8cea9a9270..93f460a606 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -2989,7 +2989,6 @@ x_create_tip_frame (struct pgtk_display_info *dpyinfo, Lisp_Object parms, struct gtk_window_set_decorated (GTK_WINDOW (tip_window), FALSE); gtk_window_set_type_hint (GTK_WINDOW (tip_window), GDK_WINDOW_TYPE_HINT_TOOLTIP); f->output_data.pgtk->current_cursor = f->output_data.pgtk->text_cursor; - gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); gdk_window_set_cursor (gtk_widget_get_window (FRAME_GTK_OUTER_WIDGET (f)), f->output_data.pgtk->current_cursor); @@ -3527,6 +3526,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, block_input (); gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (tip_f)), width, height); gtk_window_move (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (tip_f)), root_x, root_y); + gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (tip_f)); + SET_FRAME_VISIBLE (tip_f, 1); unblock_input (); pgtk_cr_update_surface_desired_size (tip_f, width, height, false); and it seems to work flawlessly - the SET_FRAME_VISIBLE is utterly needed here to make the check on line 3203 of pgtkfns.c succeed (or better, fail). More importantly, the initial phantom frame with a simple (setq x-gtk-use-system-tooltips nil) disappears so you can make Aleksandr happy ... Unfortunately, I'm now getting (emacs:2257): Gdk-CRITICAL **: 16:19:41.208: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed (emacs:2257): Gdk-CRITICAL **: 16:19:41.231: gdk_window_create_similar_surface: assertion 'GDK_IS_WINDOW (window)' failed which I do not get without the patch. Any ideas? martin