From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akira Kyle Newsgroups: gmane.emacs.devel Subject: Re: PGTK-related misconceptions Date: Mon, 25 Jul 2022 15:18:31 -0600 Message-ID: <87czdszy2r.fsf@akirakyle.com> References: <87y202f4dq.fsf@treypeacock.com> <87o80xhor2.fsf@yahoo.com> <877d7lrbta.fsf@treypeacock.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21318"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.11; emacs 29.0.50 Cc: Po Lu , Morgan Smith , emacs-devel@gnu.org To: Trey Peacock Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 25 23:25:04 2022 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 1oG5ZW-0005Hd-MP for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jul 2022 23:25:02 +0200 Original-Received: from localhost ([::1]:55100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oG5ZV-00075b-Fi for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jul 2022 17:25:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oG5Xx-0006PE-HR for emacs-devel@gnu.org; Mon, 25 Jul 2022 17:23:25 -0400 Original-Received: from ms11p00im-qufo17291601.me.com ([17.58.38.45]:52366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oG5Xv-00081c-NR for emacs-devel@gnu.org; Mon, 25 Jul 2022 17:23:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akirakyle.com; s=sig1; t=1658784199; bh=2rHPVBGLcaLzJwNr3WXvI/gJ+CWlPpvtpJNuP2M1pnE=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=jnLVTQwvQ92U/fqsW7U+VK3tSV67R7vjhympWDGobEvwuht3uuTVrn1UvOZ1US09g 4QrwhxyGdupeq+4mit1Yz/tSrO2VsCy4esWpLvZMn/qe1IHkEjzdEkrgkfGWjpl+6x Ed5ccx+X75eFoMkBgDPOwJAQ5sNfFko8pYdlggrU+a6LF8/0nSHmyyFOGeHXsO5zYv be5Eqed+JcEy7BAR1y1H+qKPyYtusBX2gSCe0H+WGfbyHLU0wkC8d4/f6AHk7EUeNm nwzdxyYClUyHpfwXhdB/h64VzLto3tJJ3qxmdCEstYOcW2c1iEONc5gG7PqWEVmpT/ mGgSwYxYZrRDw== Original-Received: from data (ms11p00im-dlb-asmtpmailmevip.me.com [17.57.154.19]) by ms11p00im-qufo17291601.me.com (Postfix) with ESMTPSA id 21B613A04DB; Mon, 25 Jul 2022 21:23:17 +0000 (UTC) In-reply-to: <877d7lrbta.fsf@treypeacock.com> X-Proofpoint-GUID: J17kBISuqWAq9eIoKiPaMLXu2F0twmGg X-Proofpoint-ORIG-GUID: J17kBISuqWAq9eIoKiPaMLXu2F0twmGg X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.816,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-01-18=5F01:2022-01-14=5F01,2022-01-18=5F01,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=936 phishscore=0 clxscore=1030 spamscore=0 bulkscore=0 malwarescore=0 mlxscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2207250087 Received-SPF: pass client-ip=17.58.38.45; envelope-from=akira@akirakyle.com; helo=ms11p00im-qufo17291601.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:292655 Archived-At: On Tue, Apr 19, 2022 at 03:28 AM, Trey Peacock wrote: > Neither of the WMs I mentioned use GNOME Shell, but they do both > use > wlroots. Looking into this, it seems that any wlroots based > Wayland > compositor will use GDK_MOD4_MASK as Super. However, mutter > (GNOME's WM) > uses GDK_SUPER_MASK. Rebuilding emacs with the below patch seems > to have > fixed the issue. I'm not sure if there could be further > implications for > pgtk_emacs_to_gtk_modifiers. > > > diff --git a/src/pgtkterm.c b/src/pgtkterm.c > index 2b04699fb3..d8ca89bbc0 100644 > --- a/src/pgtkterm.c > +++ b/src/pgtkterm.c > @@ -5152,7 +5152,7 @@ pgtk_gtk_to_emacs_modifiers (struct > pgtk_display_info *dpyinfo, int state) > mod |= mod_ctrl; > if (state & GDK_META_MASK || state & GDK_MOD1_MASK) > mod |= mod_meta; > - if (state & GDK_SUPER_MASK) > + if (state & GDK_SUPER_MASK || state & GDK_MOD4_MASK) > mod |= mod_super; > if (state & GDK_HYPER_MASK) > mod |= mod_hyper; > @@ -5285,7 +5285,7 @@ key_press_event (GtkWidget *widget, > GdkEvent *event, gpointer *user_data) > /* While super is pressed, the input method will always > always > resend the key events ignoring super. As a workaround, > don't > filter key events with super or hyper pressed. */ > - if (!(event->key.state & (GDK_SUPER_MASK | > GDK_HYPER_MASK))) > + if (!(event->key.state & (GDK_SUPER_MASK | GDK_HYPER_MASK > | GDK_MOD4_MASK))) > { > if (pgtk_im_filter_keypress (f, &event->key)) > return TRUE; Thank you for this patch! I recently updated and ran into this issue. From the discussion in this thread, I really don't understand why this change was made. Is this fixing some issue for some other non-wlroots based compositor? If it isn't, but was just made "to comply with the GDK docs" this would seem to be just be making life more difficult for those of use on wlroots based compositors. Emacs has many other places where it tries to work around quirks and other issues with GTK for the benefit of the user, so why would this be any different?