* Re: [Qemu-devel] [PULL 0/8] gtk patch queue [not found] <1398764774-22595-1-git-send-email-kraxel@redhat.com> @ 2014-05-01 14:26 ` Peter Maydell [not found] ` <1398764774-22595-8-git-send-email-kraxel@redhat.com> 1 sibling, 0 replies; 9+ messages in thread From: Peter Maydell @ 2014-05-01 14:26 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: QEMU Developers On 29 April 2014 10:46, Gerd Hoffmann <kraxel@redhat.com> wrote: > Hi, > > Here comes the gtk patch queue, featuring a collection > of fixes and cleanups by Cole Robinson. > > please pull, > Gerd > > The following changes since commit e2da502c003b9a91b4aea7684959192bd07c1f1d: > > Merge remote-tracking branch 'remotes/otubo/seccomp' into staging (2014-04-28 14:14:35 +0100) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-gtk-6 > > for you to fetch changes up to 341a034742ffd87208fa51279537def21a8c39a7: > > gtk: Fix accelerators being triggered twice with gtk3 (2014-04-29 10:46:30 +0200) > > ---------------------------------------------------------------- > gtk: collection of fixes and cleanups by Cole Robinson > > ---------------------------------------------------------------- > Cole Robinson (8): > configure: Document --with-gtkabi > configure: Re-run make if gtkabi/sdlabi is changed > gtk: Don't use deprecated gtk_image_menu_item_new_with_mnemonic > gtk: Don't use deprecated vte_terminal_get_adjustment > gtk: Remove use of deprecated stock items > gtk: Use ctrl+alt+q for quit accelerator > gtk: Fix -serial vc > gtk: Fix accelerators being triggered twice with gtk3 Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <1398764774-22595-8-git-send-email-kraxel@redhat.com>]
* Re: [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc [not found] ` <1398764774-22595-8-git-send-email-kraxel@redhat.com> @ 2014-05-04 8:35 ` Jan Kiszka 2014-05-04 17:07 ` Cole Robinson 0 siblings, 1 reply; 9+ messages in thread From: Jan Kiszka @ 2014-05-04 8:35 UTC (permalink / raw) To: Gerd Hoffmann, qemu-devel, Cole Robinson; +Cc: Anthony Liguori [-- Attachment #1: Type: text/plain, Size: 4444 bytes --] On 2014-04-29 11:46, Gerd Hoffmann wrote: > From: Cole Robinson <crobinso@redhat.com> > > Try kicking off a rhel5 text install over serial, the text menu navigation > is all messed up, and some of the kernel boot messages are randomly > corrupted. > > Drop use of a pty and just use vte infrastructure for reading and writing. > This fixes the above corruption, and is simpler to boot. > > (I don't know what was wrong with the original code though. FWIW this is > what virt-manager has done for years). > > Signed-off-by: Cole Robinson <crobinso@redhat.com> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > ui/gtk.c | 41 +++++++++-------------------------------- > 1 file changed, 9 insertions(+), 32 deletions(-) > > diff --git a/ui/gtk.c b/ui/gtk.c > index c85aea3..1465a38 100644 > --- a/ui/gtk.c > +++ b/ui/gtk.c > @@ -115,7 +115,6 @@ typedef struct VirtualConsole > GtkWidget *scrolled_window; > CharDriverState *chr; > #endif > - int fd; > } VirtualConsole; > > typedef struct GtkDisplayState > @@ -1162,9 +1161,12 @@ static gboolean gd_focus_out_event(GtkWidget *widget, > > static int gd_vc_chr_write(CharDriverState *chr, const uint8_t *buf, int len) > { > +#if defined(CONFIG_VTE) > VirtualConsole *vc = chr->opaque; > > - return vc ? write(vc->fd, buf, len) : len; > + vte_terminal_feed(VTE_TERMINAL(vc->terminal), (const char *)buf, len); > +#endif > + return len; > } > > static int nb_vcs; > @@ -1190,19 +1192,12 @@ void early_gtk_display_init(void) > } > > #if defined(CONFIG_VTE) > -static gboolean gd_vc_in(GIOChannel *chan, GIOCondition cond, void *opaque) > +static gboolean gd_vc_in(VteTerminal *terminal, gchar *text, guint size, > + gpointer user_data) > { > - VirtualConsole *vc = opaque; > - uint8_t buffer[1024]; > - ssize_t len; > - > - len = read(vc->fd, buffer, sizeof(buffer)); > - if (len <= 0) { > - return FALSE; > - } > - > - qemu_chr_be_write(vc->chr, buffer, len); > + VirtualConsole *vc = user_data; > > + qemu_chr_be_write(vc->chr, (uint8_t *)text, (unsigned int)size); > return TRUE; > } > #endif > @@ -1214,13 +1209,8 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL > const char *label; > char buffer[32]; > char path[32]; > -#if VTE_CHECK_VERSION(0, 26, 0) > - VtePty *pty; > -#endif > - GIOChannel *chan; > GtkWidget *scrolled_window; > GtkAdjustment *vadjustment; > - int master_fd, slave_fd; > > snprintf(buffer, sizeof(buffer), "vc%d", index); > snprintf(path, sizeof(path), "<QEMU>/View/VC%d", index); > @@ -1239,16 +1229,7 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL > gtk_accel_map_add_entry(path, GDK_KEY_2 + index, HOTKEY_MODIFIERS); > > vc->terminal = vte_terminal_new(); > - > - master_fd = qemu_openpty_raw(&slave_fd, NULL); > - g_assert(master_fd != -1); > - > -#if VTE_CHECK_VERSION(0, 26, 0) > - pty = vte_pty_new_foreign(master_fd, NULL); > - vte_terminal_set_pty_object(VTE_TERMINAL(vc->terminal), pty); > -#else > - vte_terminal_set_pty(VTE_TERMINAL(vc->terminal), master_fd); > -#endif > + g_signal_connect(vc->terminal, "commit", G_CALLBACK(gd_vc_in), vc); > > vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->terminal), -1); > > @@ -1263,7 +1244,6 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL > > vte_terminal_set_size(VTE_TERMINAL(vc->terminal), 80, 25); > > - vc->fd = slave_fd; > vc->chr->opaque = vc; > vc->scrolled_window = scrolled_window; > > @@ -1281,9 +1261,6 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL > vc->chr->init(vc->chr); > } > > - chan = g_io_channel_unix_new(vc->fd); > - g_io_add_watch(chan, G_IO_IN, gd_vc_in, vc); > - > #endif /* CONFIG_VTE */ > return group; > } > This commit somehow messes up the monitor vc: Fire up qemu-system-x86_64 and switch to console 2 (monitor). You'll find it formatted as if the console was only ~10 chars wide during printout of the monitor greetings. When typing, everything is fine again. Maybe an ordering issue that was only revealed by this commit, dunno yet. Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 263 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc 2014-05-04 8:35 ` [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc Jan Kiszka @ 2014-05-04 17:07 ` Cole Robinson 2014-05-04 18:25 ` Jan Kiszka 0 siblings, 1 reply; 9+ messages in thread From: Cole Robinson @ 2014-05-04 17:07 UTC (permalink / raw) To: Jan Kiszka, Gerd Hoffmann, qemu-devel; +Cc: Anthony Liguori On 05/04/2014 04:35 AM, Jan Kiszka wrote: > On 2014-04-29 11:46, Gerd Hoffmann wrote: >> From: Cole Robinson <crobinso@redhat.com> >> >> Try kicking off a rhel5 text install over serial, the text menu navigation >> is all messed up, and some of the kernel boot messages are randomly >> corrupted. >> >> Drop use of a pty and just use vte infrastructure for reading and writing. >> This fixes the above corruption, and is simpler to boot. >> >> (I don't know what was wrong with the original code though. FWIW this is >> what virt-manager has done for years). >> >> Signed-off-by: Cole Robinson <crobinso@redhat.com> >> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> >> --- >> ui/gtk.c | 41 +++++++++-------------------------------- >> 1 file changed, 9 insertions(+), 32 deletions(-) >> >> diff --git a/ui/gtk.c b/ui/gtk.c >> index c85aea3..1465a38 100644 >> --- a/ui/gtk.c >> +++ b/ui/gtk.c >> @@ -115,7 +115,6 @@ typedef struct VirtualConsole >> GtkWidget *scrolled_window; >> CharDriverState *chr; >> #endif >> - int fd; >> } VirtualConsole; >> >> typedef struct GtkDisplayState >> @@ -1162,9 +1161,12 @@ static gboolean gd_focus_out_event(GtkWidget *widget, >> >> static int gd_vc_chr_write(CharDriverState *chr, const uint8_t *buf, int len) >> { >> +#if defined(CONFIG_VTE) >> VirtualConsole *vc = chr->opaque; >> >> - return vc ? write(vc->fd, buf, len) : len; >> + vte_terminal_feed(VTE_TERMINAL(vc->terminal), (const char *)buf, len); >> +#endif >> + return len; >> } >> >> static int nb_vcs; >> @@ -1190,19 +1192,12 @@ void early_gtk_display_init(void) >> } >> >> #if defined(CONFIG_VTE) >> -static gboolean gd_vc_in(GIOChannel *chan, GIOCondition cond, void *opaque) >> +static gboolean gd_vc_in(VteTerminal *terminal, gchar *text, guint size, >> + gpointer user_data) >> { >> - VirtualConsole *vc = opaque; >> - uint8_t buffer[1024]; >> - ssize_t len; >> - >> - len = read(vc->fd, buffer, sizeof(buffer)); >> - if (len <= 0) { >> - return FALSE; >> - } >> - >> - qemu_chr_be_write(vc->chr, buffer, len); >> + VirtualConsole *vc = user_data; >> >> + qemu_chr_be_write(vc->chr, (uint8_t *)text, (unsigned int)size); >> return TRUE; >> } >> #endif >> @@ -1214,13 +1209,8 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >> const char *label; >> char buffer[32]; >> char path[32]; >> -#if VTE_CHECK_VERSION(0, 26, 0) >> - VtePty *pty; >> -#endif >> - GIOChannel *chan; >> GtkWidget *scrolled_window; >> GtkAdjustment *vadjustment; >> - int master_fd, slave_fd; >> >> snprintf(buffer, sizeof(buffer), "vc%d", index); >> snprintf(path, sizeof(path), "<QEMU>/View/VC%d", index); >> @@ -1239,16 +1229,7 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >> gtk_accel_map_add_entry(path, GDK_KEY_2 + index, HOTKEY_MODIFIERS); >> >> vc->terminal = vte_terminal_new(); >> - >> - master_fd = qemu_openpty_raw(&slave_fd, NULL); >> - g_assert(master_fd != -1); >> - >> -#if VTE_CHECK_VERSION(0, 26, 0) >> - pty = vte_pty_new_foreign(master_fd, NULL); >> - vte_terminal_set_pty_object(VTE_TERMINAL(vc->terminal), pty); >> -#else >> - vte_terminal_set_pty(VTE_TERMINAL(vc->terminal), master_fd); >> -#endif >> + g_signal_connect(vc->terminal, "commit", G_CALLBACK(gd_vc_in), vc); >> >> vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->terminal), -1); >> >> @@ -1263,7 +1244,6 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >> >> vte_terminal_set_size(VTE_TERMINAL(vc->terminal), 80, 25); >> >> - vc->fd = slave_fd; >> vc->chr->opaque = vc; >> vc->scrolled_window = scrolled_window; >> >> @@ -1281,9 +1261,6 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >> vc->chr->init(vc->chr); >> } >> >> - chan = g_io_channel_unix_new(vc->fd); >> - g_io_add_watch(chan, G_IO_IN, gd_vc_in, vc); >> - >> #endif /* CONFIG_VTE */ >> return group; >> } >> > > This commit somehow messes up the monitor vc: Fire up qemu-system-x86_64 > and switch to console 2 (monitor). You'll find it formatted as if the > console was only ~10 chars wide during printout of the monitor > greetings. When typing, everything is fine again. Maybe an ordering > issue that was only revealed by this commit, dunno yet. > Check out gerd's ui-gtk-next branch, there's a few extra patches related to vte sizing that might fix it. - Cole ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc 2014-05-04 17:07 ` Cole Robinson @ 2014-05-04 18:25 ` Jan Kiszka 2014-05-04 18:32 ` Jan Kiszka 2014-05-05 11:55 ` Gerd Hoffmann 0 siblings, 2 replies; 9+ messages in thread From: Jan Kiszka @ 2014-05-04 18:25 UTC (permalink / raw) To: Cole Robinson, Gerd Hoffmann, qemu-devel; +Cc: Anthony Liguori [-- Attachment #1: Type: text/plain, Size: 5307 bytes --] On 2014-05-04 19:07, Cole Robinson wrote: > On 05/04/2014 04:35 AM, Jan Kiszka wrote: >> On 2014-04-29 11:46, Gerd Hoffmann wrote: >>> From: Cole Robinson <crobinso@redhat.com> >>> >>> Try kicking off a rhel5 text install over serial, the text menu navigation >>> is all messed up, and some of the kernel boot messages are randomly >>> corrupted. >>> >>> Drop use of a pty and just use vte infrastructure for reading and writing. >>> This fixes the above corruption, and is simpler to boot. >>> >>> (I don't know what was wrong with the original code though. FWIW this is >>> what virt-manager has done for years). >>> >>> Signed-off-by: Cole Robinson <crobinso@redhat.com> >>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> >>> --- >>> ui/gtk.c | 41 +++++++++-------------------------------- >>> 1 file changed, 9 insertions(+), 32 deletions(-) >>> >>> diff --git a/ui/gtk.c b/ui/gtk.c >>> index c85aea3..1465a38 100644 >>> --- a/ui/gtk.c >>> +++ b/ui/gtk.c >>> @@ -115,7 +115,6 @@ typedef struct VirtualConsole >>> GtkWidget *scrolled_window; >>> CharDriverState *chr; >>> #endif >>> - int fd; >>> } VirtualConsole; >>> >>> typedef struct GtkDisplayState >>> @@ -1162,9 +1161,12 @@ static gboolean gd_focus_out_event(GtkWidget *widget, >>> >>> static int gd_vc_chr_write(CharDriverState *chr, const uint8_t *buf, int len) >>> { >>> +#if defined(CONFIG_VTE) >>> VirtualConsole *vc = chr->opaque; >>> >>> - return vc ? write(vc->fd, buf, len) : len; >>> + vte_terminal_feed(VTE_TERMINAL(vc->terminal), (const char *)buf, len); >>> +#endif >>> + return len; >>> } >>> >>> static int nb_vcs; >>> @@ -1190,19 +1192,12 @@ void early_gtk_display_init(void) >>> } >>> >>> #if defined(CONFIG_VTE) >>> -static gboolean gd_vc_in(GIOChannel *chan, GIOCondition cond, void *opaque) >>> +static gboolean gd_vc_in(VteTerminal *terminal, gchar *text, guint size, >>> + gpointer user_data) >>> { >>> - VirtualConsole *vc = opaque; >>> - uint8_t buffer[1024]; >>> - ssize_t len; >>> - >>> - len = read(vc->fd, buffer, sizeof(buffer)); >>> - if (len <= 0) { >>> - return FALSE; >>> - } >>> - >>> - qemu_chr_be_write(vc->chr, buffer, len); >>> + VirtualConsole *vc = user_data; >>> >>> + qemu_chr_be_write(vc->chr, (uint8_t *)text, (unsigned int)size); >>> return TRUE; >>> } >>> #endif >>> @@ -1214,13 +1209,8 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >>> const char *label; >>> char buffer[32]; >>> char path[32]; >>> -#if VTE_CHECK_VERSION(0, 26, 0) >>> - VtePty *pty; >>> -#endif >>> - GIOChannel *chan; >>> GtkWidget *scrolled_window; >>> GtkAdjustment *vadjustment; >>> - int master_fd, slave_fd; >>> >>> snprintf(buffer, sizeof(buffer), "vc%d", index); >>> snprintf(path, sizeof(path), "<QEMU>/View/VC%d", index); >>> @@ -1239,16 +1229,7 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >>> gtk_accel_map_add_entry(path, GDK_KEY_2 + index, HOTKEY_MODIFIERS); >>> >>> vc->terminal = vte_terminal_new(); >>> - >>> - master_fd = qemu_openpty_raw(&slave_fd, NULL); >>> - g_assert(master_fd != -1); >>> - >>> -#if VTE_CHECK_VERSION(0, 26, 0) >>> - pty = vte_pty_new_foreign(master_fd, NULL); >>> - vte_terminal_set_pty_object(VTE_TERMINAL(vc->terminal), pty); >>> -#else >>> - vte_terminal_set_pty(VTE_TERMINAL(vc->terminal), master_fd); >>> -#endif >>> + g_signal_connect(vc->terminal, "commit", G_CALLBACK(gd_vc_in), vc); >>> >>> vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->terminal), -1); >>> >>> @@ -1263,7 +1244,6 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >>> >>> vte_terminal_set_size(VTE_TERMINAL(vc->terminal), 80, 25); >>> >>> - vc->fd = slave_fd; >>> vc->chr->opaque = vc; >>> vc->scrolled_window = scrolled_window; >>> >>> @@ -1281,9 +1261,6 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >>> vc->chr->init(vc->chr); >>> } >>> >>> - chan = g_io_channel_unix_new(vc->fd); >>> - g_io_add_watch(chan, G_IO_IN, gd_vc_in, vc); >>> - >>> #endif /* CONFIG_VTE */ >>> return group; >>> } >>> >> >> This commit somehow messes up the monitor vc: Fire up qemu-system-x86_64 >> and switch to console 2 (monitor). You'll find it formatted as if the >> console was only ~10 chars wide during printout of the monitor >> greetings. When typing, everything is fine again. Maybe an ordering >> issue that was only revealed by this commit, dunno yet. >> > > Check out gerd's ui-gtk-next branch, there's a few extra patches related to > vte sizing that might fix it. Looks better thanks to "gtk: zap scrolled_window" (monitor is properly formatted again). But the whole queue spits this out on the terminal: (<unknown>:13169): Gtk-CRITICAL **: IA__gtk_window_resize: assertion `width > 0' failed (<unknown>:13169): Gdk-CRITICAL **: IA__gdk_window_set_cursor: assertion `GDK_IS_WINDOW (window)' failed The last two patches seem to be responsible for this. Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 263 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc 2014-05-04 18:25 ` Jan Kiszka @ 2014-05-04 18:32 ` Jan Kiszka 2014-05-05 11:58 ` Gerd Hoffmann 2014-05-05 11:55 ` Gerd Hoffmann 1 sibling, 1 reply; 9+ messages in thread From: Jan Kiszka @ 2014-05-04 18:32 UTC (permalink / raw) To: Cole Robinson, Gerd Hoffmann, qemu-devel; +Cc: Anthony Liguori [-- Attachment #1: Type: text/plain, Size: 5322 bytes --] On 2014-05-04 20:25, Jan Kiszka wrote: > On 2014-05-04 19:07, Cole Robinson wrote: >> On 05/04/2014 04:35 AM, Jan Kiszka wrote: >>> On 2014-04-29 11:46, Gerd Hoffmann wrote: >>>> From: Cole Robinson <crobinso@redhat.com> >>>> >>>> Try kicking off a rhel5 text install over serial, the text menu navigation >>>> is all messed up, and some of the kernel boot messages are randomly >>>> corrupted. >>>> >>>> Drop use of a pty and just use vte infrastructure for reading and writing. >>>> This fixes the above corruption, and is simpler to boot. >>>> >>>> (I don't know what was wrong with the original code though. FWIW this is >>>> what virt-manager has done for years). >>>> >>>> Signed-off-by: Cole Robinson <crobinso@redhat.com> >>>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> >>>> --- >>>> ui/gtk.c | 41 +++++++++-------------------------------- >>>> 1 file changed, 9 insertions(+), 32 deletions(-) >>>> >>>> diff --git a/ui/gtk.c b/ui/gtk.c >>>> index c85aea3..1465a38 100644 >>>> --- a/ui/gtk.c >>>> +++ b/ui/gtk.c >>>> @@ -115,7 +115,6 @@ typedef struct VirtualConsole >>>> GtkWidget *scrolled_window; >>>> CharDriverState *chr; >>>> #endif >>>> - int fd; >>>> } VirtualConsole; >>>> >>>> typedef struct GtkDisplayState >>>> @@ -1162,9 +1161,12 @@ static gboolean gd_focus_out_event(GtkWidget *widget, >>>> >>>> static int gd_vc_chr_write(CharDriverState *chr, const uint8_t *buf, int len) >>>> { >>>> +#if defined(CONFIG_VTE) >>>> VirtualConsole *vc = chr->opaque; >>>> >>>> - return vc ? write(vc->fd, buf, len) : len; >>>> + vte_terminal_feed(VTE_TERMINAL(vc->terminal), (const char *)buf, len); >>>> +#endif >>>> + return len; >>>> } >>>> >>>> static int nb_vcs; >>>> @@ -1190,19 +1192,12 @@ void early_gtk_display_init(void) >>>> } >>>> >>>> #if defined(CONFIG_VTE) >>>> -static gboolean gd_vc_in(GIOChannel *chan, GIOCondition cond, void *opaque) >>>> +static gboolean gd_vc_in(VteTerminal *terminal, gchar *text, guint size, >>>> + gpointer user_data) >>>> { >>>> - VirtualConsole *vc = opaque; >>>> - uint8_t buffer[1024]; >>>> - ssize_t len; >>>> - >>>> - len = read(vc->fd, buffer, sizeof(buffer)); >>>> - if (len <= 0) { >>>> - return FALSE; >>>> - } >>>> - >>>> - qemu_chr_be_write(vc->chr, buffer, len); >>>> + VirtualConsole *vc = user_data; >>>> >>>> + qemu_chr_be_write(vc->chr, (uint8_t *)text, (unsigned int)size); >>>> return TRUE; >>>> } >>>> #endif >>>> @@ -1214,13 +1209,8 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >>>> const char *label; >>>> char buffer[32]; >>>> char path[32]; >>>> -#if VTE_CHECK_VERSION(0, 26, 0) >>>> - VtePty *pty; >>>> -#endif >>>> - GIOChannel *chan; >>>> GtkWidget *scrolled_window; >>>> GtkAdjustment *vadjustment; >>>> - int master_fd, slave_fd; >>>> >>>> snprintf(buffer, sizeof(buffer), "vc%d", index); >>>> snprintf(path, sizeof(path), "<QEMU>/View/VC%d", index); >>>> @@ -1239,16 +1229,7 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >>>> gtk_accel_map_add_entry(path, GDK_KEY_2 + index, HOTKEY_MODIFIERS); >>>> >>>> vc->terminal = vte_terminal_new(); >>>> - >>>> - master_fd = qemu_openpty_raw(&slave_fd, NULL); >>>> - g_assert(master_fd != -1); >>>> - >>>> -#if VTE_CHECK_VERSION(0, 26, 0) >>>> - pty = vte_pty_new_foreign(master_fd, NULL); >>>> - vte_terminal_set_pty_object(VTE_TERMINAL(vc->terminal), pty); >>>> -#else >>>> - vte_terminal_set_pty(VTE_TERMINAL(vc->terminal), master_fd); >>>> -#endif >>>> + g_signal_connect(vc->terminal, "commit", G_CALLBACK(gd_vc_in), vc); >>>> >>>> vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->terminal), -1); >>>> >>>> @@ -1263,7 +1244,6 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >>>> >>>> vte_terminal_set_size(VTE_TERMINAL(vc->terminal), 80, 25); >>>> >>>> - vc->fd = slave_fd; >>>> vc->chr->opaque = vc; >>>> vc->scrolled_window = scrolled_window; >>>> >>>> @@ -1281,9 +1261,6 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL >>>> vc->chr->init(vc->chr); >>>> } >>>> >>>> - chan = g_io_channel_unix_new(vc->fd); >>>> - g_io_add_watch(chan, G_IO_IN, gd_vc_in, vc); >>>> - >>>> #endif /* CONFIG_VTE */ >>>> return group; >>>> } >>>> >>> >>> This commit somehow messes up the monitor vc: Fire up qemu-system-x86_64 >>> and switch to console 2 (monitor). You'll find it formatted as if the >>> console was only ~10 chars wide during printout of the monitor >>> greetings. When typing, everything is fine again. Maybe an ordering >>> issue that was only revealed by this commit, dunno yet. >>> >> >> Check out gerd's ui-gtk-next branch, there's a few extra patches related to >> vte sizing that might fix it. > > Looks better thanks to "gtk: zap scrolled_window" (monitor is properly > formatted again). ...err - no. The price of this patch is that the window is no longer properly resized on all guest mode changes. There is still more broken. Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 263 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc 2014-05-04 18:32 ` Jan Kiszka @ 2014-05-05 11:58 ` Gerd Hoffmann 0 siblings, 0 replies; 9+ messages in thread From: Gerd Hoffmann @ 2014-05-05 11:58 UTC (permalink / raw) To: Jan Kiszka; +Cc: qemu-devel, Anthony Liguori, Cole Robinson Hi, > >> Check out gerd's ui-gtk-next branch, there's a few extra patches related to > >> vte sizing that might fix it. > > > > Looks better thanks to "gtk: zap scrolled_window" (monitor is properly > > formatted again). > > ...err - no. The price of this patch is that the window is no longer > properly resized on all guest mode changes. There is still more broken. Indeed. Switching to higher resolutions make the window larger, but switching back to lower res doesn't make it smaller. I'll have a look. cheers, Gerd ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc 2014-05-04 18:25 ` Jan Kiszka 2014-05-04 18:32 ` Jan Kiszka @ 2014-05-05 11:55 ` Gerd Hoffmann 2014-05-05 14:46 ` Gerd Hoffmann 1 sibling, 1 reply; 9+ messages in thread From: Gerd Hoffmann @ 2014-05-05 11:55 UTC (permalink / raw) To: Jan Kiszka; +Cc: qemu-devel, Anthony Liguori, Cole Robinson Hi, > Looks better thanks to "gtk: zap scrolled_window" (monitor is properly > formatted again). But the whole queue spits this out on the terminal: > > (<unknown>:13169): Gtk-CRITICAL **: IA__gtk_window_resize: assertion `width > 0' failed > > (<unknown>:13169): Gdk-CRITICAL **: IA__gdk_window_set_cursor: assertion `GDK_IS_WINDOW (window)' failed Yes, there is some work-in-progress stuff in that branch causing this. cheers, Gerd ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc 2014-05-05 11:55 ` Gerd Hoffmann @ 2014-05-05 14:46 ` Gerd Hoffmann 2014-05-06 11:14 ` Jan Kiszka 0 siblings, 1 reply; 9+ messages in thread From: Gerd Hoffmann @ 2014-05-05 14:46 UTC (permalink / raw) To: Jan Kiszka; +Cc: qemu-devel, Anthony Liguori, Cole Robinson On Mo, 2014-05-05 at 13:55 +0200, Gerd Hoffmann wrote: > Hi, > > > Looks better thanks to "gtk: zap scrolled_window" (monitor is properly > > formatted again). But the whole queue spits this out on the terminal: > > > > (<unknown>:13169): Gtk-CRITICAL **: IA__gtk_window_resize: assertion `width > 0' failed > > > > (<unknown>:13169): Gdk-CRITICAL **: IA__gdk_window_set_cursor: assertion `GDK_IS_WINDOW (window)' failed > > Yes, there is some work-in-progress stuff in that branch causing this. Feel free to check out the branch again. Warnings are fixed, resizing is fixed, and you can move tabs to windows (so you can see vga + monitor at the same time). comments welcome, Gerd ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc 2014-05-05 14:46 ` Gerd Hoffmann @ 2014-05-06 11:14 ` Jan Kiszka 0 siblings, 0 replies; 9+ messages in thread From: Jan Kiszka @ 2014-05-06 11:14 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel, Anthony Liguori, Cole Robinson [-- Attachment #1: Type: text/plain, Size: 940 bytes --] On 2014-05-05 16:46, Gerd Hoffmann wrote: > On Mo, 2014-05-05 at 13:55 +0200, Gerd Hoffmann wrote: >> Hi, >> >>> Looks better thanks to "gtk: zap scrolled_window" (monitor is properly >>> formatted again). But the whole queue spits this out on the terminal: >>> >>> (<unknown>:13169): Gtk-CRITICAL **: IA__gtk_window_resize: assertion `width > 0' failed >>> >>> (<unknown>:13169): Gdk-CRITICAL **: IA__gdk_window_set_cursor: assertion `GDK_IS_WINDOW (window)' failed >> >> Yes, there is some work-in-progress stuff in that branch causing this. > > Feel free to check out the branch again. Warnings are fixed, resizing > is fixed, and you can move tabs to windows (so you can see vga + monitor > at the same time). Still issues remaining. Scenario: Fired up a Linux guest up to graphical mode, issued hard reset from monitor console, switched to guest display -> window is larger than boot loader screen. Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 263 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-05-06 11:15 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1398764774-22595-1-git-send-email-kraxel@redhat.com> 2014-05-01 14:26 ` [Qemu-devel] [PULL 0/8] gtk patch queue Peter Maydell [not found] ` <1398764774-22595-8-git-send-email-kraxel@redhat.com> 2014-05-04 8:35 ` [Qemu-devel] [PULL 7/8] gtk: Fix -serial vc Jan Kiszka 2014-05-04 17:07 ` Cole Robinson 2014-05-04 18:25 ` Jan Kiszka 2014-05-04 18:32 ` Jan Kiszka 2014-05-05 11:58 ` Gerd Hoffmann 2014-05-05 11:55 ` Gerd Hoffmann 2014-05-05 14:46 ` Gerd Hoffmann 2014-05-06 11:14 ` Jan Kiszka
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.