From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robin Green Newsgroups: gmane.emacs.bugs Subject: bug#4122: Quick fix Date: Mon, 31 Aug 2009 01:28:51 +0100 Organization: Swansea University Message-ID: <20090831012851.1ba99285@fedora> Reply-To: Robin Green , 4122@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/iL6nHZhzzDvlLvMCMtTxsUk" X-Trace: ger.gmane.org 1251715564 22716 80.91.229.12 (31 Aug 2009 10:46:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Aug 2009 10:46:04 +0000 (UTC) To: 4122@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 31 12:45:57 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mi4OZ-0008Mz-Ny for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Aug 2009 12:45:56 +0200 Original-Received: from localhost ([127.0.0.1]:50829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi4OZ-0004JI-5Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Aug 2009 06:45:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mi2qt-0007Nb-HP for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2009 05:07:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mi2qo-0007NO-H5 for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2009 05:07:02 -0400 Original-Received: from [199.232.76.173] (port=43813 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi2qo-0007NL-8d for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2009 05:06:58 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41492) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mi2qn-0002yu-Jw for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2009 05:06:57 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7V96tcg011541; Mon, 31 Aug 2009 02:06:55 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7V8o4ZC007345; Mon, 31 Aug 2009 01:50:04 -0700 Resent-Date: Mon, 31 Aug 2009 01:50:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Robin Green Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 31 Aug 2009 08:50:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4122 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4122-submit@emacsbugs.donarmstrong.com id=B4122.12517083416703 (code B ref 4122); Mon, 31 Aug 2009 08:50:04 +0000 Original-Received: (at 4122) by emacsbugs.donarmstrong.com; 31 Aug 2009 08:45:41 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.dnsexit.com (mail.dnsexit.com [67.214.171.75] (may be forged)) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7V8jdbj006699 for <4122@emacsbugs.donarmstrong.com>; Mon, 31 Aug 2009 01:45:41 -0700 Original-Received: from fedora (greenrd.plus.com [212.159.116.150]) by mail.dnsexit.com (Postfix) with ESMTP id A48D28B5D21 for <4122@emacsbugs.donarmstrong.com>; Mon, 31 Aug 2009 04:41:24 -0400 (EDT) X-Mailer: Claws Mail 3.7.2 (GTK+ 2.17.9; i686-redhat-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 31 Aug 2009 05:07:02 -0400 X-Mailman-Approved-At: Mon, 31 Aug 2009 06:37:08 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30677 Archived-At: --MP_/iL6nHZhzzDvlLvMCMtTxsUk Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline The attached patch against Emacs 23.1.1 fixes this bug for me. The patch can be used by emacs users and Linux distributors - who might need to lower the required GTK version. However, the patch would probably need to be modified before being checked in to emacs CVS, because it specifies a dependency on a very recent version of GTK - a more suitable patch for emacs CVS would use the C preprocessor to perform the old behaviour for old GTK versions, and the new behaviour for new GTK versions. --MP_/iL6nHZhzzDvlLvMCMtTxsUk Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=emacs-gtk.patch --- configure.in.orig 2009-08-31 00:18:44.000000000 +0100 +++ configure.in 2009-08-31 00:18:47.000000000 +0100 @@ -1514,7 +1514,7 @@ HAVE_GTK=no if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then GLIB_REQUIRED=2.6 - GTK_REQUIRED=2.6 + GTK_REQUIRED=2.17.9 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" dnl Checks for libraries. --- src/xfns.c.orig 2009-08-31 00:03:02.000000000 +0100 +++ src/xfns.c 2009-08-31 00:21:39.000000000 +0100 @@ -468,8 +468,10 @@ if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) continue; x = f->output_data.x; - /* Match if the window is this frame's menubar. */ #ifdef USE_GTK + /* Match if the window is this frame's window (button presses are no longer + caught by the menubar) or a menu in the menubar. + */ if (x->menubar_widget) { GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc); @@ -477,13 +479,14 @@ BLOCK_INPUT; if (gwdesc != 0 - && (gwdesc == x->menubar_widget + && (gwdesc == gtk_widget_get_parent (gtk_widget_get_parent (x->menubar_widget)) || gtk_widget_get_parent (gwdesc) == x->menubar_widget)) found = 1; UNBLOCK_INPUT; if (found) return f; } #else + /* Match if the window is in this frame's menubar */ if (x->menubar_widget && lw_window_is_in_menubar (wdesc, x->menubar_widget)) return f; --MP_/iL6nHZhzzDvlLvMCMtTxsUk--