[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 01/15] ui & main loop: Redesign of system-specific main th
From: |
Phil Dennis-Jordan |
Subject: |
Re: [PATCH v8 01/15] ui & main loop: Redesign of system-specific main thread event handling |
Date: |
Sun, 10 Nov 2024 16:15:06 +0100 |
On Sun, 10 Nov 2024 at 08:10, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>
> On 2024/11/10 16:08, Phil Dennis-Jordan wrote:
> >
> >
> > On Sun 10. Nov 2024 at 08:01, Akihiko Odaki <akihiko.odaki@daynix.com
> > <mailto:akihiko.odaki@daynix.com>> wrote:
> >
> > On 2024/11/08 23:46, Phil Dennis-Jordan wrote:
> > > macOS's Cocoa event handling must be done on the initial (main)
> > thread
> > > of the process. Furthermore, if library or application code uses
> > > libdispatch, the main dispatch queue must be handling events on
> > the main
> > > thread as well.
> > >
> > > So far, this has affected Qemu in both the Cocoa and SDL UIs,
> > although
> > > in different ways: the Cocoa UI replaces the default qemu_main
> > function
> > > with one that spins Qemu's internal main event loop off onto a
> > > background thread. SDL (which uses Cocoa internally) on the other
> > hand
> > > uses a polling approach within Qemu's main event loop. Events are
> > > polled during the SDL UI's dpy_refresh callback, which happens to run
> > > on the main thread by default.
> >
> > GTK should also do the same as SDL and requires treatment; I forgot to
> > note that in previous reviews.
> >
> >
> > Although it‘s possible to build Qemu with GTK support enabled on macOS,
> > that UI doesn’t actually work on macOS at all, and apparently hasn’t
> > been supported since 2018, see:
> > https://stackoverflow.com/a/51474795 <https://stackoverflow.com/a/51474795>
> >
> > I don’t think there’s any point making adjustments to the GTK code by
> > guessing what might be needed if someone did fix that to work with macOS
> > at some point.
>
> But there is a GitLab issue saying it "sometimes" crashes, implying it
> works otherwise:
> https://gitlab.com/qemu-project/qemu/-/issues/2539
I spent some time trying to get the GTK GUI working locally on macOS
with no success (with or without the pvg/vmapple patch set) until I
found various info online suggesting it was broken. But I guess I can
add a qemu_main = NULL; line to gtk_display_init(). This will retain
the existing behaviour both on other platforms (where qemu_main is
NULL anyway) and if anyone does manage to use it on macOS.
- [PATCH v8 00/15] macOS PV Graphics and new vmapple machine type, Phil Dennis-Jordan, 2024/11/08
- [PATCH v8 01/15] ui & main loop: Redesign of system-specific main thread event handling, Phil Dennis-Jordan, 2024/11/08
- Re: [PATCH v8 01/15] ui & main loop: Redesign of system-specific main thread event handling, Akihiko Odaki, 2024/11/10
- Re: [PATCH v8 01/15] ui & main loop: Redesign of system-specific main thread event handling, Daniel P . Berrangé, 2024/11/11
- Re: [PATCH v8 01/15] ui & main loop: Redesign of system-specific main thread event handling, Phil Dennis-Jordan, 2024/11/11
- Re: [PATCH v8 01/15] ui & main loop: Redesign of system-specific main thread event handling, BALATON Zoltan, 2024/11/11
- Re: [PATCH v8 01/15] ui & main loop: Redesign of system-specific main thread event handling, Phil Dennis-Jordan, 2024/11/11
- Re: [PATCH v8 01/15] ui & main loop: Redesign of system-specific main thread event handling, BALATON Zoltan, 2024/11/11
[PATCH v8 02/15] hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support, Phil Dennis-Jordan, 2024/11/08