From patchwork Mon Nov 3 22:27:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 40082 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C9C7A21894 for ; Mon, 3 Nov 2014 22:28:31 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id ge10sf6816219lab.9 for ; Mon, 03 Nov 2014 14:28:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:references:in-reply-to:cc:subject:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=NZfkhlBt8LejL84+2QvFdgn7eRt9F4zPMqaqh9j0ab4=; b=dWxHFQOkScBrGOZnRvIsgH+A1jkKFn6IjmlAibtYVNOVBrAzm/RImM6wJv9KGt7g84 8C23KPjSfCMn1AGMiIMOZUDLnc5WQVzqY7wLG++DPeJ6cAsC7Jqp63KvqSIfOR0OSkNM XF3If+lqniDL+q11cXETsmGvh0ynnwLEJjC8LpoyMjYOU4ZW5IG8ictcMHq3dMSjtNBz SPHIuTvhUkv/KWQNt4ixHKKDH1pZDJWZ6lyjJ5stcgZUkvSxinDhPqG1KjjnhE1jtg/A rqQggfRXm1bpNbPfMA5CoHrc26PMrUHeZaYe7HiR7A3GCFYhZFbGQhzIQsCde1P33cvo Qlkg== X-Gm-Message-State: ALoCoQnna+9LOujPsKeMYtfLoGfONJgj3RaohZ/SeoGtF6tDoIVZsOewsGgSjDwka6/6hoxFKOV5 X-Received: by 10.194.176.106 with SMTP id ch10mr23797wjc.6.1415053710329; Mon, 03 Nov 2014 14:28:30 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.167 with SMTP id kr7ls762455lac.94.gmail; Mon, 03 Nov 2014 14:28:30 -0800 (PST) X-Received: by 10.152.1.74 with SMTP id 10mr25783819lak.61.1415053710048; Mon, 03 Nov 2014 14:28:30 -0800 (PST) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id gd7si34421330lbc.83.2014.11.03.14.28.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Nov 2014 14:28:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id pn19so5029136lab.18 for ; Mon, 03 Nov 2014 14:28:29 -0800 (PST) X-Received: by 10.152.29.8 with SMTP id f8mr54432593lah.56.1415053709661; Mon, 03 Nov 2014 14:28:29 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp34617lbc; Mon, 3 Nov 2014 14:28:28 -0800 (PST) X-Received: by 10.224.32.65 with SMTP id b1mr69242469qad.30.1415053708237; Mon, 03 Nov 2014 14:28:28 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id q6si16723348qas.32.2014.11.03.14.28.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 03 Nov 2014 14:28:28 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:37581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlQ6t-00009s-BU for patch@linaro.org; Mon, 03 Nov 2014 17:28:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlQ6L-0008HC-T6 for qemu-devel@nongnu.org; Mon, 03 Nov 2014 17:28:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlQ6F-00062j-M2 for qemu-devel@nongnu.org; Mon, 03 Nov 2014 17:27:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlQ6F-00062P-FC for qemu-devel@nongnu.org; Mon, 03 Nov 2014 17:27:47 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA3MRep6014339 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Nov 2014 17:27:41 -0500 Received: from colepc.home (ovpn-113-174.phx2.redhat.com [10.3.113.174]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sA3MRdxx002019; Mon, 3 Nov 2014 17:27:40 -0500 Message-ID: <5458015B.6080902@redhat.com> Date: Mon, 03 Nov 2014 17:27:39 -0500 From: Cole Robinson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "Daniel P. Berrange" , Kevin Wolf References: <20141103140649.2826515c.cornelia.huck@de.ibm.com> <20141103131135.GA22901@noname.str.redhat.com> <20141103133214.GB31724@redhat.com> In-Reply-To: <20141103133214.GB31724@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id sA3MRep6014339 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Cornelia Huck , qemu-devel@nongnu.org, Gerd Hoffmann Subject: Re: [Qemu-devel] ui/gtk.c vs old gtk versions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: crobinso@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 On 11/03/2014 08:32 AM, Daniel P. Berrange wrote: > On Mon, Nov 03, 2014 at 02:11:35PM +0100, Kevin Wolf wrote: >> Am 03.11.2014 um 14:06 hat Cornelia Huck geschrieben: >>> After the latest gtk updates, master fails to build for me on a >>> SLES11SP3 machine: >>> >>> /home/cohuck/git/qemu/ui/gtk.c: In function ‘gd_key_event’: >>> /home/cohuck/git/qemu/ui/gtk.c:943: error: ‘GDK_KEY_Pause’ undeclared (first use in this function) >>> /home/cohuck/git/qemu/ui/gtk.c:943: error: (Each undeclared identifier is reported only once >>> /home/cohuck/git/qemu/ui/gtk.c:943: error: for each function it appears in.) >>> >>> Of course, the gtk version is not the freshest: >>> >>> pkg-config --modversion "gtk+-2.0" >>> 2.18.9 >>> >>> On machines with less-ancient gtk (say 2.24) everything builds fine. >>> >>> I don't really care about gtk support on the SLES11 machine (it's s390 >>> anyway), but we should probably either fence the pause key support or >>> have configure require a more recent version. >> >> I think I saw the same thing on RHEL 6 (and hacked around it because I >> didn't have time to investigate it). > > In older versions of GDK, the constants were lacking the 'KEY_' part, > so it would have just been GDK_Pause. > > In GTK-VNC I worked around this by adding this kind of thing to our > source > > #ifndef GDK_Return > #define GDK_Return GDK_KEY_Return > #endif > > Since there was a fairly small set of key constants that we needed to > care about. > Indeed ui/gtk.c already has a number of similar workarounds. Untested fix below. Cornelia or Kevin, can you confirm? - Cole #define HOTKEY_MODIFIERS (GDK_CONTROL_MASK | GDK_MOD1_MASK) Tested-by: Kevin Wolf diff --git a/ui/gtk.c b/ui/gtk.c index de564cc..38bf463 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -128,6 +128,7 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh) #define GDK_KEY_q GDK_q #define GDK_KEY_plus GDK_plus #define GDK_KEY_minus GDK_minus +#define GDK_KEY_Pause GDK_Pause #endif