* [Qemu-devel] [5309] Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
@ 2008-09-24 3:32 Andrzej Zaborowski
2008-09-24 17:35 ` Ryan Harper
0 siblings, 1 reply; 5+ messages in thread
From: Andrzej Zaborowski @ 2008-09-24 3:32 UTC (permalink / raw)
To: qemu-devel
Revision: 5309
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5309
Author: balrog
Date: 2008-09-24 03:32:33 +0000 (Wed, 24 Sep 2008)
Log Message:
-----------
Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
This partially reverts r4812 to fix an issue highlighted by Ryan Harper
with all vc's being fixed size which prevented backends with resizable
window (curses) from displaying okay.
Modified Paths:
--------------
trunk/console.c
trunk/console.h
trunk/curses.c
Modified: trunk/console.c
===================================================================
--- trunk/console.c 2008-09-24 02:21:24 UTC (rev 5308)
+++ trunk/console.c 2008-09-24 03:32:33 UTC (rev 5309)
@@ -109,7 +109,8 @@
typedef enum {
GRAPHIC_CONSOLE,
- TEXT_CONSOLE
+ TEXT_CONSOLE,
+ TEXT_CONSOLE_FIXED_SIZE
} console_type_t;
/* ??? This is mis-named.
@@ -1046,7 +1047,7 @@
s = consoles[index];
if (s) {
active_console = s;
- if (s->g_width && s->g_height
+ if (s->console_type != TEXT_CONSOLE && s->g_width && s->g_height
&& (s->g_width != s->ds->width || s->g_height != s->ds->height))
dpy_resize(s->ds, s->g_width, s->g_height);
vga_hw_invalidate();
@@ -1157,6 +1158,15 @@
{
TextConsole *s = (TextConsole *) opaque;
+ if (s->g_width != s->ds->width || s->g_height != s->ds->height) {
+ if (s->console_type == TEXT_CONSOLE_FIXED_SIZE)
+ dpy_resize(s->ds, s->g_width, s->g_height);
+ else {
+ s->g_width = s->ds->width;
+ s->g_height = s->ds->height;
+ text_console_resize(s);
+ }
+ }
console_refresh(s);
}
@@ -1242,6 +1252,11 @@
return active_console && active_console->console_type == GRAPHIC_CONSOLE;
}
+int is_fixedsize_console(void)
+{
+ return active_console && active_console->console_type != TEXT_CONSOLE;
+}
+
void console_color_init(DisplayState *ds)
{
int i, j;
@@ -1264,14 +1279,11 @@
chr = qemu_mallocz(sizeof(CharDriverState));
if (!chr)
return NULL;
- s = new_console(ds, TEXT_CONSOLE);
+ s = new_console(ds, (p == 0) ? TEXT_CONSOLE : TEXT_CONSOLE_FIXED_SIZE);
if (!s) {
free(chr);
return NULL;
}
- if (!p)
- p = DEFAULT_MONITOR_SIZE;
-
chr->opaque = s;
chr->chr_write = console_puts;
chr->chr_send_event = console_send_event;
@@ -1345,7 +1357,8 @@
}
void qemu_console_copy(QEMUConsole *console, int src_x, int src_y,
- int dst_x, int dst_y, int w, int h) {
+ int dst_x, int dst_y, int w, int h)
+{
if (active_console == console) {
if (console->ds->dpy_copy)
console->ds->dpy_copy(console->ds,
Modified: trunk/console.h
===================================================================
--- trunk/console.h 2008-09-24 02:21:24 UTC (rev 5308)
+++ trunk/console.h 2008-09-24 03:32:33 UTC (rev 5309)
@@ -136,6 +136,7 @@
void vga_hw_text_update(console_ch_t *chardata);
int is_graphic_console(void);
+int is_fixedsize_console(void);
CharDriverState *text_console_init(DisplayState *ds, const char *p);
void console_select(unsigned int index);
void console_color_init(DisplayState *ds);
Modified: trunk/curses.c
===================================================================
--- trunk/curses.c 2008-09-24 02:21:24 UTC (rev 5308)
+++ trunk/curses.c 2008-09-24 03:32:33 UTC (rev 5309)
@@ -60,7 +60,7 @@
static void curses_calc_pad(void)
{
- if (is_graphic_console()) {
+ if (is_fixedsize_console()) {
width = gwidth;
height = gheight;
} else {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [5309] Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
2008-09-24 3:32 [Qemu-devel] [5309] Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's Andrzej Zaborowski
@ 2008-09-24 17:35 ` Ryan Harper
2008-11-02 18:42 ` [Qemu-devel] " Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: Ryan Harper @ 2008-09-24 17:35 UTC (permalink / raw)
To: qemu-devel
* Andrzej Zaborowski <balrogg@gmail.com> [2008-09-23 22:37]:
> Revision: 5309
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5309
> Author: balrog
> Date: 2008-09-24 03:32:33 +0000 (Wed, 24 Sep 2008)
>
> Log Message:
> -----------
> Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
>
> This partially reverts r4812 to fix an issue highlighted by Ryan Harper
> with all vc's being fixed size which prevented backends with resizable
> window (curses) from displaying okay.
Excellent! This fixed -curses mode for me.
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253 T/L: 678-9253
ryanh@us.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [5309] Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
2008-09-24 17:35 ` Ryan Harper
@ 2008-11-02 18:42 ` Jan Kiszka
2008-11-02 18:52 ` andrzej zaborowski
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2008-11-02 18:42 UTC (permalink / raw)
To: qemu-devel; +Cc: ryanh
[-- Attachment #1: Type: text/plain, Size: 844 bytes --]
Ryan Harper wrote:
> * Andrzej Zaborowski <balrogg@gmail.com> [2008-09-23 22:37]:
>> Revision: 5309
>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5309
>> Author: balrog
>> Date: 2008-09-24 03:32:33 +0000 (Wed, 24 Sep 2008)
>>
>> Log Message:
>> -----------
>> Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
>>
>> This partially reverts r4812 to fix an issue highlighted by Ryan Harper
>> with all vc's being fixed size which prevented backends with resizable
>> window (curses) from displaying okay.
>
> Excellent! This fixed -curses mode for me.
>
...but it breaks setting the monitor etc. consoles to reasonable sizes
in case the graphical console is too small (e.g. the Musicpal uses
384x192 pixels). Is there no way to address both issues?
Thanks,
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [5309] Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
2008-11-02 18:42 ` [Qemu-devel] " Jan Kiszka
@ 2008-11-02 18:52 ` andrzej zaborowski
2008-11-02 19:10 ` Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: andrzej zaborowski @ 2008-11-02 18:52 UTC (permalink / raw)
To: Jan Kiszka; +Cc: ryanh, qemu-devel
2008/11/2 Jan Kiszka <jan.kiszka@web.de>:
> Ryan Harper wrote:
>> * Andrzej Zaborowski <balrogg@gmail.com> [2008-09-23 22:37]:
>>> Revision: 5309
>>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5309
>>> Author: balrog
>>> Date: 2008-09-24 03:32:33 +0000 (Wed, 24 Sep 2008)
>>>
>>> Log Message:
>>> -----------
>>> Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
>>>
>>> This partially reverts r4812 to fix an issue highlighted by Ryan Harper
>>> with all vc's being fixed size which prevented backends with resizable
>>> window (curses) from displaying okay.
>>
>> Excellent! This fixed -curses mode for me.
>>
>
> ...but it breaks setting the monitor etc. consoles to reasonable sizes
> in case the graphical console is too small (e.g. the Musicpal uses
> 384x192 pixels). Is there no way to address both issues?
-monitor vc:800x600 should cause the monitor to be
TEXT_CONSOLE_FIXED_SIZE, i.e. like before this commit. Maybe
vc:80Cx25C should be default for all text consoles when using SDL and
for -curses vc should be default (currently the default is a mix).
Cheers
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [5309] Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
2008-11-02 18:52 ` andrzej zaborowski
@ 2008-11-02 19:10 ` Jan Kiszka
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2008-11-02 19:10 UTC (permalink / raw)
To: andrzej zaborowski; +Cc: ryanh, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]
andrzej zaborowski wrote:
> 2008/11/2 Jan Kiszka <jan.kiszka@web.de>:
>> Ryan Harper wrote:
>>> * Andrzej Zaborowski <balrogg@gmail.com> [2008-09-23 22:37]:
>>>> Revision: 5309
>>>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5309
>>>> Author: balrog
>>>> Date: 2008-09-24 03:32:33 +0000 (Wed, 24 Sep 2008)
>>>>
>>>> Log Message:
>>>> -----------
>>>> Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
>>>>
>>>> This partially reverts r4812 to fix an issue highlighted by Ryan Harper
>>>> with all vc's being fixed size which prevented backends with resizable
>>>> window (curses) from displaying okay.
>>> Excellent! This fixed -curses mode for me.
>>>
>> ...but it breaks setting the monitor etc. consoles to reasonable sizes
>> in case the graphical console is too small (e.g. the Musicpal uses
>> 384x192 pixels). Is there no way to address both issues?
>
> -monitor vc:800x600 should cause the monitor to be
> TEXT_CONSOLE_FIXED_SIZE, i.e. like before this commit. Maybe
Yes, this works around it.
> vc:80Cx25C should be default for all text consoles when using SDL and
> for -curses vc should be default (currently the default is a mix).
Sounds reasonable, given that the regression of the previous version
only hit ncurses if I got this correctly. Will you patch this?
Thanks,
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-11-02 19:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-24 3:32 [Qemu-devel] [5309] Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's Andrzej Zaborowski
2008-09-24 17:35 ` Ryan Harper
2008-11-02 18:42 ` [Qemu-devel] " Jan Kiszka
2008-11-02 18:52 ` andrzej zaborowski
2008-11-02 19:10 ` Jan Kiszka
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).