Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bef93c04
Commit
bef93c04
authored
Jan 03, 1999
by
Joseph Pranevich
Committed by
Alexandre Julliard
Jan 03, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xterm driver can now resize the terminal when a mode change is
detected.
parent
d87fa94c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
+38
-3
interface.c
console/interface.c
+17
-2
xterm.c
console/xterm.c
+21
-1
No files found.
console/interface.c
View file @
bef93c04
...
...
@@ -197,8 +197,23 @@ void CONSOLE_ResizeScreen(int x, int y)
void
CONSOLE_NotifyResizeScreen
(
int
x
,
int
y
)
{
if
(
driver
.
resizeScreen
)
driver
.
resizeScreen
(
x
,
y
);
if
(
driver
.
notifyResizeScreen
)
driver
.
notifyResizeScreen
(
x
,
y
);
}
void
CONSOLE_WriteRawString
(
char
*
str
)
{
/* This is a special function that is only for internal use and
does not actually call any of the console drivers. It's
primary purpose is to provide a way for higher-level drivers
to write directly to the underlying terminal without worry that
there will be any retranslation done by the assorted drivers. Care
should be taken to ensure that this only gets called when the thing
written does not actually produce any output or a CONSOLE_Redraw()
is called immediately afterwards.
CONSOLE_Redraw() is not yet implemented.
*/
fprintf
(
driver
.
console_out
,
"%s"
,
str
);
}
/* Utility functions... */
...
...
console/xterm.c
View file @
bef93c04
...
...
@@ -19,6 +19,8 @@
#include "console.h"
#include "debug.h"
#define ESC '\x1b'
static
BOOL32
wine_create_console
(
FILE
**
master
,
FILE
**
slave
,
int
*
pid
);
static
FILE
*
wine_openpty
(
FILE
**
master
,
FILE
**
slave
,
char
*
name
,
struct
termios
*
term
,
struct
winsize
*
winsize
);
...
...
@@ -47,6 +49,9 @@ void XTERM_Start()
chain
.
close
=
driver
.
close
;
driver
.
close
=
XTERM_Close
;
chain
.
resizeScreen
=
driver
.
resizeScreen
;
driver
.
resizeScreen
=
XTERM_ResizeScreen
;
}
void
XTERM_Init
()
...
...
@@ -80,6 +85,20 @@ void XTERM_Close()
}
}
void
XTERM_ResizeScreen
(
int
x
,
int
y
)
{
char
temp
[
100
];
/* Call the chain first, there shoudln't be any... */
if
(
chain
.
resizeScreen
)
chain
.
resizeScreen
(
x
,
y
);
sprintf
(
temp
,
"
\x1b
[8;%d;%dt"
,
y
,
x
);
CONSOLE_WriteRawString
(
temp
);
CONSOLE_NotifyResizeScreen
(
x
,
y
);
}
/**
* It looks like the openpty that comes with glibc in RedHat 5.0
* is buggy (second call returns what looks like a dup of 0 and 1
...
...
@@ -145,7 +164,8 @@ static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid)
if
((
*
pid
=
fork
())
==
0
)
{
tcsetattr
(
fileno
(
*
slave
),
TCSADRAIN
,
&
term
);
sprintf
(
buf
,
"-Sxx%d"
,
fileno
(
*
master
));
execlp
(
"xterm"
,
"xterm"
,
buf
,
NULL
);
execlp
(
CONSOLE_XTERM_PROG
,
CONSOLE_XTERM_PROG
,
buf
,
"-fg"
,
"white"
,
"-bg"
,
"black"
,
NULL
);
ERR
(
console
,
"error creating xterm
\n
"
);
exit
(
1
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment