"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "programs/conhost/conhost.c" between
wine-6.0.tar.xz and wine-6.0.1.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs.

conhost.c  (wine-6.0.tar.xz):conhost.c  (wine-6.0.1.tar.xz)
skipping to change at line 198 skipping to change at line 198
static void set_tty_cursor( struct console *console, unsigned int x, unsigned in t y ) static void set_tty_cursor( struct console *console, unsigned int x, unsigned in t y )
{ {
char buf[64]; char buf[64];
if (console->tty_cursor_x == x && console->tty_cursor_y == y) return; if (console->tty_cursor_x == x && console->tty_cursor_y == y) return;
if (!x && y == console->tty_cursor_y + 1) strcpy( buf, "\r\n" ); if (!x && y == console->tty_cursor_y + 1) strcpy( buf, "\r\n" );
else if (!x && y == console->tty_cursor_y) strcpy( buf, "\r" ); else if (!x && y == console->tty_cursor_y) strcpy( buf, "\r" );
else if (y == console->tty_cursor_y) else if (y == console->tty_cursor_y)
{ {
if (console->is_unix && console->tty_cursor_x >= console->active->width)
{
/* Unix will usually have the cursor at width-1 in this case. instea
d of depending
* on the exact behaviour, move the cursor to the first column and m
ove forward
* from threre. */
tty_write( console, "\r", 1 );
console->tty_cursor_x = 0;
}
if (x + 1 == console->tty_cursor_x) strcpy( buf, "\b" ); if (x + 1 == console->tty_cursor_x) strcpy( buf, "\b" );
else if (x > console->tty_cursor_x) sprintf( buf, "\x1b[%uC", x - consol e->tty_cursor_x ); else if (x > console->tty_cursor_x) sprintf( buf, "\x1b[%uC", x - consol e->tty_cursor_x );
else sprintf( buf, "\x1b[%uD", console->tty_cursor_x - x ); else sprintf( buf, "\x1b[%uD", console->tty_cursor_x - x );
} }
else if (x || y) else if (x || y)
{ {
hide_tty_cursor( console ); hide_tty_cursor( console );
sprintf( buf, "\x1b[%u;%uH", y + 1, x + 1); sprintf( buf, "\x1b[%u;%uH", y + 1, x + 1);
} }
else strcpy( buf, "\x1b[H" ); else strcpy( buf, "\x1b[H" );
skipping to change at line 1738 skipping to change at line 1746
if (*out_size > sizeof(*info)) memcpy( info + 1, screen_buffer->font.face_na me, *out_size - sizeof(*info) ); if (*out_size > sizeof(*info)) memcpy( info + 1, screen_buffer->font.face_na me, *out_size - sizeof(*info) );
TRACE( "%p cursor_size=%u cursor_visible=%x cursor=(%u,%u) width=%u height=% u win=%s attr=%x popup_attr=%x" TRACE( "%p cursor_size=%u cursor_visible=%x cursor=(%u,%u) width=%u height=% u win=%s attr=%x popup_attr=%x"
" font_width=%u font_height=%u %s\n", screen_buffer, info->cursor_siz e, info->cursor_visible, " font_width=%u font_height=%u %s\n", screen_buffer, info->cursor_siz e, info->cursor_visible,
info->cursor_x, info->cursor_y, info->width, info->height, wine_dbgst r_rect(&screen_buffer->win), info->cursor_x, info->cursor_y, info->width, info->height, wine_dbgst r_rect(&screen_buffer->win),
info->attr, info->popup_attr, info->font_width, info->font_height, info->attr, info->popup_attr, info->font_width, info->font_height,
debugstr_wn( (const WCHAR *)(info + 1), (*out_size - sizeof(*info)) / sizeof(WCHAR) ) ); debugstr_wn( (const WCHAR *)(info + 1), (*out_size - sizeof(*info)) / sizeof(WCHAR) ) );
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
void notify_screen_buffer_size( struct screen_buffer *screen_buffer )
{
if (is_active( screen_buffer ) && screen_buffer->console->mode & ENABLE_WIND
OW_INPUT)
{
INPUT_RECORD ir;
ir.EventType = WINDOW_BUFFER_SIZE_EVENT;
ir.Event.WindowBufferSizeEvent.dwSize.X = screen_buffer->width;
ir.Event.WindowBufferSizeEvent.dwSize.Y = screen_buffer->height;
write_console_input( screen_buffer->console, &ir, 1, TRUE );
}
}
NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new _width, int new_height ) NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new _width, int new_height )
{ {
int i, old_width, old_height, copy_width, copy_height; int i, old_width, old_height, copy_width, copy_height;
char_info_t *new_data; char_info_t *new_data;
if (!(new_data = malloc( new_width * new_height * sizeof(*new_data) ))) retu rn STATUS_NO_MEMORY; if (!(new_data = malloc( new_width * new_height * sizeof(*new_data) ))) retu rn STATUS_NO_MEMORY;
old_width = screen_buffer->width; old_width = screen_buffer->width;
old_height = screen_buffer->height; old_height = screen_buffer->height;
copy_width = min( old_width, new_width ); copy_width = min( old_width, new_width );
skipping to change at line 1842 skipping to change at line 1862
screen_buffer->win.left = 0; screen_buffer->win.left = 0;
} }
if (screen_buffer->win.bottom >= info->height) if (screen_buffer->win.bottom >= info->height)
{ {
screen_buffer->win.bottom -= screen_buffer->win.top; screen_buffer->win.bottom -= screen_buffer->win.top;
screen_buffer->win.top = 0; screen_buffer->win.top = 0;
} }
if (screen_buffer->cursor_x >= info->width) screen_buffer->cursor_x = i nfo->width - 1; if (screen_buffer->cursor_x >= info->width) screen_buffer->cursor_x = i nfo->width - 1;
if (screen_buffer->cursor_y >= info->height) screen_buffer->cursor_y = i nfo->height - 1; if (screen_buffer->cursor_y >= info->height) screen_buffer->cursor_y = i nfo->height - 1;
if (is_active( screen_buffer ) && screen_buffer->console->mode & ENABLE_ notify_screen_buffer_size( screen_buffer );
WINDOW_INPUT)
{
INPUT_RECORD ir;
ir.EventType = WINDOW_BUFFER_SIZE_EVENT;
ir.Event.WindowBufferSizeEvent.dwSize.X = info->width;
ir.Event.WindowBufferSizeEvent.dwSize.Y = info->height;
write_console_input( screen_buffer->console, &ir, 1, TRUE );
}
} }
if (params->mask & SET_CONSOLE_OUTPUT_INFO_ATTR) if (params->mask & SET_CONSOLE_OUTPUT_INFO_ATTR)
{ {
screen_buffer->attr = info->attr; screen_buffer->attr = info->attr;
} }
if (params->mask & SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR) if (params->mask & SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR)
{ {
screen_buffer->popup_attr = info->popup_attr; screen_buffer->popup_attr = info->popup_attr;
} }
if (params->mask & SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW) if (params->mask & SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW)
 End of changes. 3 change blocks. 
9 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)