Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
8e3e6b54
Commit
8e3e6b54
authored
May 15, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure all Wine processes share the same X display.
Inherit --managed option across processes. Add support for specifying display and managed mode in config file.
parent
d8ba1268
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
4 deletions
+75
-4
x11drv_main.c
dlls/x11drv/x11drv_main.c
+66
-4
options.h
include/options.h
+5
-0
wine.ini
wine.ini
+4
-0
No files found.
dlls/x11drv/x11drv_main.c
View file @
8e3e6b54
...
...
@@ -13,6 +13,7 @@
#include "ts_xutil.h"
#include "winbase.h"
#include "winreg.h"
#include "callback.h"
#include "clipboard.h"
...
...
@@ -24,6 +25,7 @@
#include "win.h"
#include "x11drv.h"
DEFAULT_DEBUG_CHANNEL
(
x11drv
);
static
USER_DRIVER
user_driver
=
{
...
...
@@ -77,6 +79,65 @@ static int error_handler(Display *display, XErrorEvent *error_evt)
/***********************************************************************
* setup_options
*
* Setup the x11drv options.
*/
static
void
setup_options
(
void
)
{
char
buffer
[
256
];
HKEY
hkey
;
DWORD
type
,
count
;
if
(
RegCreateKeyExA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
x11drv"
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
))
{
ERR
(
"Cannot create config registry key
\n
"
);
ExitProcess
(
1
);
}
/* --display option */
count
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hkey
,
"display"
,
0
,
&
type
,
buffer
,
&
count
))
{
if
(
Options
.
display
)
{
if
(
strcmp
(
buffer
,
Options
.
display
))
MESSAGE
(
"%s: warning: --display option ignored, using '%s'
\n
"
,
argv0
,
buffer
);
}
else
if
((
Options
.
display
=
getenv
(
"DISPLAY"
)))
{
if
(
strcmp
(
buffer
,
Options
.
display
))
MESSAGE
(
"%s: warning: $DISPLAY variable ignored, using '%s'
\n
"
,
argv0
,
buffer
);
}
Options
.
display
=
strdup
(
buffer
);
}
else
{
if
(
!
Options
.
display
&&
!
(
Options
.
display
=
getenv
(
"DISPLAY"
)))
{
MESSAGE
(
"%s: no display specified
\n
"
,
argv0
);
ExitProcess
(
1
);
}
RegSetValueExA
(
hkey
,
"display"
,
0
,
REG_SZ
,
Options
.
display
,
strlen
(
Options
.
display
)
+
1
);
}
/* --managed option */
if
(
!
Options
.
managed
)
{
count
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hkey
,
"managed"
,
0
,
&
type
,
buffer
,
&
count
))
Options
.
managed
=
IS_OPTION_TRUE
(
buffer
[
0
]
);
}
else
RegSetValueExA
(
hkey
,
"managed"
,
0
,
REG_SZ
,
"y"
,
2
);
RegCloseKey
(
hkey
);
}
/***********************************************************************
* create_desktop
*
* Create the desktop window for the --desktop mode.
...
...
@@ -135,7 +196,7 @@ static void create_desktop( const char *geometry )
TSXStringListToTextProperty
(
&
name
,
1
,
&
window_name
);
TSXSetWMProperties
(
display
,
root_window
,
&
window_name
,
&
window_name
,
Options
.
argv
,
Options
.
argc
,
size_hints
,
wm_hints
,
class_hints
);
NULL
,
0
,
size_hints
,
wm_hints
,
class_hints
);
XA_WM_DELETE_WINDOW
=
TSXInternAtom
(
display
,
"WM_DELETE_WINDOW"
,
False
);
TSXSetWMProtocols
(
display
,
root_window
,
&
XA_WM_DELETE_WINDOW
,
1
);
TSXFree
(
size_hints
);
...
...
@@ -162,12 +223,13 @@ static void process_attach(void)
CLIPBOARD_Driver
=
&
X11DRV_CLIPBOARD_Driver
;
WND_Driver
=
&
X11DRV_WND_Driver
;
setup_options
();
/* Open display */
if
(
!
(
display
=
TSXOpenDisplay
(
Options
.
display
)))
{
MESSAGE
(
"%s: Can't open display: %s
\n
"
,
argv0
,
Options
.
display
?
Options
.
display
:
"(none specified)"
);
MESSAGE
(
"%s: Can't open display: %s
\n
"
,
argv0
,
Options
.
display
);
ExitProcess
(
1
);
}
fcntl
(
ConnectionNumber
(
display
),
F_SETFD
,
1
);
/* set close on exec flag */
...
...
include/options.h
View file @
8e3e6b54
...
...
@@ -88,4 +88,9 @@ extern char* PROFILE_GetStringItem( char* );
extern
void
VERSION_ParseWinVersion
(
const
char
*
arg
);
extern
void
VERSION_ParseDosVersion
(
const
char
*
arg
);
#define IS_OPTION_TRUE(ch) \
((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
#define IS_OPTION_FALSE(ch) \
((ch) == 'n' || (ch) == 'N' || (ch) == 'f' || (ch) == 'F' || (ch) == '0')
#endif
/* __WINE_OPTIONS_H */
wine.ini
View file @
8e3e6b54
...
...
@@ -97,6 +97,10 @@ PrivateColorMap = N
PerfectGraphics
=
N
; Color depth to use on multi-depth screens
;;ScreenDepth = 16
; Name of X11 display to use
;;Display = :0.0
; Allow the window manager to manage created windows
Managed
=
N
; Use XFree86 DGA extension if present
UseDGA
=
Y
; Use XShm extension if present
...
...
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