From nobody Thu May 2 20:19:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1600805509; cv=none; d=zohomail.com; s=zohoarc; b=YXu3YJDcEW4TWXpXpZJeikl2N4tJaCrcwmVGjebtZQfsvUUExXudEXy6xcoroVWnKn7RW3m+B/OlmwMkmd96/5tcyk1BShtfrpYkkmYCip2IpQuf2dG+M7wr4AC8Y3QLnWWfJljAv0+TJN8l+DqV5BBgsJ9BjdHhd96xahp/xBA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600805509; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XbDxQTVqA8kl5mfGMCsOjq2G1CygE2P848g4hVT/tlQ=; b=As2lQmwENJzVp+GB7KId3hEg2JnFny9xySELyDtgOJGa7rD/L/5bIHj72b/ifFofUY4zmBCftHsXcFp+kDaH56MeHgiPFMVT2c9xoKQ5i9u/IHTC1jhVDM1T7IMOmD45hKSgc6Bcn4+SjtUPRXCSakowhvKNRGrMdMmi0Uyg/jI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600805509880753.775281753862; Tue, 22 Sep 2020 13:11:49 -0700 (PDT) Received: from localhost ([::1]:48978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKodg-0007NQ-23 for importer@patchew.org; Tue, 22 Sep 2020 16:11:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKocY-0006pB-Ce for qemu-devel@nongnu.org; Tue, 22 Sep 2020 16:10:38 -0400 Received: from hera.aquilenet.fr ([2a0c:e300::1]:60816) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKocW-0007Az-CR for qemu-devel@nongnu.org; Tue, 22 Sep 2020 16:10:38 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 070D5C30; Tue, 22 Sep 2020 22:10:31 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HGplNU9oF2B4; Tue, 22 Sep 2020 22:10:30 +0200 (CEST) Received: from function (lfbn-bor-1-56-204.w90-50.abo.wanadoo.fr [90.50.148.204]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 3CDA4BA6; Tue, 22 Sep 2020 22:10:30 +0200 (CEST) Received: from samy by function with local (Exim 4.94) (envelope-from ) id 1kKocO-000AmF-9k; Tue, 22 Sep 2020 22:10:28 +0200 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Date: Tue, 22 Sep 2020 22:10:28 +0200 From: Samuel Thibault To: qemu-devel@nongnu.org, Gerd Hoffmann Subject: [PATCH] ui: Fix default window_id value Message-ID: <20200922201028.uyy2malfqxkqbyxm@function> References: <20200914100637.eeommoflirxrgaeh@function> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20200914100637.eeommoflirxrgaeh@function> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: neutral client-ip=2a0c:e300::1; envelope-from=samuel.thibault@ens-lyon.org; helo=hera.aquilenet.fr X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" ./chardev/baum.c expects the default window_id value to be -1, and not 0 which could be confused with a proper window id (when numbered from 0 by the ui backend). This fixes getting Braille output with the curses and gtk frontends. Signed-off-by: Samuel Thibault Fixes: f29b3431f62 ("console: move window ID code from baum to sdl") Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- It would be useful to backport this to stable trees. diff --git a/ui/console.c b/ui/console.c index f8d7643fe4..beb733c833 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1310,6 +1310,7 @@ static QemuConsole *new_console(DisplayState *ds, con= sole_type_t console_type, } s->ds =3D ds; s->console_type =3D console_type; + s->window_id =3D -1; =20 if (QTAILQ_EMPTY(&consoles)) { s->index =3D 0;