All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] SDL2 UI behavior of switching views
@ 2018-01-28 15:43 Anatoly Trosinenko
  2018-01-29  8:27 ` Gerd Hoffmann
  0 siblings, 1 reply; 9+ messages in thread
From: Anatoly Trosinenko @ 2018-01-28 15:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

When QEMU is run with GTK UI, it changes what is drawn on its single window
when I press Ctrl-Alt-{1,2,3,4}. But when I use SDL2 UI, it opens multiple
windows: a separate window per each view (display, monitor, serial,
parallel). Is it by design or is it a bug?

-- 
Best regards,
Anatoly Trosinenko
e-mail: anatoly.trosinenko@gmail.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] SDL2 UI behavior of switching views
  2018-01-28 15:43 [Qemu-devel] SDL2 UI behavior of switching views Anatoly Trosinenko
@ 2018-01-29  8:27 ` Gerd Hoffmann
  2018-01-29  9:45   ` Anatoly Trosinenko
  2018-01-29 18:21   ` BALATON Zoltan
  0 siblings, 2 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2018-01-29  8:27 UTC (permalink / raw)
  To: Anatoly Trosinenko; +Cc: qemu-devel

On Sun, Jan 28, 2018 at 06:43:44PM +0300, Anatoly Trosinenko wrote:
> When QEMU is run with GTK UI, it changes what is drawn on its single window
> when I press Ctrl-Alt-{1,2,3,4}. But when I use SDL2 UI, it opens multiple
> windows: a separate window per each view (display, monitor, serial,
> parallel). Is it by design or is it a bug?

It's intentional.  With gtk you can have separate windows too (try "View/Detach Tab").

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] SDL2 UI behavior of switching views
  2018-01-29  8:27 ` Gerd Hoffmann
@ 2018-01-29  9:45   ` Anatoly Trosinenko
  2018-01-29 18:21   ` BALATON Zoltan
  1 sibling, 0 replies; 9+ messages in thread
From: Anatoly Trosinenko @ 2018-01-29  9:45 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

Got it, thank you!

29 янв. 2018 г. 11:27 ДП пользователь "Gerd Hoffmann" <kraxel@redhat.com>
написал:

> On Sun, Jan 28, 2018 at 06:43:44PM +0300, Anatoly Trosinenko wrote:
> > When QEMU is run with GTK UI, it changes what is drawn on its single
> window
> > when I press Ctrl-Alt-{1,2,3,4}. But when I use SDL2 UI, it opens
> multiple
> > windows: a separate window per each view (display, monitor, serial,
> > parallel). Is it by design or is it a bug?
>
> It's intentional.  With gtk you can have separate windows too (try
> "View/Detach Tab").
>
> cheers,
>   Gerd
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] SDL2 UI behavior of switching views
  2018-01-29  8:27 ` Gerd Hoffmann
  2018-01-29  9:45   ` Anatoly Trosinenko
@ 2018-01-29 18:21   ` BALATON Zoltan
  2018-01-30  9:21     ` Gerd Hoffmann
  1 sibling, 1 reply; 9+ messages in thread
From: BALATON Zoltan @ 2018-01-29 18:21 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

On Mon, 29 Jan 2018, Gerd Hoffmann wrote:
> On Sun, Jan 28, 2018 at 06:43:44PM +0300, Anatoly Trosinenko wrote:
>> When QEMU is run with GTK UI, it changes what is drawn on its single window
>> when I press Ctrl-Alt-{1,2,3,4}. But when I use SDL2 UI, it opens multiple
>> windows: a separate window per each view (display, monitor, serial,
>> parallel). Is it by design or is it a bug?
>
> It's intentional.  With gtk you can have separate windows too (try "View/Detach Tab").

Is there an option also to get back the old SDL1 behaviour with SDL2? 
Could that be made the default to make the transition easier?

Regards,
BALATON Zoltan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] SDL2 UI behavior of switching views
  2018-01-29 18:21   ` BALATON Zoltan
@ 2018-01-30  9:21     ` Gerd Hoffmann
  2018-01-30 13:35       ` BALATON Zoltan
  0 siblings, 1 reply; 9+ messages in thread
From: Gerd Hoffmann @ 2018-01-30  9:21 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: qemu-devel

