From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 2/4] gtk: drop pointless code from gd_window_close
Date: Tue, 10 Apr 2018 11:24:44 +0200 [thread overview]
Message-ID: <20180410092446.26903-3-kraxel@redhat.com> (raw)
In-Reply-To: <20180410092446.26903-1-kraxel@redhat.com>
Unregistering the display change listener looks like a pointless
excercise given we'll exit in a moment. When exiting qemu via
menu/file/quit this will not happen either. Just drop the code.
Also return TRUE unconditionally. This will tell gtk to ignore the
close request, so gtk will not start destroying widgets and causing
warnings due to UI code trying to talk to widgets which are gone.
Just depend on qmp_quit() doing it's job instead.
Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20180314080439.4229-1-kraxel@redhat.com>
---
ui/gtk.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index e98ac4d2fc..bb3214cffb 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -786,21 +786,13 @@ static gboolean gd_window_close(GtkWidget *widget, GdkEvent *event,
{
GtkDisplayState *s = opaque;
bool allow_close = true;
- int i;
if (s->opts->has_window_close && !s->opts->window_close) {
allow_close = false;
}
if (allow_close) {
- for (i = 0; i < s->nb_vcs; i++) {
- if (s->vc[i].type != GD_VC_GFX) {
- continue;
- }
- unregister_displaychangelistener(&s->vc[i].gfx.dcl);
- }
qmp_quit(NULL);
- return FALSE;
}
return TRUE;
--
2.9.3
next prev parent reply other threads:[~2018-04-10 9:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 9:24 [Qemu-devel] [PULL 0/4] Ui 20180410 patches Gerd Hoffmann
2018-04-10 9:24 ` [Qemu-devel] [PULL 1/4] ui: fix keymap detection under Xwayland Gerd Hoffmann
2018-04-10 9:24 ` Gerd Hoffmann [this message]
2018-04-10 9:24 ` [Qemu-devel] [PULL 3/4] configure: don't warn GTK if disabled Gerd Hoffmann
2018-04-10 9:24 ` [Qemu-devel] [PULL 4/4] configure: don't warn SDL abi " Gerd Hoffmann
2018-04-10 14:18 ` [Qemu-devel] [PULL 0/4] Ui 20180410 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180410092446.26903-3-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).