Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
bef93c04
Commit
bef93c04
authored
26 years ago
by
Joseph Pranevich
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Xterm driver can now resize the terminal when a mode change is
detected.
parent
d87fa94c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
console/interface.c
+17
-2
17 additions, 2 deletions
console/interface.c
console/xterm.c
+22
-2
22 additions, 2 deletions
console/xterm.c
with
39 additions
and
4 deletions
console/interface.c
+
17
−
2
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... */
...
...
This diff is collapsed.
Click to expand it.
console/xterm.c
+
22
−
2
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
);
...
...
@@ -30,7 +32,7 @@ static FILE *wine_openpty(FILE **master, FILE **slave, char *name,
typedef
struct
_XTERM_CONSOLE
{
FILE
*
master
;
/* xterm side of pty */
FILE
*
slave
;
/* wine side of pty */
int
pid
;
/* xterm's pid, -1 if no xterm */
int
pid
;
/* xterm's pid, -1 if no xterm */
}
XTERM_CONSOLE
;
static
XTERM_CONSOLE
xterm_console
;
...
...
@@ -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
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment