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#57224: 29.0.50; PGTK: scroll-bar obscures child-frame Date: Tue, 16 Aug 2022 09:00:34 +0800 Message-ID: <87lerpq9xp.fsf@yahoo.com> References: 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="28212"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 57224@debbugs.gnu.org To: Florian Rommel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 16 03:01:17 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 1oNkxJ-0007CQ-PW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Aug 2022 03:01:17 +0200 Original-Received: from localhost ([::1]:48236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNkxI-0006ma-Ok for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 21:01:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNkx4-0006mO-Gl for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 21:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54637) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNkx4-0007zF-7f for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 21:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNkx4-0004ZT-0W for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 21:01: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: Tue, 16 Aug 2022 01:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57224 X-GNU-PR-Package: emacs Original-Received: via spool by 57224-submit@debbugs.gnu.org id=B57224.166061165417543 (code B ref 57224); Tue, 16 Aug 2022 01:01:01 +0000 Original-Received: (at 57224) by debbugs.gnu.org; 16 Aug 2022 01:00:54 +0000 Original-Received: from localhost ([127.0.0.1]:44386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNkwv-0004Yt-PX for submit@debbugs.gnu.org; Mon, 15 Aug 2022 21:00:54 -0400 Original-Received: from sonic303-22.consmr.mail.ne1.yahoo.com ([66.163.188.148]:41288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNkws-0004Ye-N6 for 57224@debbugs.gnu.org; Mon, 15 Aug 2022 21:00:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1660611644; bh=MvQGpmjtBcovWJ0RZE5Ho1UG6/ZJgi8VyOIvuDf7PBk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=kXdeaOt6mEPQfqgNTG4wQ3f2H7Mh4SDZHCwsJaA/dbmObq3AlPByqqXg+LnIsgwqonz1vq5xELAmVIFJDw5VZa4ImxrKOTqRb3GS5O2mSKSqR/tzlwHUsnDT8w/gbtMQAwoPByA/fD4D6O+E5VZhJlbb9nN7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Gp25CzACVIhyCjw98irMmq0GYxbgTHW2ZkqW_37wsbVGDySuS0uMIFecJl9CfbT7UcA 78rfAAJQaOPkGpGasvAPMNQhbEjcBM78jmD64gYManwjKwqvdUWaE_e8KXqXTJFCEWaQodTpmRga h6FB8ImRohFcXQ3XEcwJgbKTbtutBtzbRDC9AjHTrQ7TrlDtbnwostK7MdbNcfPpzBKCQqvSNFq2 8t6KBD5c6YmwbBPPpFzgaS3FXyFnf_m_jOJWJkiNwsZbGKNiBdoswbpJpeB0E566zeXA7.7Lulsl oD_1xB3UBk1uuMOGYAiDTgvKUVgVud.KADexCHtdMFpRw3Hp7PhvxF71v5sfAOFp6lGwRUWqkKOn EKrCGUB2JoOUSxBoJP3cW2QkUiWVxY9ay.Co0IE.nJmObfGV2Hjn0I4VXuEDb07h8I_LMlHjtec_ SPkOOVyAdrjXvzbr_oJ6g2jxib5CdQW5QVxCBesOr8 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Tue, 16 Aug 2022 01:00:44 +0000 Original-Received: by hermes--canary-production-sg3-6f58cd9b5-hxmk8 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9fd3eafc4b5eed049948f43917833ea3; Tue, 16 Aug 2022 01:00:39 +0000 (UTC) In-Reply-To: (Florian Rommel's message of "Mon, 15 Aug 2022 17:15:00 +0200") X-Mailer: WebService/1.1.20531 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:239857 Archived-At: Florian Rommel writes: > In PGTK, child frames may be obscured by scroll-bars. This happens when > the scrollbar is added after the child frame is created (e.g. by > creating new windows, etc.). The bug may in particular affect people > using child-frame-based completion packages, such as corfu, company- > box, or company-posframe. > >>>From what I could see in the code, in contrast to X, PGTK adds child > frames to the parent frame's edit_widget which is a GtkFixed (see "x- > create-frame"). A GtkFixed doesn't have any defined z-order behavior. > However, widgets seem to get drawn in the order of the internal child > list. Unfortunately, there is no direct way to insert widgets at the > front of this list or otherwise manipulate the list apart from pushing > children to the end or removing them. So a (dirty) workaround would be > to remove all children, add the scrollbar and then add all the removed > widgets again, see the patch. > A better solution may involve something like a GtKOverlay but I don't > know if that's practical in the current implementation. > > To replicate the bug in 'emacs -Q': > (progn > (make-frame > `((title . "childframe") > (parent-frame . ,(selected-frame)) > (border-width . 3) > (internal-border-width . 3) > (child-frame-border-width . 3) > (vertical-scroll-bars . nil) > (horizontal-scroll-bars . nil) > (menu-bar-lines . 0) > (tool-bar-lines . 0) > (tab-bar-lines . 0) > (minibuffer . nil) > (undecorated . t) > (left . 0.5) > (top . 0.5) > (width . 20) > (height . 20) > (left-fringe . 0) > (right-fringe . 0) > (background-color . "blue"))) > (split-window-right) > (split-window-right)) Thanks. I don't think working around the problem by removing GTK widgets is a particularly good idea, since we could always go down to the GDK level and use gdk_window_lower (all children of a GtkFixed are children of its GDK window, like most other GTK container widgets.) I will look into that, because I think the same problem also exists on X.