On Mon, Jan 29, 2018 at 07:21:02PM +0100, BALATON Zoltan wrote:
> On Mon, 29 Jan 2018, Gerd Hoffmann wrote:
> > On Sun, Jan 28, 2018 at 06:43:44PM +0300, Anatoly Trosinenko wrote:
> > > When QEMU is run with GTK UI, it changes what is drawn on its single window
> > > when I press Ctrl-Alt-{1,2,3,4}. But when I use SDL2 UI, it opens multiple
> > > windows: a separate window per each view (display, monitor, serial,
> > > parallel). Is it by design or is it a bug?
> > 
> > It's intentional.  With gtk you can have separate windows too (try "View/Detach Tab").
> 
> Is there an option also to get back the old SDL1 behaviour with SDL2? Could
> that be made the default to make the transition easier?

Well, that kind of flexibility is alot harder to do with SDL as it
doesn't offer widgets to manage views ...

In contrast gtk has one widget per virtual console, and I can easily
shuffle around them: Just reparent from notebook to standalone window
("detach tab") and visa-versa (when closing the detached window).

How about using gtk instead?

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] SDL2 UI behavior of switching views
  2018-01-30  9:21     ` Gerd Hoffmann
@ 2018-01-30 13:35       ` BALATON Zoltan
  2018-01-30 14:58         ` Gerd Hoffmann
  0 siblings, 1 reply; 9+ messages in thread
From: BALATON Zoltan @ 2018-01-30 13:35 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

On Tue, 30 Jan 2018, Gerd Hoffmann wrote:
> On Mon, Jan 29, 2018 at 07:21:02PM +0100, BALATON Zoltan wrote:
>> Is there an option also to get back the old SDL1 behaviour with SDL2? Could
>> that be made the default to make the transition easier?
>
> Well, that kind of flexibility is alot harder to do with SDL as it
> doesn't offer widgets to manage views ...

How did it work with SDL1 and what prevents it from working the same way 
with SDL2?

> How about using gtk instead?

That's not a solution to the problem. Why do we have other backends than 
gtk if they aren't meant to be used? (Others already gave reasons to 
prefer SDL over gtk such as leaner, simpler interface which is also faster 
to start up, also useful if one dosen't need any of the frills the gtk 
interface provides or uses QEMU on a low-end system or platform where gtk 
is not supported.)

Regards,
BALATON Zoltan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] SDL2 UI behavior of switching views
  2018-01-30 13:35       ` BALATON Zoltan
@ 2018-01-30 14:58         ` Gerd Hoffmann
  2018-01-30 20:09           ` BALATON Zoltan
  0 siblings, 1 reply; 9+ messages in thread
From: Gerd Hoffmann @ 2018-01-30 14:58 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: qemu-devel

On Tue, Jan 30, 2018 at 02:35:02PM +0100, BALATON Zoltan wrote:
> On Tue, 30 Jan 2018, Gerd Hoffmann wrote:
> > On Mon, Jan 29, 2018 at 07:21:02PM +0100, BALATON Zoltan wrote:
> > > Is there an option also to get back the old SDL1 behaviour with SDL2? Could
> > > that be made the default to make the transition easier?
> > 
> > Well, that kind of flexibility is alot harder to do with SDL as it
> > doesn't offer widgets to manage views ...
> 
> How did it work with SDL1 and what prevents it from working the same way
> with SDL2?

SDL1 has a single window for all consoles.
SDL2 has one window for each console.

Fixed.  Not switchable, neither for SDL1 nor for SDL2.

It sure is possible to make it runtime switchable, but I expect it is
more much difficuilt to code up when compared to gtk due to the lack of
widgets.  gtk has one widget per console, I can hook the console widgets
into my widget/window tree as I like and gtk handles alot of the
management for me.

But feel free to try and send patches.

> > How about using gtk instead?
> 
> That's not a solution to the problem. Why do we have other backends than gtk
> if they aren't meant to be used?

Well, I personally prefer the gtk ui, so my personal focus is there.
I basically run SDL only when testing patches or when touching qemu
console interfaces and coding up the SDL part of it.

BTW: Is anyone who uses SDL more regularely than I do willing to (co-)
maintain the SDL interface?

