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.devel Subject: Re: Deiconifying GTK frames on GNOME shell Date: Wed, 8 Dec 2021 12:00:56 +0100 Message-ID: <42555c74-d13d-64eb-d0ff-fd775ee97b8a@gmx.at> References: <366d9251-3609-9e0b-3d35-8af409af706a@gmx.at> <20211206.210507.1015981090870439275.enometh@meer.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1319158237DD5859C0BD7DD0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8739"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , Yuuki Harano , emacs-devel@gnu.org To: Madhu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 08 12:02:35 2021 Return-path: Envelope-to: ged-emacs-devel@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 1muuiZ-00026a-DG for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 12:02:35 +0100 Original-Received: from localhost ([::1]:35508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muuiY-0008DV-Df for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 06:02:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muuhN-0007AG-9Q for emacs-devel@gnu.org; Wed, 08 Dec 2021 06:01:21 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:35577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muuhJ-0008AL-2G for emacs-devel@gnu.org; Wed, 08 Dec 2021 06:01:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1638961260; bh=Pwi6m+hmr7/XRiyXBVAI6yr7W17SqPKOe9jFv+P94Gg=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=NHobzo22mM2zRnSsRjdyHPtynY5EXAlnSXPsIeSH5EZtsvyZGDRbhKrHxWf/dtA5j mLesL3pE/6FUgQxaAvdGZFqTqYCjQ0cxx4FXCudv5PIYkuutdV4I3BioiceIlwbKKH fZNGCfmOqGh81LV9gmvlz6MGgQPOn9AcB/1E00aY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.228]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MAwXh-1modHx1ocr-00BNUp; Wed, 08 Dec 2021 12:01:00 +0100 In-Reply-To: <20211206.210507.1015981090870439275.enometh@meer.net> Content-Language: en-US X-Provags-ID: V03:K1:eJOOY06Pm52A52m8f71hdMQAW/1U8EV9osiLo2ynGs1bsOc/Wq2 GkQ24VRlPsc4nPXaIE79Q1NgyOQTDkkhEzrYYMtdav0CH6+dbyVWqt9EyN3jcwMYVcgjnx/ nJ2Dw/gy4Bo6wOHB3G4jsn/xd0j3LDvvRJ+NX8g/9lH8mOsKSxHzNnwSmUJSkQNqCSeN2n8 CE106LZy346uIrIdvv8ew== X-UI-Out-Filterresults: notjunk:1;V03:K0:11lRYa+jdHA=:rlHFC7A/a9EKToRRSM1uAt rhMviV7DVyahQ6H1OQ5A7/aV1fBPUd3hjzi3QMdeX4z2KZU9Wv2PfvtoHrdRZ6c125x+Ei/WY Hc/ify9+ZqQR0lH2NKZ//KJWK/AWMooWMAJUgpKCmSaIMN0VfK8xzz19bI03+dAGxwnJxu75r XwUU5Awbqa99MEk+Vftvu2FHcM5MA+MYlabsqTkPQUpAHHRUPTSoRRUTio0rI1aL1m9VzOmpA 6yXmPlXd0Xnaas/oz+a9+sufkNYDb0GFXL9AcXlDLEYtUS3JwTomF6V5gEG0zSmdGtSXRKIET wNUiyeNAUMtawwo9o7dDxCZ0OqfslWS+oPAVE0a2UL8AvxlpMDajuGr6IQiSoSp4KLsR+Xb2g wk3HHw7wMfo8Cl3rUSsA2JIqqOWqOvu2ntO+1wBfeVDXdD4TaZXgmlfEl63OmCYo5++p8J+nB gOaXJcFiwbPzdJbryUtDyYYAEdcL8JIG9sLqdvwVJ5s6CIavJFlDLTAqGlVshhCrbssJv1AR/ 5wslese6GHJM93Zkl76kUzkuz34Ut4N0X8iJaZ3Re93Ig08Vf+6LmNqcFts4+NsR3tY4A/Ls0 +OAjbfVh2YrVN8VxDJATKRnDeXhefg8Ly2LATf3NRC8jJMRpZ6tymH314dnDptFVNHp43gJjw uLv97TAMZmVF9EVRaFyZC86KZQz0Xt8rYXA3cMjMK7/3lU1OGYmDNvZO/gN+M7q/cQL0lM6wn ckkbtKP2d3mSt1dH/sB1n7xjTBX4YObsBGMiVOBqZHya5uZwTfARSlFPpwVK0RM5LNByoDXc Received-SPF: pass client-ip=212.227.17.22; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281334 Archived-At: This is a multi-part message in MIME format. --------------1319158237DD5859C0BD7DD0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > Implementing that in pgtk with the attached patch seems to work. To > test: > > emacs -Q -l test.el > > (setq $a (make-frame)); move the new frame out of the way and > ;; go back to the first frame. > (select-frame-set-input-focus $a) > ;; after the patch this sets the input focus - on mutter 41 the cursor > ;; is still over the old window > > I'm hoping a pgtk user can test this/comment on if this is a right > approach? Yuuki Harano, Po Lu - any comments on that patch? TIA, martin --------------1319158237DD5859C0BD7DD0 Content-Type: text/x-patch; name="pgtk-workaround-frame-focus-on-wayland.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="pgtk-workaround-frame-focus-on-wayland.patch" >>From 8f3fcc9e80fbff04165c6a3f8bcc05b91c270268 Mon Sep 17 00:00:00 2001 From: Madhu Date: Mon, 6 Dec 2021 20:55:45 +0530 Subject: [PATCH] pgtkterm: workaround frame focus on wayland * src/pgktterm.c: (pgtk_focus_frame): force wayland to raise the frame with a call to gtk_window_present_with_time with a faked up timestamp. =2D-- src/pgtkterm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pgtkterm.c b/src/pgtkterm.c index bf863c8474..499a4dd03a 100644 =2D-- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -4381,6 +4381,10 @@ pgtk_focus_frame (struct frame *f, bool noactivate) { block_input (); gtk_widget_grab_focus (wid); + if (FRAME_GTK_OUTER_WIDGET (f)) + { + gtk_window_present_with_time (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),= g_get_monotonic_time () / 1000L); + } unblock_input (); } } =2D- 2.31.0 --------------1319158237DD5859C0BD7DD0--