Fullscreen Bug with GTK
Hello, we're setting up a cluster of Fedora boxes at my company. Qemu is added because some partners may need or expect a fully functional Windows environment. Everyone who expects Windows or might be irritated by seeing anything else should remain oblivious to the fact that it's running a VM. So it's crucial that fullscreen works. Along the same lines, it's important that fullscreen can be activated by commandline (so that Qemu starts in fullscreen and hasn't to be taken there by the user).
There is a bug where the GTK (SDL appears to be broken due to some sdl2 incompatibility, as I understood) menu bar won't hide in fullscreen:
https://bugs.launchpad.net/qemu/+bug/1294898
A patch was provided by the initial reporter a long time ago. I was hoping that this could receive a bit of attention, since 3.8 can now widely be expected in the GTK3 line.
(Aside: I have no chance to try this now but I think the -full-screen switch is also broken for GTK).
Thanks!
Cedric
Hi,
Quoted 2 lines
There is a bug where the GTK (SDL appears to be broken due to some sdl2 incompatibility, as I understood) menu bar won't hide in fullscreen:
SDL-1 support is still there.
Quoted 3 lines
https://bugs.launchpad.net/qemu/+bug/1294898
A patch was provided by the initial reporter a long time ago.
Patch trades one bug for another. Hiding the menu bar also kills the accelerator keys, which is especially problematic for the fullscreen hotkey as there is no way out of fullscreen mode then.
cheers,
Gerd
Quoted 6 lines · * Gerd Hoffmann ([email protected]) wrote:
Hi,
Quoted 2 lines
There is a bug where the GTK (SDL appears to be broken due to some sdl2 incompatibility, as I understood) menu bar won't hide in fullscreen:
SDL-1 support is still there.
Are you recommending building against SDL-1 even when SDL-2 is available? (Does that lose you anything?)
(I've cc'd Cole in since Fedora's virt-preview is building it with SDL-2).
Quoted 7 lines
Quoted 3 lines
https://bugs.launchpad.net/qemu/+bug/1294898
A patch was provided by the initial reporter a long time ago.
Patch trades one bug for another. Hiding the menu bar also kills the accelerator keys, which is especially problematic for the fullscreen hotkey as there is no way out of fullscreen mode then.
Dave
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 10 lines · Dr. David Alan Gilbert
Quoted 6 lines · * Gerd Hoffmann ([email protected]) wrote:
Hi,
Quoted 2 lines
There is a bug where the GTK (SDL appears to be broken due to some sdl2 incompatibility, as I understood) menu bar won't hide in fullscreen:
SDL-1 support is still there.
Are you recommending building against SDL-1 even when SDL-2 is available? (Does that lose you anything?)
There are some rough edges still, I havn't flipped the default to SDL-2 yet in upstream qemu because of that.
So unless you depend on something new only provided by SDL2 (such as multi-window support) your best bet is building with SDL1 instead. Unfortunately we can't build both and switch at runtime.
Patches are accepted too ;)
cheers,
Gerd
Quoted 7 lines
Quoted 3 lines
https://bugs.launchpad.net/qemu/+bug/1294898
A patch was provided by the initial reporter a long time ago.
Patch trades one bug for another. Hiding the menu bar also kills the accelerator keys, which is especially problematic for the fullscreen hotkey as there is no way out of fullscreen mode then.
How do you come to that conclusion? The reporter explicitly mentioned that removing the Menu disables the Accels and therefore he has provided a patch which attaches the Accels to the Window instead (which, in fact, is how it should be done).
Quoted 9 lines · Cedric Sodhi
Quoted 7 lines
Quoted 3 lines
https://bugs.launchpad.net/qemu/+bug/1294898
A patch was provided by the initial reporter a long time ago.
Patch trades one bug for another. Hiding the menu bar also kills the accelerator keys, which is especially problematic for the fullscreen hotkey as there is no way out of fullscreen mode then.
How do you come to that conclusion?
I've tried to fix that before, without success.
Quoted 3 lines
The reporter explicitly mentioned that removing the Menu disables the Accels and therefore he has provided a patch which attaches the Accels to the Window instead (which, in fact, is how it should be done).
Oh, missed that detail. /me recommends submitting the patches to qemu-devel then (and cc me so I don't miss them).
cheers,
Gerd
Quoted 7 lines · Gerd Hoffmann
Quoted 3 lines · Cedric Sodhi
The reporter explicitly mentioned that removing the Menu disables the Accels and therefore he has provided a patch which attaches the Accels to the Window instead (which, in fact, is how it should be done).
Oh, missed that detail. /me recommends submitting the patches to qemu-devel then (and cc me so I don't miss them).
...with the appropriate signed-off-by lines, which are missing from the patch in the bug.
thanks
-- PMM
Sorry but whom do you expect to sign them off? I'm not a dev.
Quoted 7 lines · Gerd Hoffmann
Quoted 3 lines · Cedric Sodhi
The reporter explicitly mentioned that removing the Menu disables the Accels and therefore he has provided a patch which attaches the Accels to the Window instead (which, in fact, is how it should be done).
Oh, missed that detail. /me recommends submitting the patches to qemu-devel then (and cc me so I don't miss them).
...with the appropriate signed-off-by lines, which are missing from the patch in the bug.
thanks
-- PMM
Quoted 6 lines · Peter Maydell
Quoted 5 lines · Gerd Hoffmann
Quoted 3 lines · Cedric Sodhi
The reporter explicitly mentioned that removing the Menu disables the Accels and therefore he has provided a patch which attaches the Accels to the Window instead (which, in fact, is how it should be done).
Quoted 6 lines
Quoted 2 lines
Oh, missed that detail. /me recommends submitting the patches to qemu-devel then (and cc me so I don't miss them).
...with the appropriate signed-off-by lines, which are missing from the patch in the bug.
The patches in the original report were not meant to be submitted as is, and instead I hoped it would start a discussion, because they depend on APIs only available with gtk3.8, and the fallback loses some usefulness.
Also the example patch isn't complete, since I think we would want to install all the accelerators on the parent window, rather than just the fullscreen one. Then in fullscreen mode, every accelerator would continue to work, which matches SDL behavior IIRC. I think if someone fleshed out my patch examples it should be fine for them to use their own Signed-off-by. I don't have any plans to submit a patch myself in the short term.
Also there's other possible approaches. Like disabling accelerators entirely when in fullscreen mode, and instead use a hiding toolbar like virt-manager and virt-viewer do. danpb pointed out that gtk 3.10 has a GtkRevealer widget that could probably be used for that without having to import the autodrawer code that virt-viewer uses.
- Cole
Quoted 25 lines · Cole Robinson
Quoted 6 lines · Peter Maydell
Quoted 5 lines · Gerd Hoffmann
Quoted 3 lines · Cedric Sodhi
The reporter explicitly mentioned that removing the Menu disables the Accels and therefore he has provided a patch which attaches the Accels to the Window instead (which, in fact, is how it should be done).
Quoted 6 lines
Quoted 2 lines
Oh, missed that detail. /me recommends submitting the patches to qemu-devel then (and cc me so I don't miss them).
...with the appropriate signed-off-by lines, which are missing from the patch in the bug.
The patches in the original report were not meant to be submitted as is, and instead I hoped it would start a discussion, because they depend on APIs only available with gtk3.8, and the fallback loses some usefulness.
Also the example patch isn't complete, since I think we would want to install all the accelerators on the parent window, rather than just the fullscreen one. Then in fullscreen mode, every accelerator would continue to work, which matches SDL behavior IIRC. I think if someone fleshed out my patch examples it should be fine for them to use their own Signed-off-by. I don't have any plans to submit a patch myself in the short term.
Quoted 7 lines
Also there's other possible approaches. Like disabling accelerators entirely when in fullscreen mode, and instead use a hiding toolbar like virt-manager and virt-viewer do. danpb pointed out that gtk 3.10 has a GtkRevealer widget that could probably be used for that without having to import the autodrawer code that virt-viewer uses.
- Cole
Two things: First of all I think we can safely assume that said GTK version is supported by everyone who uses that version of Qemu.
Second, I think your patch is just perfect the way it is. It seems perfectly reasonable to have ONLY the Fullscreen shortcut work in Fullscreen and nothing else. I don't see any point in "zoom in" or "mouse grap" to function in fullscreen mode. Fullscreen is to simulate the environment as convincingly as possible in my opinion (at least that's what I'm trying to achieve).
The least thing I would want is an auto-hiding menubar, if you're thinking of one which shows up when you move the cursor to the top. That's as unpractical as it may get (I find those "auto" gimmicks pretty annoying everywhere. Gnome's magic shell corner is irritating enough)
Please sign off the patch, in my opinion it's perfect and in any case it's better than the way it currently is.
Thank you.