> (Others already gave reasons to prefer SDL
> over gtk such as leaner, simpler interface

Can't see much of a difference here.  gtk has a menu bar, sdl hasn't,
otherwise the two look the same and most hotkeys are the same too.

Adding an option to hide the gtk menu bar shouldn't be much of an issue,
some code for that is already there as gtk hides the menu bar in
fullscreen mode.

> which is also faster to start up,

qemu startup is instant for me no matter which UI (maybe because I run
gnome so all the shared libs are already in memory).

> also useful if one dosen't need any of the frills the gtk interface provides

You can just ignore the stuff you don't need, it doesn't hurt ...

> or uses QEMU on a low-end system or

Seriously?  Running virtual machines on a system that low-end that gtk
overhead is is an issue?

> platform where gtk is not supported.)

Do we have any?

I think at the end of the day it boils down to personal preference.
Which is perfectly fine.  But it needs someone who finds sdl important
enough to step up and care about it.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] SDL2 UI behavior of switching views
  2018-01-30 14:58         ` Gerd Hoffmann
@ 2018-01-30 20:09           ` BALATON Zoltan
  2018-01-31  7:13             ` Gerd Hoffmann
  0 siblings, 1 reply; 9+ messages in thread
From: BALATON Zoltan @ 2018-01-30 20:09 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

On Tue, 30 Jan 2018, Gerd Hoffmann wrote:
> SDL1 has a single window for all consoles.
> SDL2 has one window for each console.
>
> Fixed.  Not switchable, neither for SDL1 nor for SDL2.
>
> It sure is possible to make it runtime switchable, but I expect it is
> more much difficuilt to code up when compared to gtk due to the lack of
> widgets.  gtk has one widget per console, I can hook the console widgets
> into my widget/window tree as I like and gtk handles alot of the
> management for me.

I think it does not have to be runtime switchable in the sense that the 
setting does not need to be changable during run (like in gtk) because we 
don't have a UI for changing it anyway. It's enough to have an option to 
decide it once at startup, in case that's easier to implement. If not then 
I guess this will remain as it is now but it's unfortunate to change the 
previous behaviour with a version change for no good reason.

> But feel free to try and send patches.

Unortunately I know nothing about this code and don't have time nor much 
inclination to learn it now. So unless you can at least give some hints on 
what would need to be done I can't send patches for this.

> Can't see much of a difference here.  gtk has a menu bar, sdl hasn't,
> otherwise the two look the same and most hotkeys are the same too.
>
> Adding an option to hide the gtk menu bar shouldn't be much of an issue,
> some code for that is already there as gtk hides the menu bar in
> fullscreen mode.

There's also a version change going on on the gtk side moving from gtk 2 
to 3 which brought similar issues: old behaviour is changed and not 
working the same way any more, themes are broken, more dependencies 
introduced and so on. (Not specifically in QEMU but generally for all gtk 
apps.) Using SDL was also a way to avoid those problems, but then it all 
happens there again.

> I think at the end of the day it boils down to personal preference.
> Which is perfectly fine.  But it needs someone who finds sdl important
> enough to step up and care about it.

I think people who used SDL so far were happy with the way it worked 
before and that's why there wasn't a need to change until now that a 
version update brought unexpected UI changes.

Regards,
BALATON Zoltan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] SDL2 UI behavior of switching views
  2018-01-30 20:09           ` BALATON Zoltan
@ 2018-01-31  7:13             ` Gerd Hoffmann
  0 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2018-01-31  7:13 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: qemu-devel

  Hi,

> I think it does not have to be runtime switchable in the sense that the
> setting does not need to be changable during run (like in gtk) because we
> don't have a UI for changing it anyway. It's enough to have an option to
> decide it once at startup, in case that's easier to implement.

Yes, a global switch (so all consoles are in the same mode) is probably
easier to implement.

> If not then I guess this will remain as it is now but it's unfortunate
> to change the previous behaviour with a version change for no good
> reason.

Well, I find it quite useful to see windows side by side.  For example
in case of a multihead setup, or to see vga and serial console at the
same time ...

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-31  7:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-28 15:43 [Qemu-devel] SDL2 UI behavior of switching views Anatoly Trosinenko
2018-01-29  8:27 ` Gerd Hoffmann
2018-01-29  9:45   ` Anatoly Trosinenko
2018-01-29 18:21   ` BALATON Zoltan
2018-01-30  9:21     ` Gerd Hoffmann
2018-01-30 13:35       ` BALATON Zoltan
2018-01-30 14:58         ` Gerd Hoffmann
2018-01-30 20:09           ` BALATON Zoltan
2018-01-31  7:13             ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.